Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
40d460dd
Commit
40d460dd
authored
Jul 13, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!112
parents
e432283b
c5db5d23
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
5 deletions
+35
-5
HandoverServiceImpl.java
...oban/manage/service/service/impl/HandoverServiceImpl.java
+22
-0
MemberUnionRelatedServiceImpl.java
...e/service/service/impl/MemberUnionRelatedServiceImpl.java
+2
-1
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+3
-1
EmojiFilterUtil.java
...a/com/gic/haoban/manage/service/util/EmojiFilterUtil.java
+6
-2
HandoverStaffMapper.xml
...service/src/main/resources/mapper/HandoverStaffMapper.xml
+2
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/HandoverServiceImpl.java
View file @
40d460dd
...
@@ -7,6 +7,8 @@ import com.gic.haoban.base.api.common.BasePageInfo;
...
@@ -7,6 +7,8 @@ import com.gic.haoban.base.api.common.BasePageInfo;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.HandoverExternalDTO
;
import
com.gic.haoban.manage.api.dto.HandoverExternalDTO
;
import
com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO
;
import
com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO
;
import
com.gic.haoban.manage.api.dto.SecretSettingDTO
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
...
@@ -16,6 +18,7 @@ import com.gic.haoban.manage.service.service.SecretSettingService;
...
@@ -16,6 +18,7 @@ import com.gic.haoban.manage.service.service.SecretSettingService;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.wechat.api.dto.qywx.QywxTransferCustomerInfoDTO
;
import
com.gic.wechat.api.dto.qywx.QywxTransferCustomerInfoDTO
;
import
com.gic.wechat.api.dto.qywx.QywxUnassignedInfoDTO
;
import
com.gic.wechat.api.dto.qywx.QywxUnassignedInfoDTO
;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
...
@@ -83,8 +86,19 @@ public class HandoverServiceImpl implements HandoverService {
...
@@ -83,8 +86,19 @@ public class HandoverServiceImpl implements HandoverService {
delHandoverStaff
(
wxEnterpriseId
,
null
);
delHandoverStaff
(
wxEnterpriseId
,
null
);
return
false
;
return
false
;
}
}
SecretSettingDTO
secretSetting
=
secretSettingService
.
getSecretSetting
(
wxEnterprise
.
getWxEnterpriseId
(),
SecretTypeEnum
.
HAOBAN_HELP
.
getVal
());
if
(
null
==
secretSetting
||
secretSetting
.
getCheckFlag
()
==
0
)
{
logger
.
info
(
"没有配置secret:{}"
,
JSONObject
.
toJSONString
(
wxEnterprise
));
return
false
;
}
Map
<
String
,
List
<
QywxUnassignedInfoDTO
>>
handoverUserMap
=
infoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
dto
->
dto
.
getHandoverUserid
()));
Map
<
String
,
List
<
QywxUnassignedInfoDTO
>>
handoverUserMap
=
infoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
dto
->
dto
.
getHandoverUserid
()));
handoverUserMap
.
forEach
((
userId
,
list
)
->
{
handoverUserMap
.
forEach
((
userId
,
list
)
->
{
boolean
checkFlag
=
checkStaffOver
(
secretSetting
,
userId
,
wxEnterprise
.
getCorpid
());
if
(!
checkFlag
)
{
logger
.
info
(
"该用户存在,不需要离职基础:{},{}"
,
userId
,
wxEnterpriseId
);
return
;
}
TabHandoverStaff
handoverStaff
=
getHandoverStaff
(
wxEnterpriseId
,
userId
);
TabHandoverStaff
handoverStaff
=
getHandoverStaff
(
wxEnterpriseId
,
userId
);
if
(
null
==
handoverStaff
)
{
if
(
null
==
handoverStaff
)
{
return
;
return
;
...
@@ -129,6 +143,14 @@ public class HandoverServiceImpl implements HandoverService {
...
@@ -129,6 +143,14 @@ public class HandoverServiceImpl implements HandoverService {
return
false
;
return
false
;
}
}
private
boolean
checkStaffOver
(
SecretSettingDTO
secretSetting
,
String
userId
,
String
corpId
)
{
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
corpId
,
secretSetting
.
getSecretVal
(),
userId
);
if
(
null
==
user
)
{
return
false
;
}
return
true
;
}
/**
/**
* 删除企业下的数据
* 删除企业下的数据
*
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/MemberUnionRelatedServiceImpl.java
View file @
40d460dd
...
@@ -61,7 +61,8 @@ public class MemberUnionRelatedServiceImpl implements MemberUnionRelatedService
...
@@ -61,7 +61,8 @@ public class MemberUnionRelatedServiceImpl implements MemberUnionRelatedService
@Override
@Override
public
void
update
(
MemberUnionidRelatedDTO
exsitDTO
)
{
public
void
update
(
MemberUnionidRelatedDTO
exsitDTO
)
{
mapper
.
updateByPrimaryKeySelective
(
EntityUtil
.
changeEntityByJSON
(
MemberUnionidRelated
.
class
,
exsitDTO
));
exsitDTO
.
setUpdateTime
(
new
Date
());
mapper
.
updateByPrimaryKeySelective
(
EntityUtil
.
changeEntityByJSON
(
MemberUnionidRelated
.
class
,
exsitDTO
));
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
40d460dd
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.out.impl;
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.out.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.crypto.SecureUtil
;
import
cn.hutool.crypto.SecureUtil
;
import
cn.hutool.crypto.digest.MD5
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
...
@@ -430,7 +431,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -430,7 +431,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String
avatar
=
dto
.
getAvatar
();
String
avatar
=
dto
.
getAvatar
();
String
unionId
=
dto
.
getUnionid
();
String
unionId
=
dto
.
getUnionid
();
if
(
StringUtils
.
isAnyBlank
(
wxUserId
,
wxEnterpriseId
,
name
,
createTime
,
externalUserId
))
{
if
(
StringUtils
.
isAnyBlank
(
wxUserId
,
wxEnterpriseId
,
name
,
createTime
,
externalUserId
))
{
log
.
info
(
"【新增外部联系人】wxUserId={},wxEnterpriseId={},name={},createTime={},avatar={},unionId={}"
,
wxUserId
,
wxEnterpriseId
,
name
,
createTime
,
avatar
,
unionId
,
externalUserId
);
log
.
info
(
"【新增外部联系人】wxUserId={},wxEnterpriseId={},name={},createTime={},avatar={},unionId={}
,externalUserId={}
"
,
wxUserId
,
wxEnterpriseId
,
name
,
createTime
,
avatar
,
unionId
,
externalUserId
);
checkQywxSettingApiService
.
saveFriendCallback
(
wxEnterpriseId
,
null
,
dto
);
checkQywxSettingApiService
.
saveFriendCallback
(
wxEnterpriseId
,
null
,
dto
);
return
;
return
;
}
}
...
@@ -766,6 +767,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -766,6 +767,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
}
memberUnionRelatedService
.
update
(
dto
);
memberUnionRelatedService
.
update
(
dto
);
RedisUtil
.
unlock
(
lockKey
);
RedisUtil
.
unlock
(
lockKey
);
RedisUtil
.
delCache
(
key
);
return
dto
;
return
dto
;
}
else
{
}
else
{
String
memberUnionidRelatedId
=
memberUnionRelatedService
.
addMemberUnionidRelated
(
dto
);
String
memberUnionidRelatedId
=
memberUnionRelatedService
.
addMemberUnionidRelated
(
dto
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/EmojiFilterUtil.java
View file @
40d460dd
...
@@ -12,9 +12,13 @@ public class EmojiFilterUtil {
...
@@ -12,9 +12,13 @@ public class EmojiFilterUtil {
}
}
String
s
=
EmojiParser
.
removeAllEmojis
(
content
);
String
s
=
EmojiParser
.
removeAllEmojis
(
content
);
if
(
StringUtils
.
isBlank
(
s
))
{
if
(
StringUtils
.
isBlank
(
s
))
{
return
""
;
return
"
未知用户
"
;
}
}
return
EmojiFilterUtil
.
filterEmojiLast
(
s
,
false
);
String
ret
=
EmojiFilterUtil
.
filterEmojiLast
(
s
,
false
);
if
(
StringUtils
.
isBlank
(
ret
))
{
return
"未知用户"
;
}
return
ret
;
}
}
/**
/**
...
...
haoban-manage3-service/src/main/resources/mapper/HandoverStaffMapper.xml
View file @
40d460dd
...
@@ -167,7 +167,8 @@
...
@@ -167,7 +167,8 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_handover_staff
from tab_haoban_handover_staff
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and handover_user_id=#{staffId}
and staff_id=#{staffId}
and status_flag = 1
</select>
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment