Browse Source

修改角色不区分租户的概念

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
5b6edb257c
2 changed files with 9 additions and 7 deletions
  1. +1
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java
  2. +8
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/role/RoleServiceImpl.java

+ 1
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java View File

@@ -145,10 +145,7 @@ public class RoadInformationServiceImpl extends BaseServiceImpl<RoadInformationM
if(StringUtils.isEmpty(userId)){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}
User user = userMapper.selectOne(Wrappers.<User>lambdaQuery()
.eq(User::getMark, 1)
.eq(User::getStatus,1)
.eq(User::getId, userId));
User user = CurrentUserUtil.getUserInfo();
if(null == user){
return JsonResult.error("用户不存在");
}

+ 8
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/role/RoleServiceImpl.java View File

@@ -63,15 +63,20 @@ public class RoleServiceImpl implements IRoleService {
private OpRolePermissionService opRolePermissionService;




/**
*
* 2023-01-11 此处角色先不区分租户的概念,整个系统就3个角色,后期调整
*
* @param roleQuery
* @return
*/
@Override
public JsonResult getRoleList(RoleQuery roleQuery) {
IPage<Role> page = new Page<>(roleQuery.getPage(), roleQuery.getLimit());
// 查询条件
QueryWrapper<Role> queryWrapper = new QueryWrapper<>();
// 租户ID
queryWrapper.eq("tenant_id", CurrentUserUtil.getTenantId());
// queryWrapper.eq("tenant_id", CurrentUserUtil.getTenantId());
// 角色名称
if (!StringUtils.isEmpty(roleQuery.getRoleName())) {
queryWrapper.like("role_name", roleQuery.getRoleName());

Loading…
Cancel
Save