Browse Source

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into develop

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
248ecd572f
1 changed files with 7 additions and 6 deletions
  1. +7
    -6
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/init/SystemUserInitService.java

+ 7
- 6
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/init/SystemUserInitService.java View File

@@ -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());

Loading…
Cancel
Save