|
@@ -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();
|