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
6f23fbff
Commit
6f23fbff
authored
Jul 05, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除好办成员时需要删除导购关联关系
parent
226b827d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+23
-5
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
6f23fbff
...
...
@@ -37,7 +37,6 @@ import com.gic.haoban.manage.service.config.Config;
import
com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.entity.*
;
import
com.gic.haoban.manage.service.errorcode.HaoBanErrCode
;
import
com.gic.haoban.manage.service.errorcode.QywxErrCode
;
import
com.gic.haoban.manage.service.pojo.bo.StaffListBO
;
import
com.gic.haoban.manage.service.service.*
;
...
...
@@ -55,6 +54,7 @@ import com.gic.wechat.api.service.qywx.QywxOrderApiService;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
...
...
@@ -281,11 +281,29 @@ public class StaffApiServiceImpl implements StaffApiService {
phoneNumber
=
arr
[
1
];
}
String
openUserid
=
getOpenUserid
(
wxUserId
,
dkCorpid
,
qwDTO
);
TabHaobanStaff
staff
=
staffService
.
selectByUserIdAndEnterpriseId
(
wxUserId
,
openUserid
,
wxEnterpriseId
);
if
(
staff
!=
null
)
{
staffService
.
delOtherStaffByWxUserId
(
staff
.
getWxUserId
(),
staff
.
getStaffId
(),
wxEnterpriseId
);
TabHaobanStaff
staff
=
new
TabHaobanStaff
();
List
<
StaffDTO
>
staffDTOList
=
staffService
.
listByUserIdsAndWxEnterpriseId
(
Lists
.
newArrayList
(
wxUserId
,
openUserid
),
wxEnterpriseId
);
if
(
CollUtil
.
isNotEmpty
(
staffDTOList
)
&&
staffDTOList
.
size
()>
1
)
{
//只保留一个staff
for
(
int
i
=
0
;
i
<
staffDTOList
.
size
()-
1
;
i
++){
StaffDTO
dto
=
staffDTOList
.
get
(
i
);
String
staffId
=
dto
.
getStaffId
();
// 员工解绑
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
if
(
CollectionUtils
.
isNotEmpty
(
staffClerkRelationDTOS
))
{
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
staffClerkRelationService
.
delBind
(
staffId
,
staffClerkRelationDTO
.
getClerkId
(),
ChannelCodeEnum
.
ADMIN_UNBIND
.
getCode
(),
null
,
wxEnterpriseId
);
}
}
this
.
staffService
.
delByStaffId
(
staffId
);
staffDTOList
.
remove
(
i
);
}
}
if
(
CollUtil
.
isNotEmpty
(
staffDTOList
)){
staff
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
staffDTOList
.
get
(
0
)),
TabHaobanStaff
.
class
);
}
staff
=
(
staff
==
null
?
new
TabHaobanStaff
()
:
staff
);
staff
.
setWxUserId
(
wxUserId
);
if
(
StringUtils
.
isNotBlank
(
openUserid
))
{
staff
.
setWxOpenUseId
(
openUserid
);
...
...
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