Commit 62875b35 by 徐高华

画布

parent fd933965
......@@ -1546,6 +1546,24 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override
public void deleteStaff(String enterpriseId, String clerkId) {
StaffClerkRelationDTO staffDTO = this.staffClerkRelationService.getByClerkId(clerkId) ;
if(null == staffDTO) {
logger.info("没找到成员={}",clerkId);
return ;
}
logger.info("删除企微成员={},{}",clerkId,JSONObject.toJSONString(staffDTO));
String wxEnterpriseId = staffDTO.getWxEnterpriseId() ;
String staffId = staffDTO.getStaffId() ;
TabHaobanStaff staff = this.staffMapper.selectByPrimaryKey(staffId) ;
if(null == staff) {
logger.info("staff无={}",staffId);
return ;
}
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
if(qwDTO.isSelf()) {
this.qywxUserApiService.deleteSelfWorkWxUser(qwDTO.getDkCorpid(), qwDTO.getSelf3thSecret(), staff.getWxUserId(),qwDTO.getUrlHost()) ;
}else {
this.qywxUserApiService.deleteWorkWxUser(qwDTO.getThirdCorpid(), config.getWxSuiteid(), staff.getWxOpenUseId()) ;
}
}
}
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