mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-10-01 04:57:07 +08:00
重构:重构部门管理前端代码;新增修改部门、批量删除部门、查看部门详情功能(后端主要基于 CRUD 通用组件提供 API)
This commit is contained in:
@@ -37,7 +37,7 @@ public @interface CrudRequestMapping {
|
||||
/**
|
||||
* API 列表
|
||||
*/
|
||||
Api[] api() default {Api.PAGE, Api.DETAIL, Api.CREATE, Api.UPDATE, Api.DELETE};
|
||||
Api[] api() default {Api.PAGE, Api.GET, Api.CREATE, Api.UPDATE, Api.DELETE};
|
||||
|
||||
/**
|
||||
* API 枚举
|
||||
@@ -58,7 +58,7 @@ public @interface CrudRequestMapping {
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
DETAIL,
|
||||
GET,
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
|
@@ -93,12 +93,12 @@ public abstract class BaseController<S extends BaseService<V, D, Q, C>, V, D, Q,
|
||||
* ID
|
||||
* @return 详情信息
|
||||
*/
|
||||
@Operation(summary = "查看数据详情")
|
||||
@Operation(summary = "查看详情")
|
||||
@Parameter(name = "id", description = "ID", in = ParameterIn.PATH)
|
||||
@ResponseBody
|
||||
@GetMapping("/{id}")
|
||||
protected R<D> detail(@PathVariable Long id) {
|
||||
D detail = baseService.detail(id);
|
||||
protected R<D> get(@PathVariable Long id) {
|
||||
D detail = baseService.get(id);
|
||||
return R.ok(detail);
|
||||
}
|
||||
|
||||
|
@@ -64,7 +64,7 @@ public interface BaseService<V, D, Q, C extends BaseRequest> {
|
||||
* ID
|
||||
* @return 详情信息
|
||||
*/
|
||||
D detail(Long id);
|
||||
D get(Long id);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
@@ -76,7 +76,7 @@ public abstract class BaseServiceImpl<M extends BaseMapper<T>, T, V, D, Q, C ext
|
||||
}
|
||||
|
||||
@Override
|
||||
public D detail(Long id) {
|
||||
public D get(Long id) {
|
||||
T entity = this.getById(id);
|
||||
return BeanUtil.copyProperties(entity, detailVoClass);
|
||||
}
|
||||
|
@@ -69,8 +69,8 @@ public class PageQuery implements Serializable {
|
||||
/** 默认页码:1 */
|
||||
private static final int DEFAULT_PAGE = 1;
|
||||
|
||||
/** 默认每页记录数:int 最大值 */
|
||||
private static final int DEFAULT_SIZE = Integer.MAX_VALUE;
|
||||
/** 默认每页记录数:10 */
|
||||
private static final int DEFAULT_SIZE = 10;
|
||||
private static final String DELIMITER = ",";
|
||||
|
||||
public PageQuery() {
|
||||
|
Reference in New Issue
Block a user