删除排序
parent
2949ade98b
commit
62090df86f
|
@ -47,7 +47,7 @@ public class ApiManageController {
|
|||
* @param productAddReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
@PostMapping("/add")
|
||||
@Operation(summary = "接口信息添加", description = "添加接口信息,添加成功才可以使用")
|
||||
public Result<String> save(@Validated @RequestBody ProductAddReq productAddReq){
|
||||
apiManageService.save(Product.addProductList(productAddReq));
|
||||
|
@ -57,17 +57,16 @@ public class ApiManageController {
|
|||
|
||||
/**
|
||||
* 修改产品接口
|
||||
* @param productId
|
||||
* @param
|
||||
* @param productUpdReq
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/{productId}")
|
||||
@PostMapping("/upd")
|
||||
@Operation(summary = "接口信息修改", description = "通过ID修改接口信息")
|
||||
public Result<String> update(
|
||||
@Schema(title = "产品ID", type = "Integer", defaultValue = "1", description = "修改产品信息需要依据的唯一条件")
|
||||
@PathVariable("productId") Integer productId,
|
||||
@RequestBody @Validated ProductUpdReq productUpdReq) {
|
||||
apiManageService.updateById(Product.updProductList(productUpdReq,()->productId));
|
||||
apiManageService.updateById(Product.updProductList(productUpdReq,()-> productUpdReq.getProductId()));
|
||||
return Result.success(null, "操作成功");
|
||||
}
|
||||
|
||||
|
@ -79,7 +78,7 @@ public class ApiManageController {
|
|||
* @param productId
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/{productId}")
|
||||
@DeleteMapping("/del/{productId}")
|
||||
@Operation(summary = "接口信息删除",description = "通过Id删除接口信息")
|
||||
public Result<String> delete(@PathVariable("productId") Integer productId){
|
||||
apiManageService.removeById(productId);
|
||||
|
|
Loading…
Reference in New Issue