Commit aaf96b7b by fudahua

插入绑定日志

parent 3d3dc1ef
......@@ -161,12 +161,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
return uuid;
}
@Override
public int cleanStaffClerk(String wxEnterpriseId, List<String> staffIds) {
List<String> delStaffIds = staffService.listDelUserStaffId(wxEnterpriseId, staffIds);
if (CollectionUtils.isEmpty(delStaffIds)) {
logger.info("没有要删除的成员:{}",wxEnterpriseId);
return 0;
}
public int cleanStaffClerk(String wxEnterpriseId, List<String> delStaffIds) {
delStaffIds.forEach(staffId->{
List<StaffClerkRelationDTO> relationDTOS = listBindCodeByStaffId(null, staffId);
if (CollectionUtils.isNotEmpty(relationDTOS)) {
......@@ -175,8 +170,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
});
}
});
int ret = mapper.cleanStaffDepart(wxEnterpriseId, staffIds);
externalClerkRelatedService.cleanStaffRelated(wxEnterpriseId,staffIds);
int ret = mapper.cleanStaffDepart(wxEnterpriseId, delStaffIds);
externalClerkRelatedService.cleanStaffRelated(wxEnterpriseId,delStaffIds);
return ret;
}
......
......@@ -574,9 +574,14 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
List<StaffDTO> retLists = staffService.listByUserIdsAndWxEnterpriseId(clerkIds, wxEnterpriseId);
List<String> staffIds = retLists.stream().map(StaffDTO::getStaffId).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(staffIds)) {
staffClerkRelationService.cleanStaffClerk(wxEnterpriseId, staffIds);
staffService.cleanStaff(wxEnterpriseId, staffIds);
staffDepartmentRelatedService.cleanStaffDepartment(wxEnterpriseId,staffIds);
List<String> delStaffIds = staffService.listDelUserStaffId(wxEnterpriseId, staffIds);
if (CollectionUtils.isEmpty(delStaffIds)) {
logger.info("没有要删除的用户:{}--{}",wxEnterpriseId,taskId);
}else {
staffClerkRelationService.cleanStaffClerk(wxEnterpriseId, delStaffIds);
staffService.cleanStaff(wxEnterpriseId, delStaffIds);
staffDepartmentRelatedService.cleanStaffDepartment(wxEnterpriseId, delStaffIds);
}
}
}
......
......@@ -332,7 +332,7 @@
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId}
and status_flag = 1
and staff_id not in
and staff_id in
<foreach collection="staffIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
......
......@@ -347,8 +347,8 @@
status_flag = 0,
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} and status_flag = 1 and super_manager_flag is null
and staff_id not in
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} and status_flag = 1
and staff_id in
<foreach collection="staffIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
......
......@@ -277,7 +277,7 @@
status_flag = 0,
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1 and
staff_id not in
staff_id in
<foreach collection="staffIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment