fix user group permission scope
This commit is contained in:
@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class UserQueryDto implements Serializable {
|
||||
@@ -29,4 +30,7 @@ public class UserQueryDto implements Serializable {
|
||||
|
||||
@Schema(description = "角色")
|
||||
private User.Role role;
|
||||
|
||||
@Schema(description = "用户ID范围,后端数据权限过滤使用")
|
||||
private List<Long> userIds;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.xspaceagi.system.application.dto.permission;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -28,6 +29,7 @@ public class SysGroupAddDto implements Serializable {
|
||||
private Integer authEnabled;
|
||||
|
||||
@Schema(description = "授权到期时间,空表示不过期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date expireTime;
|
||||
|
||||
@Schema(description = "来源,1:系统内置 2:用户自定义", hidden = true)
|
||||
@@ -38,4 +40,4 @@ public class SysGroupAddDto implements Serializable {
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sortIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.xspaceagi.system.application.dto.permission;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -31,6 +32,7 @@ public class SysGroupUpdateDto implements Serializable {
|
||||
private Integer authEnabled;
|
||||
|
||||
@Schema(description = "授权到期时间,空表示不过期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date expireTime;
|
||||
|
||||
@Schema(description = "来源,1:系统内置 2:用户自定义", hidden = true)
|
||||
@@ -41,4 +43,4 @@ public class SysGroupUpdateDto implements Serializable {
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sortIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,6 +247,12 @@ public class UserApplicationServiceImpl implements UserApplicationService {
|
||||
UserQueryDto userQueryDto = pageQueryVo.getQueryFilter();
|
||||
if (userQueryDto != null) {
|
||||
BeanUtils.copyProperties(userQueryDto, user);
|
||||
if (userQueryDto.getUserIds() != null) {
|
||||
if (userQueryDto.getUserIds().isEmpty()) {
|
||||
return new Page<>(pageQueryVo.getPageNo(), pageQueryVo.getPageSize(), 0);
|
||||
}
|
||||
queryWrapper.in(User::getId, userQueryDto.getUserIds());
|
||||
}
|
||||
}
|
||||
if ("".equals(user.getUserName())) {
|
||||
user.setUserName(null);
|
||||
|
||||
Reference in New Issue
Block a user