|
@@ -9,6 +9,7 @@ import com.fdkankan.common.exception.BusinessException;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
import com.fdkankan.common.util.SnowflakeIdGenerator;
|
|
import com.fdkankan.common.util.SnowflakeIdGenerator;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
|
+import com.fdkankan.ucenter.common.RedisKeyUtil;
|
|
import com.fdkankan.ucenter.common.constants.ResultCode;
|
|
import com.fdkankan.ucenter.common.constants.ResultCode;
|
|
import com.fdkankan.ucenter.entity.SceneResource;
|
|
import com.fdkankan.ucenter.entity.SceneResource;
|
|
import com.fdkankan.ucenter.service.IScene3dNumService;
|
|
import com.fdkankan.ucenter.service.IScene3dNumService;
|
|
@@ -148,11 +149,11 @@ public class SceneCommonService {
|
|
com.fdkankan.ucenter.util.FileUtil.writeFile(localPath,newJson);
|
|
com.fdkankan.ucenter.util.FileUtil.writeFile(localPath,newJson);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
if("v4".equals(sceneVersion)){
|
|
if("v4".equals(sceneVersion)){
|
|
JSONObject jsonObject = JSONObject.parseObject(newJson);
|
|
JSONObject jsonObject = JSONObject.parseObject(newJson);
|
|
jsonObject.put("title",newSceneName);
|
|
jsonObject.put("title",newSceneName);
|
|
|
|
+ jsonObject.put("dynamicPanel",0);
|
|
com.fdkankan.ucenter.util.FileUtil.writeFile(localPath,jsonObject.toJSONString());
|
|
com.fdkankan.ucenter.util.FileUtil.writeFile(localPath,jsonObject.toJSONString());
|
|
|
|
|
|
String sceneJsonPath = String.format(SceneResourcePath.DATA_VIEW_PATH+"/" + fileName, newNum);
|
|
String sceneJsonPath = String.format(SceneResourcePath.DATA_VIEW_PATH+"/" + fileName, newNum);
|
|
@@ -169,6 +170,15 @@ public class SceneCommonService {
|
|
fYunFileServiceInterface.deleteFile(oldName);
|
|
fYunFileServiceInterface.deleteFile(oldName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ String dynamicViewPath = String.format(SceneResourcePath.DYNAMIC_VIEW_PATH, newNum);
|
|
|
|
+ String dynamicEditPath = String.format(SceneResourcePath.DYNAMIC_EDIT_PATH, newNum);
|
|
|
|
+ if(fYunFileServiceInterface.fileExist(dynamicViewPath)){
|
|
|
|
+ fYunFileServiceInterface.deleteFile(dynamicViewPath);
|
|
|
|
+ }
|
|
|
|
+ if(fYunFileServiceInterface.fileExist(dynamicEditPath)){
|
|
|
|
+ fYunFileServiceInterface.deleteFile(dynamicEditPath);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
log.error("writeFile-error:{}",e);
|
|
log.error("writeFile-error:{}",e);
|