Explorar o código

天网码流修改

gao.qiang hai 1 ano
pai
achega
e78a111ce0

+ 3 - 6
vehicle-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -922,12 +922,9 @@ public class GeoHazardMonitorTokenController {
                 return SM4Utils.encryptData_ECB(JSONObject.toJSONString(jsonObject), key);
             }
             LambdaQueryWrapper<BaseCameraManagement> wrapper = new LambdaQueryWrapper<>();
-            if (!ObjectUtils.isEmpty(cameraVo.getRailwayCode())) {
-                wrapper.eq(BaseCameraManagement::getRailwayCode, cameraVo.getRailwayCode());
-            }
-            if (!ObjectUtils.isEmpty(cameraVo.getLineDir())) {
-                wrapper.eq(BaseCameraManagement::getLineDir, cameraVo.getLineDir());
-            }
+                wrapper.eq(BaseCameraManagement::getRailwayCode, cameraVo.getRailwayCode())
+                        .and(w1 ->w1.eq(BaseCameraManagement::getMonitoringDirection, cameraVo.getLineDir())
+                                .or(w2 -> w2.eq(BaseCameraManagement::getMonitoringDirection, 3)));
             wrapper.eq(BaseCameraManagement::getEnableOrNot, 1);
             wrapper.orderByAsc(BaseCameraManagement::getInstallMile);
             List<BaseCameraManagement> list = baseCameraManagementService.list(wrapper);