Merge remote-tracking branch 'origin/dev/feat/partner1.3_20230828' into dev/feat/partner1.3_20230828

This commit is contained in:
俞扬
2023-08-11 11:41:14 +08:00
9 changed files with 210 additions and 62 deletions

View File

@@ -1,7 +1,10 @@
package com.cool.store.controller;
import com.cool.store.dto.label.LabelAddDTO;
import com.cool.store.dto.label.LabelDeleteDTO;
import com.cool.store.dto.label.LabelListDTO;
import com.cool.store.dto.label.LabelUpdateDTO;
import com.cool.store.exception.ApiException;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.LabelService;
import com.cool.store.vo.LabelListVo;
@@ -39,16 +42,23 @@ public class LabelController {
@ApiOperation("新增标签")
@PostMapping("/add")
public ResponseResult addLabel(@RequestBody LabelAddDTO dto) {
public ResponseResult addLabel(@RequestBody LabelAddDTO dto) throws ApiException {
labelService.addLabel(dto);
return ResponseResult.success();
}
// @ApiOperation("修改标签")
// @PostMapping("/edit")
// public ResponseResult updateLabel() {
// labelService.updateLabel();
// return ResponseResult.success();
// }
@ApiOperation("修改标签")
@PostMapping("/edit")
public ResponseResult updateLabel(@RequestBody LabelUpdateDTO dto) throws ApiException {
labelService.updateLabel(dto);
return ResponseResult.success();
}
@ApiOperation("删除标签")
@PostMapping("/delete")
public ResponseResult deleteLabel(@RequestBody LabelDeleteDTO dto) {
labelService.deleteLabel(dto);
return ResponseResult.success();
}
}