mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 12:39:05 +08:00
🐛 Fixing a bug. 修复导入钉钉用户是多级部门处理问题
This commit is contained in:
1 parent
0843b9d468
commit
82a1f1f5bb
2 files changed
+5
-3
No files matched your search
+1
-2
@@ -136,8 +136,7 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
|
||||
SysTenantMenu tenantMenu = sysTenantMenuService.getById(sysTenant.getMenuId());
|
||||
String[] split = tenantMenu.getMenuIds().split(",");
|
||||
List<SysMenu> newMenuList = menuService
|
||||
.list(Wrappers.<SysMenu>lambdaQuery().in(SysMenu::getMenuId,split));
|
||||
List<SysMenu> newMenuList = menuService.list(Wrappers.<SysMenu>lambdaQuery().in(SysMenu::getMenuId, split));
|
||||
menuList.addAll(newMenuList);
|
||||
});
|
||||
|
||||
|
||||
+4
-1
@@ -413,11 +413,14 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
}
|
||||
// 删除手机号中的 +86 前缀
|
||||
String phone = item.getPhone().split("-")[1];
|
||||
|
||||
boolean exsitPhone = userList.stream().anyMatch(sysUser -> phone.equals(sysUser.getPhone()));
|
||||
if (exsitPhone) {
|
||||
errorMsg.add(MsgUtils.getMessage(ErrorCodes.SYS_USER_PHONE_EXISTING, item.getPhone()));
|
||||
}
|
||||
String deptName = item.getDeptName().split(",")[0];
|
||||
// 根据规则获取部门信息
|
||||
String[] deptNameList = item.getDeptName().split(",")[0].split("-");
|
||||
String deptName = deptNameList[deptNameList.length - 1];
|
||||
// 判断输入的部门名称列表是否合法
|
||||
Optional<SysDept> deptOptional = deptList.stream().filter(dept -> deptName.equals(dept.getName()))
|
||||
.findFirst();
|
||||
|
||||
Reference in new issue
Block a user