瀏覽代碼

入库格式错误

lyhzzz 2 年之前
父節點
當前提交
c9c12760b5
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main/java/com/fdkankan/manage/service/impl/CameraServiceImpl.java

+ 2 - 2
src/main/java/com/fdkankan/manage/service/impl/CameraServiceImpl.java

@@ -116,13 +116,13 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
         }
         }
         saveBatchCamera(Collections.singletonList(wifiName));
         saveBatchCamera(Collections.singletonList(wifiName));
     }
     }
-    
+
     private Integer saveBatchCamera(List<String> wifiNameList){
     private Integer saveBatchCamera(List<String> wifiNameList){
         HashSet<String> wifiNameSet = new HashSet<>(wifiNameList);
         HashSet<String> wifiNameSet = new HashSet<>(wifiNameList);
         List<Camera> cameraList = new ArrayList<>();
         List<Camera> cameraList = new ArrayList<>();
         for (String wifiName : wifiNameSet) {
         for (String wifiName : wifiNameSet) {
             String[] res = wifiName.split("_");
             String[] res = wifiName.split("_");
-            if(res.length !=2 && StringUtils.isBlank(res[1])){
+            if(res.length !=2 || StringUtils.isBlank(res[1])){
                 throw new BusinessException(ResultCode.WIFI_NAME_ERROR);
                 throw new BusinessException(ResultCode.WIFI_NAME_ERROR);
             }
             }
             Camera camera = new Camera();
             Camera camera = new Camera();