|
@@ -2230,6 +2230,22 @@ public class WeiXinCorpController {
|
|
|
//设置人员所属部门
|
|
|
List<Department> allDeptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", companyId));
|
|
|
List<User> existingUsers = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
|
|
|
+ //检查是否有不在授权范围内的人员
|
|
|
+ List<User> removedUserList = existingUsers.stream().filter(ex -> !allCorpWxUserList.stream().anyMatch(corpwxUser -> corpwxUser.getCorpwxUserid().equals(ex.getCorpwxUserid()))).collect(Collectors.toList());
|
|
|
+ List<User> setInactiveList = new ArrayList<>();
|
|
|
+ removedUserList.forEach(re->{
|
|
|
+ if (re.getIsActive() == 1) {
|
|
|
+ User u = new User();
|
|
|
+ u.setId(re.getId());
|
|
|
+ u.setIsActive(0);
|
|
|
+ u.setInactiveDate(LocalDate.now());
|
|
|
+ setInactiveList.add(u);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //批量设置为停用
|
|
|
+ if (setInactiveList.size() > 0) {
|
|
|
+ userService.updateBatchById(setInactiveList);
|
|
|
+ }
|
|
|
List<User> newUserList = allCorpWxUserList.stream().filter(newItem -> !existingUsers.stream().anyMatch(existingItem -> newItem.getCorpwxUserid().equals(existingItem.getCorpwxUserid()))).collect(Collectors.toList());
|
|
|
newUserList.forEach(newItem->{
|
|
|
if (newItem.getCorpwxDeptid() != 1) {
|
|
@@ -3643,7 +3659,7 @@ public class WeiXinCorpController {
|
|
|
JSONObject docItem = new JSONObject();
|
|
|
docItem.put("type", 1);
|
|
|
docItem.put("title", "使用指南");
|
|
|
- docItem.put("url", "https://doc.weixin.qq.com/doc/w3_AQAACQauAEA1Ucywi0bQGy7XLaYYE?scode=AMsA1AfkAAgde2tFhrAFIAdQbyAPU");
|
|
|
+ docItem.put("url", "https://www.ttkuaiban.com/download/%E5%B7%A5%E6%97%B6%E7%AE%A1%E5%AE%B6%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E%E4%B9%A6.pdf");
|
|
|
array.add(docItem);
|
|
|
JSONObject enterItem = new JSONObject();
|
|
|
enterItem.put("type", 1);
|