Browse Source

计算优先级配置接口,设置接口

lyhzzz 1 year ago
parent
commit
6f4b633cd6

+ 8 - 8
src/main/java/com/fdkankan/manage/controller/MqQueueConfigController.java

@@ -43,19 +43,19 @@ public class MqQueueConfigController {
     @Autowired
     @Autowired
     IMqNumLevelService mqNumLevelService;
     IMqNumLevelService mqNumLevelService;
 
 
-    @GetMapping("/getInfo")
-    public ResultData getInfo(@RequestParam(required = false) String num ,@RequestParam(required = false) Long cameraId){
-        if(StringUtils.isBlank(num) && cameraId == null){
+    @PostMapping("/getInfo")
+    public ResultData getInfo(@RequestBody ModelingLevelParam param){
+        if( param.getCameraId() == null && StringUtils.isBlank(param.getNum())){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
         }
-        if(StringUtils.isNotBlank(num)){
-            MqNumLevel byNum = mqNumLevelService.getByNum(num);
+        if(StringUtils.isNotBlank(param.getNum())){
+            MqNumLevel byNum = mqNumLevelService.getByNum(param.getNum());
             if(byNum != null){
             if(byNum != null){
                 return ResultData.ok(queueConfigService.getById(byNum.getQueueConfigId()));
                 return ResultData.ok(queueConfigService.getById(byNum.getQueueConfigId()));
             }
             }
         }
         }
-        if(cameraId != null){
-            MqCameraLevel byCameraId = mqCameraLevelService.getByCameraId(cameraId);
+        if(param.getCameraId() != null){
+            MqCameraLevel byCameraId = mqCameraLevelService.getByCameraId(param.getCameraId());
             if(byCameraId != null){
             if(byCameraId != null){
                 return ResultData.ok(queueConfigService.getById(byCameraId.getQueueConfigId()));
                 return ResultData.ok(queueConfigService.getById(byCameraId.getQueueConfigId()));
             }
             }
@@ -68,7 +68,7 @@ public class MqQueueConfigController {
      */
      */
     @PostMapping("/updateModelingLevel")
     @PostMapping("/updateModelingLevel")
     public ResultData updateModelingLevel(@RequestBody ModelingLevelParam param){
     public ResultData updateModelingLevel(@RequestBody ModelingLevelParam param){
-        if(param.getConfigId() == null && (param.getCameraId() == null || StringUtils.isBlank(param.getNum()))){
+        if(param.getConfigId() == null && (param.getCameraId() == null && StringUtils.isBlank(param.getNum()))){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
         }
         if(param.getCameraId() != null){
         if(param.getCameraId() != null){