mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-10-06 15:01:38 +08:00
新增:新增系统管理/岗位管理(列表、查看详情、新增、修改、删除、导出)
This commit is contained in:
@@ -36,12 +36,15 @@ import top.charles7c.cnadmin.common.model.vo.R;
|
||||
import top.charles7c.cnadmin.monitor.annotation.Log;
|
||||
import top.charles7c.cnadmin.system.model.query.DeptQuery;
|
||||
import top.charles7c.cnadmin.system.model.query.MenuQuery;
|
||||
import top.charles7c.cnadmin.system.model.query.PostQuery;
|
||||
import top.charles7c.cnadmin.system.model.query.RoleQuery;
|
||||
import top.charles7c.cnadmin.system.model.vo.DeptVO;
|
||||
import top.charles7c.cnadmin.system.model.vo.MenuVO;
|
||||
import top.charles7c.cnadmin.system.model.vo.PostVO;
|
||||
import top.charles7c.cnadmin.system.model.vo.RoleVO;
|
||||
import top.charles7c.cnadmin.system.service.DeptService;
|
||||
import top.charles7c.cnadmin.system.service.MenuService;
|
||||
import top.charles7c.cnadmin.system.service.PostService;
|
||||
import top.charles7c.cnadmin.system.service.RoleService;
|
||||
|
||||
/**
|
||||
@@ -51,6 +54,7 @@ import top.charles7c.cnadmin.system.service.RoleService;
|
||||
* @since 2023/1/22 21:48
|
||||
*/
|
||||
@Tag(name = "公共 API")
|
||||
@Log(ignore = true)
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/common")
|
||||
@@ -59,8 +63,8 @@ public class CommonController {
|
||||
private final DeptService deptService;
|
||||
private final MenuService menuService;
|
||||
private final RoleService roleService;
|
||||
private final PostService postService;
|
||||
|
||||
@Log(ignore = true)
|
||||
@Operation(summary = "查询部门树", description = "查询树结构的部门列表")
|
||||
@GetMapping("/tree/dept")
|
||||
public R<List<Tree<Long>>> listDeptTree(@Validated DeptQuery query, @Validated SortQuery sortQuery) {
|
||||
@@ -69,7 +73,6 @@ public class CommonController {
|
||||
return R.ok(treeList);
|
||||
}
|
||||
|
||||
@Log(ignore = true)
|
||||
@Operation(summary = "查询菜单树", description = "查询树结构的菜单列表")
|
||||
@GetMapping("/tree/menu")
|
||||
public R<List<Tree<Long>>> listMenuTree(@Validated MenuQuery query, @Validated SortQuery sortQuery) {
|
||||
@@ -78,7 +81,6 @@ public class CommonController {
|
||||
return R.ok(treeList);
|
||||
}
|
||||
|
||||
@Log(ignore = true)
|
||||
@Operation(summary = "查询角色字典", description = "查询角色字典列表")
|
||||
@GetMapping("/dict/role")
|
||||
public R<List<LabelValueVO<Long>>> listRoleDict(@Validated RoleQuery query, @Validated SortQuery sortQuery) {
|
||||
@@ -86,4 +88,12 @@ public class CommonController {
|
||||
List<LabelValueVO<Long>> dictList = roleService.buildDict(list);
|
||||
return R.ok(dictList);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询岗位字典", description = "查询岗位字典列表")
|
||||
@GetMapping("/dict/post")
|
||||
public R<List<LabelValueVO<Long>>> listPostDict(@Validated PostQuery query, @Validated SortQuery sortQuery) {
|
||||
List<PostVO> list = postService.list(query, sortQuery);
|
||||
List<LabelValueVO<Long>> dictList = postService.buildDict(list);
|
||||
return R.ok(dictList);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.cnadmin.webapi.controller.system;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import top.charles7c.cnadmin.common.annotation.CrudRequestMapping;
|
||||
import top.charles7c.cnadmin.common.base.BaseController;
|
||||
import top.charles7c.cnadmin.system.model.query.PostQuery;
|
||||
import top.charles7c.cnadmin.system.model.request.PostRequest;
|
||||
import top.charles7c.cnadmin.system.model.vo.PostDetailVO;
|
||||
import top.charles7c.cnadmin.system.model.vo.PostVO;
|
||||
import top.charles7c.cnadmin.system.service.PostService;
|
||||
|
||||
/**
|
||||
* 岗位管理 API
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2023/2/25 22:54
|
||||
*/
|
||||
@Tag(name = "岗位管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping("/system/post")
|
||||
public class PostController extends BaseController<PostService, PostVO, PostDetailVO, PostQuery, PostRequest> {}
|
Reference in New Issue
Block a user