Selaa lähdekoodia

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

tags/V1.3.3
wanjing 1 vuosi sitten
vanhempi
commit
8ce546c6ae
1 muutettua tiedostoa jossa 14 lisäystä ja 3 poistoa
  1. +14
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/role/RoleServiceImpl.java

+ 14
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/role/RoleServiceImpl.java Näytä tiedosto

@@ -85,7 +85,7 @@ public class RoleServiceImpl implements IRoleService {
queryWrapper.eq("mark", MarkEnum.VALID.getCode());
//queryWrapper.orderByAsc("sort");
queryWrapper.orderByAsc("create_time");
queryWrapper.ne("id", "1");
//queryWrapper.ne("id", "1");
// 查询分页数据
IPage<Role> pageData = roleMapper.selectPage(page, queryWrapper);
pageData.convert(x -> {
@@ -349,9 +349,20 @@ public class RoleServiceImpl implements IRoleService {
@Override
public JsonResult getRoles() {

//超管
User user = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getUsername, "superAdmin").eq(User::getMark, 1));
if (StringUtils.isNull(user)) {
List<Role> roles = roleMapper.selectList(Wrappers.<Role>lambdaQuery()
.eq(Role::getCode, "superAdmin")
.eq(Role::getMark, 1)
.eq(Role::getStatus, 1));
return JsonResult.success(roles);
}
//对应的租户角色
List<Role> roles = roleMapper.selectList(Wrappers.<Role>lambdaQuery()
.eq(Role::getMark, MarkEnum.VALID.getCode()).eq(Role::getStatus, 1));

.eq(Role::getTenantId, user.getTenantId())
.eq(Role::getMark, 1)
.eq(Role::getStatus, 1));
return JsonResult.success(roles);
}


Loading…
Peruuta
Tallenna