Bladeren bron

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
wanjing 1 jaar geleden
bovenliggende
commit
fcd757d022
1 gewijzigde bestanden met toevoegingen van 2 en 4 verwijderingen
  1. +2
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/init/SystemUserInitService.java

+ 2
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/init/SystemUserInitService.java Bestand weergeven

@@ -49,7 +49,7 @@ public class SystemUserInitService {
*/
public JsonResult init(UserInitRequest request) {
log.info("进入初始化系统租户用户业务接口");
JsonResult result = this.check(request, null);
JsonResult result = this.check(request);
if (0 != result.getCode()) {
log.info("初始化系统租户用户业务接口:校验失败:{}", result.getMsg());
return result;
@@ -133,7 +133,7 @@ public class SystemUserInitService {
*
* @return
*/
private JsonResult check(UserInitRequest request, String tenantId) {
private JsonResult check(UserInitRequest request) {
if (StringUtils.isEmpty(request.getName())) {
return JsonResult.error(400, "用户名为空");
}
@@ -144,14 +144,12 @@ public class SystemUserInitService {
return JsonResult.error(400, "租户编号");
}
Integer count = userMapper.selectCount(new LambdaQueryWrapper<User>()
.eq(User::getTenantId, tenantId)
.eq(User::getUsername, request.getName())
.eq(User::getMark, 1));
if (count > 0) {
return JsonResult.error(400, "系统中已经存在该用户名");
}
count = roleMapper.selectCount(new LambdaQueryWrapper<Role>()
.eq(Role::getTenantId, tenantId)
.eq(Role::getId, 1)
.eq(Role::getMark, 1));
if (count <= 0) {

Laden…
Annuleren
Opslaan