浏览代码

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

lyhzzz 1 年之前
父节点
当前提交
6f4b633cd6
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      src/main/java/com/fdkankan/manage/controller/MqQueueConfigController.java

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

@@ -43,19 +43,19 @@ public class MqQueueConfigController {
     @Autowired
     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);
         }
-        if(StringUtils.isNotBlank(num)){
-            MqNumLevel byNum = mqNumLevelService.getByNum(num);
+        if(StringUtils.isNotBlank(param.getNum())){
+            MqNumLevel byNum = mqNumLevelService.getByNum(param.getNum());
             if(byNum != null){
                 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){
                 return ResultData.ok(queueConfigService.getById(byCameraId.getQueueConfigId()));
             }
@@ -68,7 +68,7 @@ public class MqQueueConfigController {
      */
     @PostMapping("/updateModelingLevel")
     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);
         }
         if(param.getCameraId() != null){