Skip to content

Commit

Permalink
注解完善
Browse files Browse the repository at this point in the history
  • Loading branch information
pkaq committed Sep 1, 2022
1 parent 7f22e08 commit 0b51316
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public abstract class ActiveBaseCtrl<T extends ActiveBaseService, E extends Mode
protected T service;

@PostMapping("del")
@Operation(description = "根据ID删除/批量删除记录")
@Operation(summary = "删除记录", description = "根据ID删除/批量删除记录")
public Response del(@Parameter(name = "ids", description = "[记录ID]")
@RequestBody SingleArray<String> ids){

Expand All @@ -39,22 +39,22 @@ public Response del(@Parameter(name = "ids", description = "[记录ID]")
}

@PostMapping("edit")
@Operation(description = "新增/编辑记录")
@Operation(summary = "新增记录",description = "新增/编辑记录")
public Response save(@Parameter(name ="formdata", description = "模型对象")
@RequestBody E entity){
this.service.merge(entity);
return success(entity, ResponseEnumm.SAVE_SUCCESS.getName());
}

@GetMapping("list")
@Operation(description = "列表查询")
@Operation(summary = "分页查询",description = "列表查询")
public Response list(@Parameter(name ="condition", description = "模型对象")
E entity, Integer pageNo, Integer pageSize){
return this.success(this.service.listPage(entity, pageNo, pageSize));
}

@GetMapping("/get/{id}")
@Operation(description = "根据ID获得记录信息")
@Operation(summary = "根据ID查询", description = "根据ID获得记录信息")
public Response get(@Parameter(name = "id", description = "记录ID")
@PathVariable("id") String id){
return this.success(this.service.getById(id));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public abstract class StdBaseCtrl<T extends StdBaseService, E extends StdBaseEnt
protected T service;

@PostMapping("/del")
@Operation(description = "根据ID删除/批量删除记录")
@Operation(summary = "删除记录", description = "根据ID删除/批量删除记录")
@NoRepeatSubmit
public Response del(@Parameter(name = "ids", description = "[记录ID]")
@RequestBody SingleArray<String> ids){
Expand All @@ -41,7 +41,7 @@ public Response del(@Parameter(name = "ids", description = "[记录ID]")
}

@PostMapping("/edit")
@Operation(description = "新增/编辑记录")
@Operation(summary = "新增记录",description = "新增/编辑记录")
@NoRepeatSubmit
public Response save(@Parameter(name ="formdata", description = "模型对象")
@RequestBody E entity){
Expand All @@ -50,23 +50,23 @@ public Response save(@Parameter(name ="formdata", description = "模型对象")
}

@GetMapping("/list")
@Operation(description = "列表查询")
@Operation(summary = "分页查询",description = "列表查询")
@NoRepeatSubmit
public Response list(@Parameter(name ="condition", description = "模型对象")
E entity, Integer pageNo, Integer pageSize){
return this.success(this.service.listPage(entity, pageNo, pageSize));
}

@GetMapping("/listAll")
@Operation(description = "列表查询 无分页")
@Operation(summary = "查询全部",description = "列表查询 无分页")
@NoRepeatSubmit
public Response listAll(@Parameter(name ="condition", description = "模型对象")
E entity){
return this.success(this.service.list(entity));
}

@GetMapping("/get/{id}")
@Operation(description = "根据ID获得记录信息")
@Operation(summary = "根据ID查询", description = "根据ID获得记录信息")
@NoRepeatSubmit
public Response get(@Parameter(name = "id", description = "记录ID")
@PathVariable("id") String id){
Expand Down

0 comments on commit 0b51316

Please sign in to comment.