Explorar o código

根据sid查询监控记录增加场景码条件

dengsixing %!s(int64=2) %!d(string=hai) anos
pai
achega
0439ce41ef

+ 1 - 1
src/main/java/com/fdkankan/scene/service/ISurveillanceService.java

@@ -24,6 +24,6 @@ public interface ISurveillanceService extends IService<Surveillance> {
 
     List<SurveillanceVO> listSurveillance(String num);
 
-    Surveillance getBySid(String sid);
+    Surveillance getBySid(String num, String sid);
 
 }

+ 3 - 3
src/main/java/com/fdkankan/scene/service/impl/SurveillanceServiceImpl.java

@@ -49,7 +49,7 @@ public class SurveillanceServiceImpl extends ServiceImpl<ISurveillanceMapper, Su
         }
         SceneEditInfoExt sceneEditInfoExt = sceneEditInfoExtService.getByScenePlusId(scenePlus.getId());
 
-        Surveillance surveillance = this.getBySid(param.getSid());
+        Surveillance surveillance = this.getBySid(param.getNum(), param.getSid());
         if(Objects.isNull(surveillance)){
             surveillance = new Surveillance();
         }
@@ -100,8 +100,8 @@ public class SurveillanceServiceImpl extends ServiceImpl<ISurveillanceMapper, Su
     }
 
     @Override
-    public Surveillance getBySid(String sid) {
-        return this.getOne(new LambdaQueryWrapper<Surveillance>().eq(Surveillance::getSid, sid));
+    public Surveillance getBySid(String num, String sid) {
+        return this.getOne(new LambdaQueryWrapper<Surveillance>().eq(Surveillance::getSid, sid).eq(Surveillance::getNum, num));
     }
 
 }