diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java index d8cca422..8b3b1d4d 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java @@ -101,6 +101,8 @@ public class CustomerMainController { @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('base:customer-main:delete')") public CommonResult deleteCustomerMain(@RequestParam("id") String id) { + // TODO: 2024/8/4 临时 + customerMainService.removeById(id); return success(true); } @@ -144,7 +146,7 @@ public class CustomerMainController { * @date 19:21 2024/8/3 **/ @PostMapping("/bindCustomerCar") - @Operation(summary = "创建客户管理") + @Operation(summary = "绑定车辆") @PreAuthorize("@ss.hasPermission('base:customer-main:car')") public CommonResult bindCustomerCar(@Valid @RequestBody CustomerMainSaveReqVO saveReqVO) { customerMainService.bindCustomAndCar(saveReqVO); diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/label/controller/admin/LabelController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/label/controller/admin/LabelController.java index a2a0fd18..5a8e5d63 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/label/controller/admin/LabelController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/label/controller/admin/LabelController.java @@ -1,17 +1,14 @@ package cn.iocoder.yudao.module.label.controller.admin; -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; - import cn.iocoder.yudao.module.label.entity.Label; import cn.iocoder.yudao.module.label.service.LabelService; import cn.iocoder.yudao.module.label.vo.LabelPageReqVO; import cn.iocoder.yudao.module.label.vo.LabelRespVO; import cn.iocoder.yudao.module.label.vo.LabelSaveReqVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -20,12 +17,8 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.io.IOException; -import java.util.List; -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Tag(name = "管理后台 - 标签库") @@ -37,23 +30,48 @@ public class LabelController { @Resource private LabelService labelService; + /** + * 新建标签 + * + * @param createReqVO 标签扩展类 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 14:18 2024/8/4 + **/ @PostMapping("/create") @Operation(summary = "创建标签库") @PreAuthorize("@ss.hasPermission('base:label:create')") - public CommonResult createLabel(@Valid @RequestBody LabelSaveReqVO createReqVO) { - return success(labelService.createLabel(createReqVO)); + public CommonResult createLabel(@Valid @RequestBody LabelSaveReqVO createReqVO) { + labelService.saveLabel(createReqVO); + return success(true); } + /** + * 更新标签库 + * + * @param updateReqVO 标签扩展类 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 14:18 2024/8/4 + **/ @PutMapping("/update") @Operation(summary = "更新标签库") @PreAuthorize("@ss.hasPermission('base:label:update')") public CommonResult updateLabel(@Valid @RequestBody LabelSaveReqVO updateReqVO) { - labelService.updateLabel(updateReqVO); + labelService.saveLabel(updateReqVO); return success(true); } + /** + * 删除标签 + * + * @param id 标签id + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 14:33 2024/8/4 + **/ @DeleteMapping("/delete") - @Operation(summary = "删除标签库") + @Operation(summary = "删除标签") @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('base:label:delete')") public CommonResult deleteLabel(@RequestParam("id") String id) { @@ -61,6 +79,14 @@ public class LabelController { return success(true); } + /** + * 通过id获取标签 + * + * @param id 标签id + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 14:33 2024/8/4 + **/ @GetMapping("/get") @Operation(summary = "获得标签库") @Parameter(name = "id", description = "编号", required = true, example = "1024") @@ -70,25 +96,25 @@ public class LabelController { return success(BeanUtils.toBean(label, LabelRespVO.class)); } + /** + * 标签库分页查询 + * + * @param pageReqVO LabelPageReqVO实体 + * @param pageNo 分页参数 + * @param pageSize 分页参数 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult> + * @author PQZ + * @date 14:37 2024/8/4 + **/ @GetMapping("/page") @Operation(summary = "获得标签库分页") @PreAuthorize("@ss.hasPermission('base:label:query')") - public CommonResult> getLabelPage(@Valid LabelPageReqVO pageReqVO) { - PageResult