diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsController.java index b9328637..fa7487a8 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsController.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.base.entity.RepairRecordsItem; import cn.iocoder.yudao.module.base.service.RepairRecordsItemService; import cn.iocoder.yudao.module.base.service.RepairRecordsService; +import cn.iocoder.yudao.module.base.vo.RepairRecordsPageReqVO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.validation.annotation.Validated; @@ -56,5 +57,16 @@ public class RepairRecordsController { return CommonResult.success(""); } - + /** + * 根据条件查询维修记录 + * + * @author 小李 + * @date 9:48 2024/10/25 + * @param reqVO RepairRecordsPageReqVO实体 + **/ + @GetMapping("/list") + @Operation(summary = "根据条件查询维修记录") + public CommonResult queryList(RepairRecordsPageReqVO reqVO) { + return CommonResult.success(repairRecordsService.queryList(reqVO)); + } } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsItemController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsItemController.java new file mode 100644 index 00000000..e53ae75a --- /dev/null +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsItemController.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.base.controller.admin; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.base.service.RepairRecordsItemService; +import io.swagger.v3.oas.annotations.Operation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@RestController +@RequestMapping("/dl/repair-records-item") +public class RepairRecordsItemController { + + @Resource + private RepairRecordsItemService repairRecordsItemService; + + /** + * 设置图片是否开放给用户 + * + * @author 小李 + * @date 9:53 2024/10/25 + * @param ids 前端选中图片id(多个用“,”分隔) + * @param isOpen 0否1是 + **/ + @GetMapping("/updateOpen") + @Operation(summary = "设置图片是否开放给用户") + public CommonResult updateOpen(@RequestParam("ids") String ids, @RequestParam("isOpen") String isOpen) { + repairRecordsItemService.setRepairOpen(ids, isOpen); + return CommonResult.ok(); + } +} diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsPageReqVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsPageReqVO.java index 638809e4..c9a24298 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsPageReqVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsPageReqVO.java @@ -13,5 +13,4 @@ import lombok.ToString; public class RepairRecordsPageReqVO extends RepairRecords { /**是否开放给用户*/ private String isOpen; - }