Procházet zdrojové kódy

Merge branch 'usky-zyj' into server-165

james před 2 dny
rodič
revize
1cfc49508f

+ 8 - 2
service-eg/service-eg-biz/src/main/java/com/usky/eg/service/impl/EgDeviceServiceImpl.java

@@ -158,7 +158,12 @@ public class EgDeviceServiceImpl extends AbstractCrudService<EgDeviceMapper, EgD
     }
 
     @Override
-    public void update(EgDevice egDevice){
+    public void update(EgDevice egDevice) {
+
+        EgDevice one = this.getById(egDevice.getId());
+        egDevice.setBindFace(one.getBindFace());
+
+
         if(checkNameUnique(egDevice)){
             throw new BusinessException("修改门禁门号设备'"+egDevice.getDeviceId()+","+egDevice.getEgNumber()+"'失败,设备已存在");
         }
@@ -172,9 +177,10 @@ public class EgDeviceServiceImpl extends AbstractCrudService<EgDeviceMapper, EgD
         this.updateById(egDevice);
 
         String[] fids = new String[0];
-        egDeviceMapper.deleteMeetingFaceDevice(egDevice.getId());
         if(Objects.nonNull(egDevice.getBindFace()) || StringUtils.isNotBlank(egDevice.getBindFace())){
             fids = egDevice.getBindFace().split(",");
+
+            egDeviceMapper.deleteMeetingFaceDevice(egDevice.getId());
         }
         if(fids.length > 0){
             for (int i = 0; i < fids.length; i++) {