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
aa46a112
Commit
aa46a112
authored
Dec 10, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/xgh/bug/1210' into 'master'
Feature/xgh/bug/1210 See merge request
!2347
parents
e2210c8e
5d1be566
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
28 deletions
+58
-28
StaffService.java
...a/com/gic/haoban/manage/service/service/StaffService.java
+2
-0
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+48
-0
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+7
-4
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+1
-24
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffService.java
View file @
aa46a112
...
...
@@ -24,6 +24,8 @@ public interface StaffService {
int
delByStaffId
(
String
staffId
);
void
delStaff
(
String
wxEnterpriseId
,
String
staffId
)
;
/**
* 选择用户id和企业标识
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
aa46a112
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
...
...
@@ -7,9 +8,13 @@ import com.gic.api.base.commons.ServiceResponse;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.content.api.service.ContentProducerApiService
;
import
com.gic.haoban.app.customer.service.api.service.InnerApiService
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.enums.ChannelCodeEnum
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
...
...
@@ -18,8 +23,11 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff
;
import
com.gic.haoban.manage.service.pojo.bo.StaffListBO
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatService
;
import
com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.dto.qywx.fee.AccountListDTO
;
import
com.gic.wechat.api.dto.qywx.fee.AccountListResponseDTO
;
...
...
@@ -58,6 +66,18 @@ public class StaffServiceImpl implements StaffService {
private
TabHaobanStaffClerkRelationMapper
staffClerkRelationMapper
;
@Autowired
private
ContentProducerApiService
contentProducerApiService
;
@Autowired
private
GroupChatService
groupChatService
;
@Autowired
private
HmQrcodeService
hmQrcodeService
;
@Autowired
private
HmQrcodeApiService
hmQrcodeApiService
;
@Autowired
private
InnerApiService
innerApiService
;
@Autowired
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
@Autowired
private
StaffDepartmentRelatedService
staffDepartmentRelatedService
;
@Override
public
TabHaobanStaff
selectById
(
String
id
)
{
...
...
@@ -328,4 +348,32 @@ public class StaffServiceImpl implements StaffService {
}
}
}
@Override
public
void
delStaff
(
String
wxEnterpriseId
,
String
staffId
)
{
// 销毁卡券
innerApiService
.
delCardByStaffId
(
staffId
);
// 删除导购好友关联关系表
this
.
staffDepartmentRelatedService
.
delByStaffid
(
staffId
);
// 员工解绑
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationApiService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
if
(
CollectionUtils
.
isNotEmpty
(
staffClerkRelationDTOS
))
{
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
"-1"
,
staffClerkRelationDTO
.
getClerkId
(),
ChannelCodeEnum
.
QW_DEL_UNBIND
.
getCode
(),
wxEnterpriseId
);
}
}
// 群状态刷新
this
.
groupChatService
.
ownerDimission
(
staffId
);
// 删除员工表-注意顺序
this
.
delByStaffId
(
staffId
);
//活码删除
List
<
Long
>
hmIdList
=
hmQrcodeService
.
queryByStaffIdAndOverFlag
(
staffId
,
wxEnterpriseId
,
1
);
if
(
CollUtil
.
isNotEmpty
(
hmIdList
)){
for
(
Long
hmId
:
hmIdList
){
hmQrcodeApiService
.
delById
(
hmId
,
ChannelCodeEnum
.
ADMIN_UNBIND
.
getCode
(),
null
);
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
aa46a112
...
...
@@ -561,7 +561,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
}
List
<
TabHaobanPreDealLog
>
dealLogList
=
new
ArrayList
<>();
String
rootPid
=
"0"
;
if
(
ids
.
size
()>
1
)
{
if
(
ids
.
size
()>
=
1
)
{
rootPid
=
"-999"
;
syncId
=
Integer
.
valueOf
(
rootPid
);
TabHaobanPreDealLog
dealLog
=
getRootDept
(
wxEnterpriseId
,
rootPid
,
taskId
);
...
...
@@ -645,9 +645,12 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
if
(
CollectionUtils
.
isEmpty
(
delStaffIds
))
{
logger
.
info
(
"没有要删除的用户:{}--{}"
,
wxEnterpriseId
,
taskId
);
}
else
{
staffClerkRelationService
.
cleanStaffClerk
(
wxEnterpriseId
,
delStaffIds
);
staffService
.
cleanStaff
(
wxEnterpriseId
,
delStaffIds
);
staffDepartmentRelatedService
.
cleanStaffDepartment
(
wxEnterpriseId
,
delStaffIds
);
//staffClerkRelationService.cleanStaffClerk(wxEnterpriseId, delStaffIds);
//staffService.cleanStaff(wxEnterpriseId, delStaffIds);
// staffDepartmentRelatedService.cleanStaffDepartment(wxEnterpriseId, delStaffIds);
for
(
String
staffId
:
delStaffIds
)
{
this
.
staffService
.
delStaff
(
wxEnterpriseId
,
staffId
);
}
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
aa46a112
...
...
@@ -399,30 +399,7 @@ public class MessageApiServiceImpl implements MessageApiService {
return
;
}
String
staffId
=
oldStaff
.
getStaffId
();
// 销毁卡券
innerApiService
.
delCardByStaffId
(
staffId
);
// 删除导购好友关联关系表
this
.
staffDepartmentRelatedService
.
delByStaffid
(
staffId
);
// 员工解绑
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationApiService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
if
(
CollectionUtils
.
isNotEmpty
(
staffClerkRelationDTOS
))
{
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
"-1"
,
staffClerkRelationDTO
.
getClerkId
(),
ChannelCodeEnum
.
QW_DEL_UNBIND
.
getCode
(),
wxEnterpriseId
);
}
}
// 群状态刷新
this
.
groupChatService
.
ownerDimission
(
staffId
);
// 删除员工表-注意顺序
this
.
staffService
.
delByStaffId
(
staffId
);
//活码删除
List
<
Long
>
hmIdList
=
hmQrcodeService
.
queryByStaffIdAndOverFlag
(
staffId
,
wxEnterpriseId
,
1
);
if
(
CollUtil
.
isNotEmpty
(
hmIdList
)){
for
(
Long
hmId
:
hmIdList
){
hmQrcodeApiService
.
delById
(
hmId
,
ChannelCodeEnum
.
ADMIN_UNBIND
.
getCode
(),
null
);
}
}
this
.
staffService
.
delStaff
(
wxEnterpriseId
,
staffId
);
}
log
.
error
(
"成员同步结束"
);
}
...
...
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