mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-10-26 19:00:53 +08:00
refactor(crud): 将详情方法命名还原为 get
- 修改了 AbstractBaseController 中的 detail 方法名为 get - 更新了对应的 Api 枚举值,将 DETAIL 改为 GET
This commit is contained in:
@@ -39,5 +39,5 @@ public @interface CrudRequestMapping {
|
|||||||
/**
|
/**
|
||||||
* API 列表
|
* API 列表
|
||||||
*/
|
*/
|
||||||
Api[] api() default {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT};
|
Api[] api() default {Api.PAGE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,12 +104,12 @@ public abstract class AbstractBaseController<S extends BaseService<L, D, Q, C>,
|
|||||||
* @param id ID
|
* @param id ID
|
||||||
* @return 详情信息
|
* @return 详情信息
|
||||||
*/
|
*/
|
||||||
@CrudApi(Api.DETAIL)
|
@CrudApi(Api.GET)
|
||||||
@Operation(summary = "查询详情", description = "查询详情")
|
@Operation(summary = "查询详情", description = "查询详情")
|
||||||
@Parameter(name = "id", description = "ID", example = "1", in = ParameterIn.PATH)
|
@Parameter(name = "id", description = "ID", example = "1", in = ParameterIn.PATH)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public D detail(@PathVariable("id") Long id) {
|
public D get(@PathVariable("id") Long id) {
|
||||||
return baseService.get(id);
|
return baseService.get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public enum Api {
|
|||||||
/**
|
/**
|
||||||
* 详情
|
* 详情
|
||||||
*/
|
*/
|
||||||
DETAIL,
|
GET,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
|
|||||||
Reference in New Issue
Block a user