lyhzzz 1 ano atrás
pai
commit
2c1ea5fe27

+ 0 - 1
src/main/java/com/fdkankan/fusion/service/impl/DownService.java

@@ -132,7 +132,6 @@ public class DownService implements IDownService {
         String deptId = tmDepartmentService.getDeptId();
         TmDepartment tmDepartment = tmDepartmentService.getById(deptId);
         Camera camera = cameraService.getByCameraId(scenePlus.getCameraId());
-
         SceneDownLog sceneDownloadLogEntity = new SceneDownLog();
         sceneDownloadLogEntity.setSceneNum(scenePlus.getNum());
         sceneDownloadLogEntity.setSceneTitle(scenePlus.getTitle());

+ 6 - 1
src/main/java/com/fdkankan/fusion/service/impl/SceneDownLogServiceImpl.java

@@ -76,6 +76,11 @@ public class SceneDownLogServiceImpl extends ServiceImpl<ISceneDownLogMapper, Sc
         wrapper.eq(SceneDownLog::getSceneNum,sceneNum);
         wrapper.eq(SceneDownLog::getStatus,status);
         wrapper.eq(SceneDownLog::getVersion,sceneVersion);
-        return this.getOne(wrapper);
+        wrapper.orderByDesc(SceneDownLog::getId);
+        List<SceneDownLog> list = this.list(wrapper);
+        if(list != null && !list.isEmpty()){
+            return list.get(0);
+        }
+        return null;
     }
 }