Skip to content

Commit

Permalink
feat: 新增查询用户字典接口
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Nov 7, 2024
1 parent e1941ec commit d4b02ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import top.continew.admin.common.config.mybatis.BCryptEncryptor;
import top.continew.admin.common.enums.DisEnableStatusEnum;
import top.continew.admin.common.enums.GenderEnum;
import top.continew.starter.extension.crud.annotation.DictField;
import top.continew.starter.extension.crud.model.entity.BaseDO;
import top.continew.starter.security.crypto.annotation.FieldEncrypt;

Expand All @@ -36,6 +37,7 @@
* @since 2022/12/21 20:42
*/
@Data
@DictField(labelKey = "nickname")
@TableName("sys_user")
public class UserDO extends BaseDO {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import top.continew.admin.common.constant.CacheConstants;
import top.continew.admin.system.model.query.DeptQuery;
import top.continew.admin.system.model.query.MenuQuery;
import top.continew.admin.system.model.query.OptionQuery;
import top.continew.admin.system.model.query.RoleQuery;
import top.continew.admin.system.model.query.*;
import top.continew.admin.system.model.resp.FileUploadResp;
import top.continew.admin.system.service.*;
import top.continew.starter.core.util.validate.ValidationUtils;
Expand All @@ -62,6 +59,7 @@ public class CommonController {
private final FileService fileService;
private final DeptService deptService;
private final MenuService menuService;
private final UserService userService;
private final RoleService roleService;
private final DictItemService dictItemService;
private final OptionService optionService;
Expand Down Expand Up @@ -92,6 +90,12 @@ public List<Tree<Long>> listMenuTree(MenuQuery query, SortQuery sortQuery) {
return menuService.tree(query, sortQuery, true);
}

@Operation(summary = "查询用户字典", description = "查询用户字典列表")
@GetMapping("/dict/user")
public List<LabelValueResp> listUserDict(UserQuery query, SortQuery sortQuery) {
return userService.listDict(query, sortQuery);
}

@Operation(summary = "查询角色字典", description = "查询角色字典列表")
@GetMapping("/dict/role")
public List<LabelValueResp> listRoleDict(RoleQuery query, SortQuery sortQuery) {
Expand Down

0 comments on commit d4b02ba

Please sign in to comment.