微调
This commit is contained in:
@@ -16,10 +16,7 @@ public class DeptRespDTO {
|
||||
@Schema(description = "父部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long leaderUserId;
|
||||
|
||||
@Schema(description = "部门状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status; // 参见 CommonStatusEnum 枚举
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.njcn.rdms.module.system.api.user;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.fhs.core.trans.anno.AutoTrans;
|
||||
import com.fhs.trans.service.AutoTransable;
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.framework.common.util.collection.CollectionUtils;
|
||||
import com.njcn.rdms.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import com.njcn.rdms.module.system.enums.ApiConstants;
|
||||
import com.fhs.core.trans.anno.AutoTrans;
|
||||
import com.fhs.trans.service.AutoTransable;
|
||||
import feign.FeignIgnore;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
|
||||
import static com.njcn.rdms.module.system.api.user.AdminUserApi.PREFIX;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 管理员用户")
|
||||
@AutoTrans(namespace = PREFIX, fields = {"nickname"})
|
||||
public interface AdminUserApi extends AutoTransable<AdminUserRespDTO> {
|
||||
@@ -34,11 +34,6 @@ public interface AdminUserApi extends AutoTransable<AdminUserRespDTO> {
|
||||
@Parameter(name = "id", description = "用户编号", example = "1", required = true)
|
||||
CommonResult<AdminUserRespDTO> getUser(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/list-by-subordinate")
|
||||
@Operation(summary = "通过用户 ID 查询用户下属")
|
||||
@Parameter(name = "id", description = "用户编号", example = "1", required = true)
|
||||
CommonResult<List<AdminUserRespDTO>> getUserListBySubordinate(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/list")
|
||||
@Operation(summary = "通过用户 ID 查询用户们")
|
||||
@Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true)
|
||||
@@ -66,9 +61,7 @@ public interface AdminUserApi extends AutoTransable<AdminUserRespDTO> {
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验用户是否有效。如下情况,视为无效:
|
||||
* 1. 用户编号不存在
|
||||
* 2. 用户被禁用
|
||||
* 校验用户是否有效
|
||||
*
|
||||
* @param id 用户编号
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,6 @@ public interface DictTypeConstants {
|
||||
|
||||
// ========== system ==========
|
||||
String USER_SEX = "system_user_sex";
|
||||
String DATA_SCOPE = "system_data_scope";
|
||||
String LOGIN_TYPE = "system_login_type";
|
||||
String LOGIN_RESULT = "system_login_result";
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.njcn.rdms.module.system.enums.permission;
|
||||
|
||||
import com.njcn.rdms.framework.common.core.ArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 数据范围枚举类
|
||||
*
|
||||
* 用于实现数据级别的权限
|
||||
*
|
||||
* @author hongawen
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DataScopeEnum implements ArrayValuable<Integer> {
|
||||
|
||||
ALL(1), // 全部数据权限
|
||||
|
||||
DEPT_CUSTOM(2), // 指定部门数据权限
|
||||
DEPT_ONLY(3), // 部门数据权限
|
||||
DEPT_AND_CHILD(4), // 部门及以下数据权限
|
||||
|
||||
SELF(5); // 仅本人数据权限
|
||||
|
||||
/**
|
||||
* 范围
|
||||
*/
|
||||
private final Integer scope;
|
||||
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(DataScopeEnum::getScope).toArray(Integer[]::new);
|
||||
|
||||
@Override
|
||||
public Integer[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user