From 599d076ba86b98c1c47a17c1ebaa57619ec26150 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期四, 18 四月 2024 11:51:00 +0800 Subject: [PATCH] 阈值详情、字段修改 --- ycl-server/src/main/java/com/ycl/platform/controller/YwThresholdController.java | 69 +++++++++++++++++++++++++--------- 1 files changed, 51 insertions(+), 18 deletions(-) diff --git a/ycl-server/src/main/java/com/ycl/platform/controller/YwThresholdController.java b/ycl-server/src/main/java/com/ycl/platform/controller/YwThresholdController.java index 526fa72..8feb6f7 100644 --- a/ycl-server/src/main/java/com/ycl/platform/controller/YwThresholdController.java +++ b/ycl-server/src/main/java/com/ycl/platform/controller/YwThresholdController.java @@ -2,14 +2,19 @@ import annotation.Log; import com.ycl.platform.domain.entity.YwThreshold; +import com.ycl.platform.domain.form.CarThresholdForm; +import com.ycl.platform.domain.form.FaceThresholdForm; +import com.ycl.platform.domain.form.VideoThresholdForm; import com.ycl.platform.service.IYwThresholdService; import com.ycl.system.AjaxResult; import com.ycl.system.controller.BaseController; +import com.ycl.system.domain.group.Update; import com.ycl.system.page.TableDataInfo; import com.ycl.utils.poi.ExcelUtil; import enumeration.BusinessType; import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -21,7 +26,7 @@ * @date 2024-03-25 */ @RestController -@RequestMapping("/ycl/threshold") +@RequestMapping("/threshold") public class YwThresholdController extends BaseController { @Autowired private IYwThresholdService ywThresholdService; @@ -59,32 +64,60 @@ } /** - * 鏂板杩愮淮闃堝�� + * 鑾峰彇浜鸿劯閰嶇疆 */ - // @PreAuthorize("@ss.hasPermi('ycl:threshold:add')") - @Log(title = "杩愮淮闃堝��", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody YwThreshold ywThreshold) { - return toAjax(ywThresholdService.insertYwThreshold(ywThreshold)); + // @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") + @GetMapping(value = "/face/{id}") + public AjaxResult getFace(@PathVariable("id") Integer id) { + return success(ywThresholdService.getFace(id)); } /** - * 淇敼杩愮淮闃堝�� + * 鑾峰彇杞﹁締閰嶇疆 + */ + // @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") + @GetMapping(value = "/car/{id}") + public AjaxResult getCar(@PathVariable("id") Integer id) { + return success(ywThresholdService.getCar(id)); + } + + /** + * 鑾峰彇瑙嗛閰嶇疆 + */ + // @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") + @GetMapping(value = "/video/{id}") + public AjaxResult getVideo(@PathVariable("id") Integer id) { + return success(ywThresholdService.getVideo(id)); + } + + /** + * 淇敼浜鸿劯闃堝�� */ // @PreAuthorize("@ss.hasPermi('ycl:threshold:edit')") - @Log(title = "杩愮淮闃堝��", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody YwThreshold ywThreshold) { - return toAjax(ywThresholdService.updateYwThreshold(ywThreshold)); + @Log(title = "淇敼浜鸿劯杩愮淮闃堝��", businessType = BusinessType.UPDATE) + @PutMapping("/face") + public AjaxResult editFace(@RequestBody @Validated FaceThresholdForm form) { + return toAjax(ywThresholdService.editFace(form)); } /** - * 鍒犻櫎杩愮淮闃堝�� + * 淇敼杞﹁締闃堝�� */ - // @PreAuthorize("@ss.hasPermi('ycl:threshold:remove')") - @Log(title = "杩愮淮闃堝��", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Integer[] ids) { - return toAjax(ywThresholdService.deleteYwThresholdByIds(ids)); + // @PreAuthorize("@ss.hasPermi('ycl:threshold:edit')") + @Log(title = "淇敼杞﹁締闃堝��", businessType = BusinessType.UPDATE) + @PutMapping("/car") + public AjaxResult editCar(@RequestBody @Validated CarThresholdForm form) { + return toAjax(ywThresholdService.editCar(form)); } + + /** + * 淇敼瑙嗛闃堝�� + */ + // @PreAuthorize("@ss.hasPermi('ycl:threshold:edit')") + @Log(title = "淇敼瑙嗛闃堝��", businessType = BusinessType.UPDATE) + @PutMapping("/video") + public AjaxResult editVideo(@RequestBody @Validated VideoThresholdForm form) { + return toAjax(ywThresholdService.editVideo(form)); + } + } -- Gitblit v1.8.0