|
@@ -2432,23 +2432,22 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
.fileNames(new ArrayList<>(deleteFile)).build());
|
|
|
}else{
|
|
|
|
|
|
- // TODO: 2022/3/1 目前需求只保留一个,所以这里先注释掉,sid不同时,不追加
|
|
|
//更新
|
|
|
-// boolean exist = false;
|
|
|
-// for(int i=0;i<boxVideosJson.size();++i){
|
|
|
-// JSONObject ele = boxVideosJson.getJSONObject(i);
|
|
|
-// if(ele.getString("sid").equals(sid)){
|
|
|
-// boxVideosJson.set(i, boxVideo);
|
|
|
-// exist = true;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// //新增
|
|
|
-// if(!exist){
|
|
|
-// boxVideosJson.add(boxVideo);
|
|
|
-// }
|
|
|
-
|
|
|
- boxVideosJson.clear();
|
|
|
+ boolean exist = false;
|
|
|
+ for(int i=0;i<boxVideosJson.size();++i){
|
|
|
+ JSONObject ele = boxVideosJson.getJSONObject(i);
|
|
|
+ if(ele.getString("sid").equals(sid)){
|
|
|
+ boxVideosJson.set(i, boxVideo);
|
|
|
+ exist = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //新增
|
|
|
+ if(!exist){
|
|
|
boxVideosJson.add(boxVideo);
|
|
|
+ }
|
|
|
+
|
|
|
+// boxVideosJson.clear();
|
|
|
+// boxVideosJson.add(boxVideo);
|
|
|
|
|
|
}
|
|
|
if(boxVideosJson.size() != 0){
|