|
|
@@ -178,12 +178,13 @@ public class SystemUserInitService { |
|
|
|
} |
|
|
|
|
|
|
|
// 如果顶级部门存在,将该超级管理员与顶级部门关联 |
|
|
|
Dept dept = deptMapper.selectOne(Wrappers.<Dept>lambdaQuery() |
|
|
|
.eq(Dept::getMark, 1) |
|
|
|
.eq(Dept::getPid, SystemConstant.ROOT_DEPT_PID)); |
|
|
|
if (ObjectUtil.isNotNull(dept)) { |
|
|
|
user.setDeptId(dept.getId()); |
|
|
|
} |
|
|
|
// Dept dept = deptMapper.selectOne(Wrappers.<Dept>lambdaQuery() |
|
|
|
// .eq(Dept::getMark, 1) |
|
|
|
// .eq(Dept::getTenantId, user.getTenantId()) |
|
|
|
// .eq(Dept::getPid, SystemConstant.ROOT_DEPT_PID)); |
|
|
|
// if (ObjectUtil.isNotNull(dept)) { |
|
|
|
// user.setDeptId(dept.getId()); |
|
|
|
// } |
|
|
|
Integer rowCount = userMapper.insert(user); |
|
|
|
if (rowCount <= 0) { |
|
|
|
log.info("初始化系统租户用户失败,username:{}", user.getUsername()); |