From a4047b6048ebfe09e66a765b58ea12b5bd0e2e6e Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期一, 28 十一月 2022 16:18:10 +0800 Subject: [PATCH] 店铺管理优化 --- ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java index 313cac6..1393455 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java @@ -1,15 +1,19 @@ package com.ycl.controller.cockpit.aiIot; import com.ycl.api.CommonResult; +import com.ycl.util.CheckApiUtil; import com.ycl.vo.cockpit.CockpitVO; import com.ycl.vo.cockpit.aiIot.AIIotVO; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import org.springframework.validation.annotation.Validated; 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; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.ArrayList; @@ -25,9 +29,13 @@ @RequestMapping("/api/lot") public class AIIotController { + @Resource + private CheckApiUtil checkApiUtil; + @ApiOperation(value = "鐩戞祴鏁版嵁") @GetMapping("/detection") - public CommonResult<AIIotVO.DetectionVO> detection(@Validated CockpitVO.Params1VO params) { + public CommonResult<AIIotVO.DetectionVO> detection(@Validated CockpitVO params) { + checkApiUtil.cockpit(params); AIIotVO.DetectionVO detectionVO = new AIIotVO.DetectionVO(); detectionVO.setVideo(121); detectionVO.setIndividual(20); @@ -39,7 +47,8 @@ @ApiOperation(value = "瀹炴椂瑙嗛鐩戞帶") @GetMapping("/video") - public CommonResult<List<AIIotVO.VideoVO>> video(@Validated CockpitVO.Params1VO params) { + public CommonResult<List<AIIotVO.VideoVO>> video(@Validated CockpitVO params) { + checkApiUtil.cockpit(params); List<AIIotVO.VideoVO> videoVOS = new ArrayList<>(); AIIotVO.VideoVO a = null; for (int i = 0; i < 4; i++) { @@ -59,7 +68,8 @@ @ApiOperation(value = "AI绠楁硶鏁堣兘") @GetMapping("/efficiency") - public CommonResult<List<AIIotVO.EfficiencyVO>> efficiency(@Validated CockpitVO.Params2VO params) { + public CommonResult<List<AIIotVO.EfficiencyVO>> efficiency(@Validated CockpitVO params) { + checkApiUtil.cockpit(params); List<AIIotVO.EfficiencyVO> efficiencyVOS = new ArrayList<>(); AIIotVO.EfficiencyVO a = null; for (int i = 0; i < 4; i++) { @@ -74,7 +84,8 @@ @ApiOperation(value = "娓e湡鑱斿姩") @GetMapping("/slag_car") - public CommonResult<AIIotVO.SlagCarVO> slagCar(@Validated CockpitVO.Params1VO params) { + public CommonResult<AIIotVO.SlagCarVO> slagCar(@Validated CockpitVO params) { + checkApiUtil.cockpit(params); AIIotVO.SlagCarVO slagCarVO = new AIIotVO.SlagCarVO(); slagCarVO.setCar(236); slagCarVO.setTeam(20); @@ -83,7 +94,8 @@ @ApiOperation(value = "AI浜嬩欢缁熻") @GetMapping("/event_statistics") - public CommonResult<List<AIIotVO.StatisticsVO>> statistics(@Validated CockpitVO.Params2VO params) { + public CommonResult<List<AIIotVO.StatisticsVO>> statistics(@Validated CockpitVO params) { + checkApiUtil.cockpit(params); List<AIIotVO.StatisticsVO> statisticsVOS = new ArrayList<>(); List<AIIotVO.Statistics1VO> statistics1VOS = new ArrayList<>(); AIIotVO.StatisticsVO a = null; -- Gitblit v1.8.0