消息 成员同步
This commit is contained in:
+7
-2
@@ -110,7 +110,13 @@ public class CpUserServiceImpl extends ServiceImpl<CpUserMapper,CpUserDO> implem
|
||||
public void cpUserSync() throws WxErrorException {
|
||||
WxCpConfigStorage config = wxCpService.getWxCpConfigStorage();
|
||||
List<WxCpDepart> departList = wxCpService.getDepartmentService().list(null);
|
||||
List<WxCpUser> userList = wxCpService.getUserService().listByDepartment(1L, true, 0);
|
||||
|
||||
//根据部门id获取部门成员信息
|
||||
//6 旭清回鄉生態農業發展公司
|
||||
//35 回鄉信息技术公司
|
||||
List<WxCpUser> userList = wxCpService.getUserService().listByDepartment(6L, true, 0);
|
||||
userList.addAll(wxCpService.getUserService().listByDepartment(35L, true, 0));
|
||||
|
||||
|
||||
List<CpUserDO> rs = CpUserConvert.INSTANCE.convertListFromWxApi(userList);
|
||||
|
||||
@@ -120,7 +126,6 @@ public class CpUserServiceImpl extends ServiceImpl<CpUserMapper,CpUserDO> implem
|
||||
List<String> nowUsersIds = nowUsers.stream().map(CpUserDO::getUserId).collect(Collectors.toList());
|
||||
|
||||
rs.removeIf(cpUserDO -> nowUsersIds.contains(cpUserDO.getUserId()));
|
||||
|
||||
this.saveBatch(rs);
|
||||
|
||||
// 已经离职的员工 设置删除
|
||||
|
||||
Reference in New Issue
Block a user