소스 검색

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

tags/V1.3.3
wanjing 1 년 전
부모
커밋
8ce546c6ae
1개의 변경된 파일14개의 추가작업 그리고 3개의 파일을 삭제
  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 파일 보기

@@ -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…
취소
저장