|
|
@ -130,6 +130,9 @@ public class UserController { |
|
|
|
String initDeptId = configService.getValueByKey("app.init.deptId"); |
|
|
|
String initDeptId = configService.getValueByKey("app.init.deptId"); |
|
|
|
Dept dept = deptService.getById(initDeptId); |
|
|
|
Dept dept = deptService.getById(initDeptId); |
|
|
|
Optional.ofNullable(dept).orElseThrow(() -> new CheckedException("当前部门无效请重新在参数管理中配置!")); |
|
|
|
Optional.ofNullable(dept).orElseThrow(() -> new CheckedException("当前部门无效请重新在参数管理中配置!")); |
|
|
|
|
|
|
|
String execAdminUserId = configService.getValueByKey("app.exec.admin.userId"); |
|
|
|
|
|
|
|
KiccUser kiccUser = userService.getUserById(execAdminUserId); |
|
|
|
|
|
|
|
Optional.ofNullable(kiccUser).orElseThrow(() -> new CheckedException("当前系统管理执行用户无效请重新在参数管理中配置!")); |
|
|
|
String initUserType = configService.getValueByKey("app.init.deptId"); |
|
|
|
String initUserType = configService.getValueByKey("app.init.deptId"); |
|
|
|
String initTenantId = configService.getValueByKey("app.init.tenantId"); |
|
|
|
String initTenantId = configService.getValueByKey("app.init.tenantId"); |
|
|
|
String initRoleIds = configService.getValueByKey("app.init.roleIds"); |
|
|
|
String initRoleIds = configService.getValueByKey("app.init.roleIds"); |
|
|
@ -140,6 +143,8 @@ public class UserController { |
|
|
|
user.setDeptName(dept.getName()); |
|
|
|
user.setDeptName(dept.getName()); |
|
|
|
user.setUserType(initUserType); |
|
|
|
user.setUserType(initUserType); |
|
|
|
user.setTenantId(initTenantId); |
|
|
|
user.setTenantId(initTenantId); |
|
|
|
|
|
|
|
user.setCreateById(kiccUser.getUsername()); |
|
|
|
|
|
|
|
user.setCreateByName(kiccUser.getId()); |
|
|
|
userService.save(user); |
|
|
|
userService.save(user); |
|
|
|
|
|
|
|
|
|
|
|
// 处理角色授权
|
|
|
|
// 处理角色授权
|
|
|
|