From 9fd121a1a07350d34c480830f387213407a1741f Mon Sep 17 00:00:00 2001 From: PQZ Date: Wed, 25 Sep 2024 17:44:20 +0800 Subject: [PATCH] 1 --- .../project/controller/admin/RepairProjectController.java | 6 +++--- .../project/controller/admin/RepairWaresController.java | 6 +++--- .../yudao/module/project/service/RepairProjectService.java | 2 +- .../yudao/module/project/service/RepairWaresService.java | 2 +- .../project/service/impl/RepairProjectServiceImpl.java | 3 ++- .../module/project/service/impl/RepairWaresServiceImpl.java | 3 ++- .../src/main/resources/mapper/project/RepairWaresMapper.xml | 2 +- 7 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairProjectController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairProjectController.java index 00b2d455..b9e47c2e 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairProjectController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairProjectController.java @@ -41,9 +41,9 @@ public class RepairProjectController { @PostMapping("/create") @Operation(summary = "创建维修项目") @PreAuthorize("@ss.hasPermission('repair:project:create')") - public CommonResult createRepairProject(@Valid @RequestBody RepairProjectSaveReqVO createReqVO) { - repairProjectService.saveRepairProject(createReqVO); - return success(true); + public CommonResult createRepairProject(@Valid @RequestBody RepairProjectSaveReqVO createReqVO) { + RepairProject repairProject = repairProjectService.saveRepairProject(createReqVO); + return success(repairProject); } /** diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java index 344ca666..bf55f478 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.project.controller.admin; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.project.entity.RepairWares; import cn.iocoder.yudao.module.project.service.RepairWaresService; import cn.iocoder.yudao.module.project.vo.RepairWaresPageReqVO; import cn.iocoder.yudao.module.project.vo.RepairWaresRespVO; @@ -39,9 +40,8 @@ public class RepairWaresController { @PostMapping("/create") @Operation(summary = "创建配件库") @PreAuthorize("@ss.hasPermission('repair:wares:create')") - public CommonResult createWares(@Valid @RequestBody RepairWaresSaveReqVO createReqVO) { - waresService.saveWares(createReqVO); - return success(true); + public CommonResult createWares(@Valid @RequestBody RepairWaresSaveReqVO createReqVO) { + return success(waresService.saveWares(createReqVO)); } /** diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairProjectService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairProjectService.java index 248175b7..bc23ab89 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairProjectService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairProjectService.java @@ -23,7 +23,7 @@ public interface RepairProjectService extends IService { * @author PQZ * @date 14:51 2024/9/12 **/ - void saveRepairProject(RepairProjectSaveReqVO saveReqVO); + RepairProject saveRepairProject(RepairProjectSaveReqVO saveReqVO); /** * 删除维修项目 diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairWaresService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairWaresService.java index db3ca00b..2546d6dc 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairWaresService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairWaresService.java @@ -23,7 +23,7 @@ public interface RepairWaresService extends IService { * @author PQZ * @date 9:33 2024/9/18 **/ - void saveWares(RepairWaresSaveReqVO saveReqVO); + RepairWares saveWares(RepairWaresSaveReqVO saveReqVO); /** * @param id 配件id diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/impl/RepairProjectServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/impl/RepairProjectServiceImpl.java index 8e7cc44a..7fdd8dfe 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/impl/RepairProjectServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/impl/RepairProjectServiceImpl.java @@ -36,9 +36,10 @@ public class RepairProjectServiceImpl extends ServiceImpl drw.deleted = 0 - and drw.name = #{entity.name} + and drw.name like concat('%', #{entity.name}, '%') GROUP BY