Compare commits
No commits in common. "068cdffaefe16da770b2011cf4059c460760e0f7" and "5f2a473cd8ee85bd9d971d650a4c00fd9d5b02f3" have entirely different histories.
068cdffaef
...
5f2a473cd8
|
|
@ -78,7 +78,7 @@ public class UserImportExe {
|
||||||
// 角色数据
|
// 角色数据
|
||||||
MultiResponse<RoleCO> roleCOMultiResponse = roleFacade.listRoles();
|
MultiResponse<RoleCO> roleCOMultiResponse = roleFacade.listRoles();
|
||||||
if (roleCOMultiResponse == null || CollUtil.isEmpty(roleCOMultiResponse.getData())) {
|
if (roleCOMultiResponse == null || CollUtil.isEmpty(roleCOMultiResponse.getData())) {
|
||||||
throw new BizException("未创建角色,请联系管理员");
|
throw new BizException("未创建默认通用角色,请联系管理员");
|
||||||
}
|
}
|
||||||
// 部门数据
|
// 部门数据
|
||||||
List<DepartmentDO> departmentDOList = departmentRepository.listByCorpInfoId(corpinfoId);
|
List<DepartmentDO> departmentDOList = departmentRepository.listByCorpInfoId(corpinfoId);
|
||||||
|
|
@ -349,17 +349,12 @@ public class UserImportExe {
|
||||||
if(StringUtils.isBlank(importEntity.getRoleName())){
|
if(StringUtils.isBlank(importEntity.getRoleName())){
|
||||||
throw new BizException("角色名称不能为空");
|
throw new BizException("角色名称不能为空");
|
||||||
}
|
}
|
||||||
try {
|
Map<String, RoleCO> roleCOMap = roleList.stream().collect(Collectors.toMap(RoleCO::getRoleName, role -> role));
|
||||||
Map<String, RoleCO> roleCOMap = roleList.stream().collect(Collectors.toMap(RoleCO::getRoleName, role -> role));
|
String roleName = importEntity.getRoleName();
|
||||||
String roleName = importEntity.getRoleName();
|
if(roleCOMap.get(roleName) == null){
|
||||||
if(roleCOMap.get(roleName) == null){
|
throw new BizException("角色不存在: " + roleName);
|
||||||
throw new BizException("角色不存在: " + roleName);
|
|
||||||
}
|
|
||||||
return roleCOMap.get(roleName).getId();
|
|
||||||
}catch (IllegalStateException e){
|
|
||||||
throw new BizException("系统角色名称重复,请联系管理员");
|
|
||||||
}
|
}
|
||||||
|
return roleCOMap.get(roleName).getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue