Commit c7f17e70 by 墨竹

fix:删除解绑

parent 68775c92
......@@ -162,4 +162,16 @@ public interface StaffClerkRelationApiService {
* @return
*/
List<StaffClerkRelationDTO> listAll();
/**
* 通过员工id列表
*
* @param wxEnterpriseId wx企业标识
* @param staffId 员工id
* @return {@link List }<{@link StaffClerkRelationDTO }>
* @author mozhu
* @date 2022-06-20 22:46:46
*/
List<StaffClerkRelationDTO> listByStaffId(String wxEnterpriseId,String staffId);
}
......@@ -319,11 +319,11 @@ public class MessageApiServiceImpl implements MessageApiService {
this.staffDepartmentRelatedService.delByUserid(userid);
//删除员工表
this.staffService.delByStaffId(staffId);
List<StaffClerkInfoDTO> staffClerkInfoDTOS = staffClerkRelationApiService.listBindDetailByStaffId(staffId);
if (CollectionUtils.isNotEmpty(staffClerkInfoDTOS)) {
for (StaffClerkInfoDTO staffClerkInfoDTO : staffClerkInfoDTOS) {
staffClerkRelationApiService.unbindByStaffAndClerkId(staffId,staffClerkInfoDTO.getClerkId());
//员工解绑
List<StaffClerkRelationDTO> staffClerkRelationDTOS = staffClerkRelationApiService.listByStaffId(wxEnterpriseId, staffId);
if (CollectionUtils.isNotEmpty(staffClerkRelationDTOS)) {
for (StaffClerkRelationDTO staffClerkRelationDTO : staffClerkRelationDTOS) {
staffClerkRelationApiService.unbindByStaffAndClerkId(staffId,staffClerkRelationDTO.getClerkId());
}
}
}
......
......@@ -20,7 +20,10 @@ import com.gic.haoban.manage.api.enums.SecretTypeEnum;
import com.gic.haoban.manage.api.service.AuditApiService;
import com.gic.haoban.manage.api.service.StaffClerkRelationApiService;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper;
import com.gic.haoban.manage.service.entity.*;
import com.gic.haoban.manage.service.entity.MemberClerkChatConfig;
import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkBindLog;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation;
import com.gic.haoban.manage.service.service.*;
import com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
......@@ -446,4 +449,9 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
public List<StaffClerkRelationDTO> listAll() {
return staffClerkRelatinService.listAll();
}
@Override
public List<StaffClerkRelationDTO> listByStaffId(String wxEnterpriseId,String staffId) {
return staffClerkRelatinService.listByStaffId(wxEnterpriseId,staffId);
}
}
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