gao.qiang hai 1 ano
pai
achega
a76725fb4b

+ 3 - 1
business-service/src/main/java/com/ozs/service/impl/BaseCameraManagementServiceImpl.java

@@ -401,7 +401,7 @@ public class BaseCameraManagementServiceImpl extends ServiceImpl<BaseCameraManag
                 camera.eq(BaseCameraManagement::getLineDir, msgAlarm.getLineDir());
                 camera.eq(BaseCameraManagement::getRailwayCode, msgAlarm.getRailwayCode());
                 camera.eq(BaseCameraManagement::getOnline, 2);
-                camera.eq(BaseCameraManagement::getEnableOrNot, 1);
+                camera.like(BaseCameraManagement::getEnableOrNot, 1);
                 if (StringUtils.isNotEmpty(cameraCode)){
                     wrapper.eq("camera_code", cameraCode);
                 }
@@ -423,6 +423,8 @@ public class BaseCameraManagementServiceImpl extends ServiceImpl<BaseCameraManag
         camera.eq(BaseCameraManagement::getRailwayCode, baseVehicleTerminalDto.getRailwayCode());
         camera.eq(BaseCameraManagement::getOnline, 2);
         camera.eq(BaseCameraManagement::getEnableOrNot, 1);
+        camera.orderByDesc(BaseCameraManagement::getCreateTime);
+        camera.last("limit 4");
         List<BaseCameraManagement> baseCameraManagementList = this.list(camera);
         if (!ObjectUtils.isEmpty(baseCameraManagementList)) {
             List<BaseCameraManagement> list = new ArrayList<>(baseCameraManagementList);