|
@@ -24,7 +24,6 @@ import com.fdkankan.scene.vo.SceneProVO;
|
|
import com.fdkankan.scene.vo.SceneVO;
|
|
import com.fdkankan.scene.vo.SceneVO;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import net.coobird.thumbnailator.Thumbnails;
|
|
import net.coobird.thumbnailator.Thumbnails;
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.joda.time.DateTime;
|
|
import org.joda.time.DateTime;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -35,6 +34,7 @@ import org.springframework.util.ObjectUtils;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
|
|
+import java.io.IOException;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -182,7 +182,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData resetUploadFloorJson(SceneEditVO sceneEdit) throws Exception{
|
|
public ResultData resetUploadFloorJson(SceneEditVO sceneEdit) throws Exception{
|
|
- if(StringUtils.isEmpty(sceneEdit.getSceneNum())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneEdit.getSceneNum())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -206,7 +206,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
}else {
|
|
}else {
|
|
new File(dataBuffer.toString() + "scene.json").createNewFile();
|
|
new File(dataBuffer.toString() + "scene.json").createNewFile();
|
|
}
|
|
}
|
|
- if(!StringUtils.isEmpty(sceneEdit.getSceneData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(sceneEdit.getSceneData())){
|
|
JSONObject sceneObject = JSONObject.parseObject(sceneEdit.getSceneData());
|
|
JSONObject sceneObject = JSONObject.parseObject(sceneEdit.getSceneData());
|
|
Set<String> set =sceneObject.keySet();
|
|
Set<String> set =sceneObject.keySet();
|
|
|
|
|
|
@@ -248,7 +248,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
long start = System.currentTimeMillis();
|
|
long start = System.currentTimeMillis();
|
|
log.info("画墙重建模型开始时间:" + start);
|
|
log.info("画墙重建模型开始时间:" + start);
|
|
- if(StringUtils.isEmpty(sceneEdit.getSceneNum())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneEdit.getSceneNum())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -272,7 +272,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
}else {
|
|
}else {
|
|
new File(ConstantFilePath.SCENE_PATH + "data" + File.separator + "data" + sceneEdit.getSceneNum() + File.separator + "scene.json").createNewFile();
|
|
new File(ConstantFilePath.SCENE_PATH + "data" + File.separator + "data" + sceneEdit.getSceneNum() + File.separator + "scene.json").createNewFile();
|
|
}
|
|
}
|
|
- if(!StringUtils.isEmpty(sceneEdit.getSceneData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(sceneEdit.getSceneData())){
|
|
JSONObject sceneObject = JSONObject.parseObject(sceneEdit.getSceneData());
|
|
JSONObject sceneObject = JSONObject.parseObject(sceneEdit.getSceneData());
|
|
Set<String> set =sceneObject.keySet();
|
|
Set<String> set =sceneObject.keySet();
|
|
|
|
|
|
@@ -282,7 +282,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
}
|
|
}
|
|
|
|
|
|
//保存floor.json前端下次进入需要使用
|
|
//保存floor.json前端下次进入需要使用
|
|
- if(StringUtils.isEmpty(sceneEdit.getWebFloor())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneEdit.getWebFloor())){
|
|
sceneEdit.setWebFloor(sceneEdit.getFloor());
|
|
sceneEdit.setWebFloor(sceneEdit.getFloor());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -482,7 +482,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -652,8 +652,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData addHotMediaInfo(SceneEditVO base) throws Exception{
|
|
public ResultData addHotMediaInfo(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getType()) ||
|
|
|
|
- StringUtils.isEmpty(base.getInfo())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum()) || StrUtil.isEmpty(base.getType()) ||
|
|
|
|
+ StrUtil.isEmpty(base.getInfo())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -699,8 +699,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData saveScreencapFile(SceneEditVO base) throws Exception{
|
|
public ResultData saveScreencapFile(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getIndex()) ||
|
|
|
|
- StringUtils.isEmpty(base.getCamerasData())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum()) || StrUtil.isEmpty(base.getIndex()) ||
|
|
|
|
+ StrUtil.isEmpty(base.getCamerasData())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -756,7 +756,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData saveSceneKey(SceneEditVO base) throws Exception{
|
|
public ResultData saveSceneKey(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getSceneKey())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum()) || StrUtil.isEmpty(base.getSceneKey())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -777,7 +777,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData saveFloorLogo(SceneEditVO base) throws Exception{
|
|
public ResultData saveFloorLogo(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getSize()) ||
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum()) || StrUtil.isEmpty(base.getSize()) ||
|
|
StrUtil.isEmpty(base.getLogoType())){
|
|
StrUtil.isEmpty(base.getLogoType())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
@@ -810,7 +810,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData saveBackgroundMusic(SceneEditVO base) throws Exception{
|
|
public ResultData saveBackgroundMusic(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getMusicName())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum()) || StrUtil.isEmpty(base.getMusicName())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -841,7 +841,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData saveInitialPage(SceneEditVO base) throws Exception{
|
|
public ResultData saveInitialPage(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getInitialPoint())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum()) || StrUtil.isEmpty(base.getInitialPoint())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -886,7 +886,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData getScreencapVoice(SceneEditVO base) throws Exception{
|
|
public ResultData getScreencapVoice(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -931,7 +931,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadScreencapVoiceNew(String sceneNum, String type, String fileName, MultipartFile file, String length, String replace) throws Exception{
|
|
public ResultData uploadScreencapVoiceNew(String sceneNum, String type, String fileName, MultipartFile file, String length, String replace) throws Exception{
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -963,7 +963,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
}
|
|
}
|
|
if("soundsync".equals(type) && !"1".equals(replace)){
|
|
if("soundsync".equals(type) && !"1".equals(replace)){
|
|
synchronized(this){
|
|
synchronized(this){
|
|
- if(scenejson.containsKey("screencapVoiceSoundsync") && !StringUtils.isEmpty(scenejson.getString("screencapVoiceSoundsync"))){
|
|
|
|
|
|
+ if(scenejson.containsKey("screencapVoiceSoundsync") && !StrUtil.isEmpty(scenejson.getString("screencapVoiceSoundsync"))){
|
|
String target = ConstantFilePath.SCENE_PATH + scenejson.getString("screencapVoiceSoundsync").substring(
|
|
String target = ConstantFilePath.SCENE_PATH + scenejson.getString("screencapVoiceSoundsync").substring(
|
|
scenejson.getString("screencapVoiceSoundsync").indexOf("voice"));
|
|
scenejson.getString("screencapVoiceSoundsync").indexOf("voice"));
|
|
|
|
|
|
@@ -1098,7 +1098,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
}
|
|
}
|
|
|
|
|
|
FileUtils.changeVoiceToMp3(path + File.separator + name, path + File.separator +"201810.mp3");
|
|
FileUtils.changeVoiceToMp3(path + File.separator + name, path + File.separator +"201810.mp3");
|
|
- if(StringUtils.isEmpty(fileName)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(fileName)){
|
|
map.put("screencapVoiceFileName", originalFileName + ".mp3");
|
|
map.put("screencapVoiceFileName", originalFileName + ".mp3");
|
|
}else {
|
|
}else {
|
|
map.put("screencapVoiceFileName", fileName);
|
|
map.put("screencapVoiceFileName", fileName);
|
|
@@ -1114,7 +1114,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadScreencapVoiceNewV3(String sceneNum, String type, String fileName, MultipartFile file, String length, String replace, String times, String index) throws Exception{
|
|
public ResultData uploadScreencapVoiceNewV3(String sceneNum, String type, String fileName, MultipartFile file, String length, String replace, String times, String index) throws Exception{
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1247,7 +1247,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData deleteScreencapVoicePart(String sceneNum, String fileName, String times, String index) throws Exception {
|
|
public ResultData deleteScreencapVoicePart(String sceneNum, String fileName, String times, String index) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1338,7 +1338,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData deleteScreencapVoice(SceneEditVO base) throws Exception{
|
|
public ResultData deleteScreencapVoice(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1400,7 +1400,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData deleteScreencap(SceneEditVO base) throws Exception{
|
|
public ResultData deleteScreencap(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1463,8 +1463,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData saveTourList(SceneEditVO base) throws Exception{
|
|
public ResultData saveTourList(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getTourList()) ||
|
|
|
|
- StringUtils.isEmpty(base.getScreencapLen())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum()) || StrUtil.isEmpty(base.getTourList()) ||
|
|
|
|
+ StrUtil.isEmpty(base.getScreencapLen())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1500,7 +1500,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData saveSceneInfo(SceneEditVO base) throws Exception{
|
|
public ResultData saveSceneInfo(SceneEditVO base) throws Exception{
|
|
- if(StringUtils.isEmpty(base.getSceneNum())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1534,48 +1534,10 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
Map<String,String> map = new HashMap<>();
|
|
Map<String,String> map = new HashMap<>();
|
|
|
|
|
|
SceneProEdit sceneProEdit = sceneProEditService.findByProId(scenePro.getId());
|
|
SceneProEdit sceneProEdit = sceneProEditService.findByProId(scenePro.getId());
|
|
- SceneProEditExt sceneProEditExt = sceneProEditExtService.getOne(
|
|
|
|
- new QueryWrapper<SceneProEditExt>().eq("pro_edit_id", sceneProEdit.getId()));
|
|
|
|
-
|
|
|
|
- if(!StringUtils.isEmpty(base.getTourList())){
|
|
|
|
- if(scenejson.containsKey("uploadTourList") && scenejson.getIntValue("uploadTourList") == 1){
|
|
|
|
- int screencapLen = 0;
|
|
|
|
- File file = new File(dataBuffer.toString() + ConstantFileName.TOURLIST_FOLDER);
|
|
|
|
- String[] strs = file.list();
|
|
|
|
- if(strs!=null) {
|
|
|
|
- for(int i=0;i<strs.length;++i) {
|
|
|
|
- if(strs[i].indexOf(ConstantFileName.SCREEN_CRP_DATAFILE)>-1)
|
|
|
|
- {
|
|
|
|
- ++screencapLen;
|
|
|
|
- map.put(dataBuffer.toString() + ConstantFileName.TOURLIST_FOLDER+File.separator+strs[i],
|
|
|
|
- "data/data"+base.getSceneNum()+"/tour/"+strs[i]);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- scenejson.put("screencapLen", screencapLen);
|
|
|
|
-// sceneProEdit.setScreencapLen(screencapLen);
|
|
|
|
-
|
|
|
|
- String path = imagesBuffer.toString() + ConstantFileName.TOURLIST_FOLDER;
|
|
|
|
- JSONArray tourJsons = JSONArray.parseArray(base.getTourList());
|
|
|
|
- for(int i=0;i<tourJsons.size();++i) {
|
|
|
|
- String fileName = path + File.separator +"guide"+i+".jpg";
|
|
|
|
- map.put(fileName,"images/images"+base.getSceneNum()+"/tour/guide"+i+".jpg");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- scenejson.put("uploadTourList", 0);
|
|
|
|
- }
|
|
|
|
|
|
+ SceneProEditExt sceneProEditExt = sceneProEditExtService.getByProEditId(sceneProEdit.getId());
|
|
|
|
|
|
- String tourListPath = dataBuffer.toString() + ConstantFileName.TOUR_LIST;
|
|
|
|
- FileUtils.deleteFile(tourListPath);
|
|
|
|
- FileUtils.writeFile(tourListPath, base.getTourList());
|
|
|
|
- map.put(tourListPath, dataBuffer.toString() + ConstantFileName.TOUR_LIST);
|
|
|
|
- }
|
|
|
|
- else{
|
|
|
|
- if(scenejson.containsKey("uploadTourList") && scenejson.getIntValue("uploadTourList") == 1){
|
|
|
|
- scenejson.put("uploadTourList", 0);
|
|
|
|
- }
|
|
|
|
- scenejson.put("screencapLen", 0);
|
|
|
|
- }
|
|
|
|
|
|
+ //处理漫游数据
|
|
|
|
+ this.dealTour(base, scenejson, map, dataBuffer, imagesBuffer);
|
|
|
|
|
|
//判断scene.json是否有uploadVoiceSrc上传普通版音频
|
|
//判断scene.json是否有uploadVoiceSrc上传普通版音频
|
|
if(scenejson.containsKey("uploadVoiceSrc") && scenejson.getIntValue("uploadVoiceSrc") == 1) {
|
|
if(scenejson.containsKey("uploadVoiceSrc") && scenejson.getIntValue("uploadVoiceSrc") == 1) {
|
|
@@ -1598,14 +1560,14 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
//判断scene.json是否有uploadVoiceSound上传专业版音频
|
|
//判断scene.json是否有uploadVoiceSound上传专业版音频
|
|
if(scenejson.containsKey("uploadVoiceSound") && scenejson.getIntValue("uploadVoiceSound") == 1){
|
|
if(scenejson.containsKey("uploadVoiceSound") && scenejson.getIntValue("uploadVoiceSound") == 1){
|
|
- if(!StringUtils.isEmpty(scenejson.getString("screencapVoiceSound"))){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(scenejson.getString("screencapVoiceSound"))){
|
|
map.put(ConstantFilePath.SCENE_PATH + scenejson.getString("screencapVoiceSound"), scenejson.getString("screencapVoiceSound"));
|
|
map.put(ConstantFilePath.SCENE_PATH + scenejson.getString("screencapVoiceSound"), scenejson.getString("screencapVoiceSound"));
|
|
}
|
|
}
|
|
sceneProEdit.setScreencapVoiceSound(scenejson.getString("screencapVoiceSound"));
|
|
sceneProEdit.setScreencapVoiceSound(scenejson.getString("screencapVoiceSound"));
|
|
}
|
|
}
|
|
|
|
|
|
if(scenejson.containsKey("uploadVoiceSoundsync") && scenejson.getIntValue("uploadVoiceSoundsync") == 1){
|
|
if(scenejson.containsKey("uploadVoiceSoundsync") && scenejson.getIntValue("uploadVoiceSoundsync") == 1){
|
|
- if(!StringUtils.isEmpty(scenejson.getString("screencapVoiceSoundsync"))){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(scenejson.getString("screencapVoiceSoundsync"))){
|
|
map.put(ConstantFilePath.SCENE_PATH + scenejson.getString("screencapVoiceSoundsync"), scenejson.getString("screencapVoiceSoundsync"));
|
|
map.put(ConstantFilePath.SCENE_PATH + scenejson.getString("screencapVoiceSoundsync"), scenejson.getString("screencapVoiceSoundsync"));
|
|
}
|
|
}
|
|
sceneProEdit.setScreencapVoiceSoundsync(scenejson.getString("screencapVoiceSoundsync"));
|
|
sceneProEdit.setScreencapVoiceSoundsync(scenejson.getString("screencapVoiceSoundsync"));
|
|
@@ -1616,76 +1578,76 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
sceneProEdit.setScreencapVoiceType(base.getScreencapVoiceType());
|
|
sceneProEdit.setScreencapVoiceType(base.getScreencapVoiceType());
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getCapData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getCapData())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "capData.json", new String(base.getCapData().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "capData.json", new String(base.getCapData().getBytes(), "UTF-8"));
|
|
scenejson.put("capData", dataBuf.toString() + "capData.json");
|
|
scenejson.put("capData", dataBuf.toString() + "capData.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getFrameData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getFrameData())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "frameData.json", new String(base.getFrameData().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "frameData.json", new String(base.getFrameData().getBytes(), "UTF-8"));
|
|
scenejson.put("frameData", dataBuf.toString() + "frameData.json");
|
|
scenejson.put("frameData", dataBuf.toString() + "frameData.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getPlayData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getPlayData())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "playData.json", new String(base.getPlayData().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "playData.json", new String(base.getPlayData().getBytes(), "UTF-8"));
|
|
scenejson.put("playData", dataBuf.toString() + "playData.json");
|
|
scenejson.put("playData", dataBuf.toString() + "playData.json");
|
|
sceneProEdit.setPlayData(dataBuf.toString() + "playData.json");
|
|
sceneProEdit.setPlayData(dataBuf.toString() + "playData.json");
|
|
map.put(dataBuffer.toString() + "playData.json", dataBuf.toString() + "playData.json");
|
|
map.put(dataBuffer.toString() + "playData.json", dataBuf.toString() + "playData.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getScreencapThumb())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getScreencapThumb())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "screencapThumb.json", new String(base.getScreencapThumb().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "screencapThumb.json", new String(base.getScreencapThumb().getBytes(), "UTF-8"));
|
|
scenejson.put("screencapThumb", dataBuf.toString() + "screencapThumb.json");
|
|
scenejson.put("screencapThumb", dataBuf.toString() + "screencapThumb.json");
|
|
sceneProEdit.setScreencapThumb(dataBuf.toString() + "screencapThumb.json");
|
|
sceneProEdit.setScreencapThumb(dataBuf.toString() + "screencapThumb.json");
|
|
map.put(dataBuffer.toString() + "screencapThumb.json", dataBuf.toString() + "screencapThumb.json");
|
|
map.put(dataBuffer.toString() + "screencapThumb.json", dataBuf.toString() + "screencapThumb.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getRecordType())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getRecordType())){
|
|
scenejson.put("recordType", base.getRecordType());
|
|
scenejson.put("recordType", base.getRecordType());
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getMapVisi())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getMapVisi())){
|
|
scenejson.put("mapVisi", Integer.parseInt(base.getMapVisi()));
|
|
scenejson.put("mapVisi", Integer.parseInt(base.getMapVisi()));
|
|
sceneProEditExt.setMapVisi(Integer.parseInt(base.getMapVisi()));
|
|
sceneProEditExt.setMapVisi(Integer.parseInt(base.getMapVisi()));
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getTourVisi())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getTourVisi())){
|
|
scenejson.put("tourVisi", Integer.parseInt(base.getTourVisi()));
|
|
scenejson.put("tourVisi", Integer.parseInt(base.getTourVisi()));
|
|
sceneProEditExt.setTourVisi(Integer.parseInt(base.getTourVisi()));
|
|
sceneProEditExt.setTourVisi(Integer.parseInt(base.getTourVisi()));
|
|
}
|
|
}
|
|
- if(!StringUtils.isEmpty(base.getVrVisi())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getVrVisi())){
|
|
scenejson.put("vrVisi", Integer.parseInt(base.getVrVisi()));
|
|
scenejson.put("vrVisi", Integer.parseInt(base.getVrVisi()));
|
|
sceneProEditExt.setVrVisi(Integer.parseInt(base.getVrVisi()));
|
|
sceneProEditExt.setVrVisi(Integer.parseInt(base.getVrVisi()));
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getRulerVisi())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getRulerVisi())){
|
|
scenejson.put("rulerVisi", Integer.parseInt(base.getRulerVisi()));
|
|
scenejson.put("rulerVisi", Integer.parseInt(base.getRulerVisi()));
|
|
sceneProEditExt.setRulerVisi(Integer.parseInt(base.getRulerVisi()));
|
|
sceneProEditExt.setRulerVisi(Integer.parseInt(base.getRulerVisi()));
|
|
}
|
|
}
|
|
- if(!StringUtils.isEmpty(base.getCadImgVisi())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getCadImgVisi())){
|
|
scenejson.put("cadImgVisi", Integer.parseInt(base.getCadImgVisi()));
|
|
scenejson.put("cadImgVisi", Integer.parseInt(base.getCadImgVisi()));
|
|
sceneProEditExt.setCadImgVisi(Integer.parseInt(base.getCadImgVisi()));
|
|
sceneProEditExt.setCadImgVisi(Integer.parseInt(base.getCadImgVisi()));
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getPanoVisi())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getPanoVisi())){
|
|
scenejson.put("panoVisi", Integer.parseInt(base.getPanoVisi()));
|
|
scenejson.put("panoVisi", Integer.parseInt(base.getPanoVisi()));
|
|
sceneProEditExt.setPanoVisi(Integer.parseInt(base.getPanoVisi()));
|
|
sceneProEditExt.setPanoVisi(Integer.parseInt(base.getPanoVisi()));
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getM2dVisi())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getM2dVisi())){
|
|
scenejson.put("m2dVisi", Integer.parseInt(base.getM2dVisi()));
|
|
scenejson.put("m2dVisi", Integer.parseInt(base.getM2dVisi()));
|
|
sceneProEditExt.setM2dVisi(Integer.parseInt(base.getM2dVisi()));
|
|
sceneProEditExt.setM2dVisi(Integer.parseInt(base.getM2dVisi()));
|
|
}
|
|
}
|
|
- if(!StringUtils.isEmpty(base.getM3dVisi())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getM3dVisi())){
|
|
scenejson.put("m3dVisi", Integer.parseInt(base.getM3dVisi()));
|
|
scenejson.put("m3dVisi", Integer.parseInt(base.getM3dVisi()));
|
|
sceneProEditExt.setM3dVisi(Integer.parseInt(base.getM3dVisi()));
|
|
sceneProEditExt.setM3dVisi(Integer.parseInt(base.getM3dVisi()));
|
|
}
|
|
}
|
|
- if(!StringUtils.isEmpty(base.getMeasureVisi())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getMeasureVisi())){
|
|
scenejson.put("measureVisi", Integer.parseInt(base.getMeasureVisi()));
|
|
scenejson.put("measureVisi", Integer.parseInt(base.getMeasureVisi()));
|
|
sceneProEditExt.setMeasureVisi(Integer.parseInt(base.getMeasureVisi()));
|
|
sceneProEditExt.setMeasureVisi(Integer.parseInt(base.getMeasureVisi()));
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getFloorPlanAngle())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getFloorPlanAngle())){
|
|
scenejson.put("floorPlanAngle", base.getFloorPlanAngle());
|
|
scenejson.put("floorPlanAngle", base.getFloorPlanAngle());
|
|
sceneProEditExt.setFloorPlanAngle(base.getFloorPlanAngle());
|
|
sceneProEditExt.setFloorPlanAngle(base.getFloorPlanAngle());
|
|
}
|
|
}
|
|
@@ -1820,7 +1782,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
scenejson.put("sceneDec", base.getSceneDec());
|
|
scenejson.put("sceneDec", base.getSceneDec());
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getSceneKey())) {
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getSceneKey())) {
|
|
sceneProEdit.setSceneKey(base.getSceneKey());
|
|
sceneProEdit.setSceneKey(base.getSceneKey());
|
|
sceneProEdit.setNeedKey(1);
|
|
sceneProEdit.setNeedKey(1);
|
|
scenejson.put("sceneKey", base.getSceneKey());
|
|
scenejson.put("sceneKey", base.getSceneKey());
|
|
@@ -2190,7 +2152,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
@Override
|
|
@Override
|
|
// @SystemServiceLog(description = "上传场景的热点媒体文件")
|
|
// @SystemServiceLog(description = "上传场景的热点媒体文件")
|
|
public ResultData uploadHotMedia(String sceneNum, MultipartFile file, String sid) throws Exception {
|
|
public ResultData uploadHotMedia(String sceneNum, MultipartFile file, String sid) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2225,7 +2187,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
@Override
|
|
@Override
|
|
// @SystemServiceLog(description = "保存场景热点")
|
|
// @SystemServiceLog(description = "保存场景热点")
|
|
public ResultData saveHot(SceneEditVO base) throws Exception {
|
|
public ResultData saveHot(SceneEditVO base) throws Exception {
|
|
- if(StringUtils.isEmpty(base.getType())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getType())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2252,7 +2214,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
String str = FileUtils.readFile(dataBuffer.toString() + "hot.json");
|
|
String str = FileUtils.readFile(dataBuffer.toString() + "hot.json");
|
|
JSONArray jsonhots = null;
|
|
JSONArray jsonhots = null;
|
|
- if (StringUtils.isNotEmpty(str)) {
|
|
|
|
|
|
+ if (StrUtil.isNotEmpty(str)) {
|
|
jsonhots = JSONArray.parseArray(str);
|
|
jsonhots = JSONArray.parseArray(str);
|
|
}else {
|
|
}else {
|
|
File file = new File(dataBuffer.toString() + "hot.json");
|
|
File file = new File(dataBuffer.toString() + "hot.json");
|
|
@@ -2363,22 +2325,22 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
scenejson.put("hots", 0);
|
|
scenejson.put("hots", 0);
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getCapData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getCapData())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "capData.json", new String(base.getCapData().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "capData.json", new String(base.getCapData().getBytes(), "UTF-8"));
|
|
scenejson.put("capData", dataBuf.toString() + "capData.json");
|
|
scenejson.put("capData", dataBuf.toString() + "capData.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getFrameData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getFrameData())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "frameData.json", new String(base.getFrameData().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "frameData.json", new String(base.getFrameData().getBytes(), "UTF-8"));
|
|
scenejson.put("frameData", dataBuf.toString() + "frameData.json");
|
|
scenejson.put("frameData", dataBuf.toString() + "frameData.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getPlayData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getPlayData())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "playData.json", new String(base.getPlayData().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "playData.json", new String(base.getPlayData().getBytes(), "UTF-8"));
|
|
scenejson.put("playData", dataBuf.toString() + "playData.json");
|
|
scenejson.put("playData", dataBuf.toString() + "playData.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getScreencapThumb())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getScreencapThumb())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "screencapThumb.json", new String(base.getScreencapThumb().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "screencapThumb.json", new String(base.getScreencapThumb().getBytes(), "UTF-8"));
|
|
scenejson.put("screencapThumb", dataBuf.toString() + "screencapThumb.json");
|
|
scenejson.put("screencapThumb", dataBuf.toString() + "screencapThumb.json");
|
|
}
|
|
}
|
|
@@ -2392,7 +2354,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
@Override
|
|
@Override
|
|
// @SystemServiceLog(description = "保存场景热点")
|
|
// @SystemServiceLog(description = "保存场景热点")
|
|
public ResultData saveShopHot(SceneEditVO base) throws Exception {
|
|
public ResultData saveShopHot(SceneEditVO base) throws Exception {
|
|
- if(StringUtils.isEmpty(base.getType())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getType())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2422,7 +2384,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
String str = FileUtils.readFile(dataBuffer.toString() + fileName);
|
|
String str = FileUtils.readFile(dataBuffer.toString() + fileName);
|
|
|
|
|
|
JSONArray jsonhots = null;
|
|
JSONArray jsonhots = null;
|
|
- if (StringUtils.isNotEmpty(str)) {
|
|
|
|
|
|
+ if (StrUtil.isNotEmpty(str)) {
|
|
jsonhots = JSONArray.parseArray(str);
|
|
jsonhots = JSONArray.parseArray(str);
|
|
}else {
|
|
}else {
|
|
File file = new File(dataBuffer.toString() + fileName);
|
|
File file = new File(dataBuffer.toString() + fileName);
|
|
@@ -2503,7 +2465,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData saveOverlay(SceneEditVO base) throws Exception {
|
|
public ResultData saveOverlay(SceneEditVO base) throws Exception {
|
|
- if(StringUtils.isEmpty(base.getType())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getType())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2537,7 +2499,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
String str = sceneProEditExt.getOverlay();
|
|
String str = sceneProEditExt.getOverlay();
|
|
JSONArray jsonOverlays = null;
|
|
JSONArray jsonOverlays = null;
|
|
- if (StringUtils.isNotEmpty(str)) {
|
|
|
|
|
|
+ if (StrUtil.isNotEmpty(str)) {
|
|
jsonOverlays = JSONArray.parseArray(str);
|
|
jsonOverlays = JSONArray.parseArray(str);
|
|
}else {
|
|
}else {
|
|
jsonOverlays = new JSONArray();
|
|
jsonOverlays = new JSONArray();
|
|
@@ -2613,7 +2575,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadOverlayMedia(String sceneNum, MultipartFile file, String sid) throws Exception {
|
|
public ResultData uploadOverlayMedia(String sceneNum, MultipartFile file, String sid) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2649,7 +2611,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
@Override
|
|
@Override
|
|
// @SystemServiceLog(description = "保存场景热点")
|
|
// @SystemServiceLog(description = "保存场景热点")
|
|
public ResultData saveScreencapData(SceneEditVO base) throws Exception {
|
|
public ResultData saveScreencapData(SceneEditVO base) throws Exception {
|
|
- if(StringUtils.isEmpty(base.getSceneNum())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getSceneNum())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2680,27 +2642,27 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
scenejson.put("screencapVoiceType", base.getScreencapVoiceType());
|
|
scenejson.put("screencapVoiceType", base.getScreencapVoiceType());
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getCapData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getCapData())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "capData.json", new String(base.getCapData().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "capData.json", new String(base.getCapData().getBytes(), "UTF-8"));
|
|
scenejson.put("capData", dataBuf.toString() + "capData.json");
|
|
scenejson.put("capData", dataBuf.toString() + "capData.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getFrameData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getFrameData())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "frameData.json", new String(base.getFrameData().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "frameData.json", new String(base.getFrameData().getBytes(), "UTF-8"));
|
|
scenejson.put("frameData", dataBuf.toString() + "frameData.json");
|
|
scenejson.put("frameData", dataBuf.toString() + "frameData.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getPlayData())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getPlayData())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "playData.json", new String(base.getPlayData().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "playData.json", new String(base.getPlayData().getBytes(), "UTF-8"));
|
|
scenejson.put("playData", dataBuf.toString() + "playData.json");
|
|
scenejson.put("playData", dataBuf.toString() + "playData.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getScreencapThumb())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getScreencapThumb())){
|
|
FileUtils.writeFile(dataBuffer.toString() + "screencapThumb.json", new String(base.getScreencapThumb().getBytes(), "UTF-8"));
|
|
FileUtils.writeFile(dataBuffer.toString() + "screencapThumb.json", new String(base.getScreencapThumb().getBytes(), "UTF-8"));
|
|
scenejson.put("screencapThumb", dataBuf.toString() + "screencapThumb.json");
|
|
scenejson.put("screencapThumb", dataBuf.toString() + "screencapThumb.json");
|
|
}
|
|
}
|
|
|
|
|
|
- if(!StringUtils.isEmpty(base.getRecordType())){
|
|
|
|
|
|
+ if(!StrUtil.isEmpty(base.getRecordType())){
|
|
scenejson.put("recordType", base.getRecordType());
|
|
scenejson.put("recordType", base.getRecordType());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2712,7 +2674,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
@Override
|
|
@Override
|
|
// @SystemServiceLog(description = "漫游可行")
|
|
// @SystemServiceLog(description = "漫游可行")
|
|
public ResultData saveLinkPano(SceneEditVO base) throws Exception {
|
|
public ResultData saveLinkPano(SceneEditVO base) throws Exception {
|
|
- if(StringUtils.isEmpty(base.getData()) || StringUtils.isEmpty(base.getSceneNum())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getData()) || StrUtil.isEmpty(base.getSceneNum())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2772,7 +2734,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
FileUtils.deleteFile(dataBuffer.toString() + "vision.modeldata");
|
|
FileUtils.deleteFile(dataBuffer.toString() + "vision.modeldata");
|
|
FileUtils.writeFile(dataBuffer.toString() + "vision.json", json.toString());
|
|
FileUtils.writeFile(dataBuffer.toString() + "vision.json", json.toString());
|
|
ConvertUtils.convertTxtToVisionModelData(dataBuffer.toString() + "vision.json", dataBuffer.toString() + "vision.modeldata");
|
|
ConvertUtils.convertTxtToVisionModelData(dataBuffer.toString() + "vision.json", dataBuffer.toString() + "vision.modeldata");
|
|
-// QiniuUpload.setFileToBucket(dataBuffer.toString() + "vision.modeldata", imagesBuf.toString() + "vision.modeldata");
|
|
|
|
uploadToOssUtil.upload(dataBuffer.toString() + "vision.modeldata", imagesBuf.toString() + "vision.modeldata");
|
|
uploadToOssUtil.upload(dataBuffer.toString() + "vision.modeldata", imagesBuf.toString() + "vision.modeldata");
|
|
|
|
|
|
String strsceneInfos = FileUtils.readFile(dataBuffer.toString() + "scene.json");
|
|
String strsceneInfos = FileUtils.readFile(dataBuffer.toString() + "scene.json");
|
|
@@ -2798,7 +2759,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
@Override
|
|
@Override
|
|
// @SystemServiceLog(description = "保存热点可见性的数据")
|
|
// @SystemServiceLog(description = "保存热点可见性的数据")
|
|
public ResultData saveHotVisible(SceneEditVO base) throws Exception {
|
|
public ResultData saveHotVisible(SceneEditVO base) throws Exception {
|
|
- if(StringUtils.isEmpty(base.getData()) || StringUtils.isEmpty(base.getSceneNum())){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(base.getData()) || StrUtil.isEmpty(base.getSceneNum())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2857,7 +2818,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadShareLogo(SceneEditVO base, MultipartFile file) throws Exception {
|
|
public ResultData uploadShareLogo(SceneEditVO base, MultipartFile file) throws Exception {
|
|
- if(file == null || StringUtils.isEmpty(base.getSceneNum())){
|
|
|
|
|
|
+ if(file == null || StrUtil.isEmpty(base.getSceneNum())){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2921,7 +2882,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadPic(String sceneNum, String folderName, MultipartFile file, String toOss) throws Exception{
|
|
public ResultData uploadPic(String sceneNum, String folderName, MultipartFile file, String toOss) throws Exception{
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2964,7 +2925,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadHotJsonToOss(String sceneNum) throws Exception {
|
|
public ResultData uploadHotJsonToOss(String sceneNum) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2982,7 +2943,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadFloorplanPng(String sceneNum, MultipartFile[] file, String cadInfo) throws Exception{
|
|
public ResultData uploadFloorplanPng(String sceneNum, MultipartFile[] file, String cadInfo) throws Exception{
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3180,7 +3141,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadObjAndImg(String sceneNum, MultipartFile file) throws Exception{
|
|
public ResultData uploadObjAndImg(String sceneNum, MultipartFile file) throws Exception{
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3417,7 +3378,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadLogoBottomStatus(String sceneNum, String status) throws Exception {
|
|
public ResultData uploadLogoBottomStatus(String sceneNum, String status) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(status)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(status)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3467,7 +3428,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData saveJsonData(String sceneNum, String fileName, String jsonData) throws Exception {
|
|
public ResultData saveJsonData(String sceneNum, String fileName, String jsonData) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(fileName) || StringUtils.isEmpty(jsonData)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName) || StrUtil.isEmpty(jsonData)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3490,7 +3451,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public String downloadPanoramaOrVideo(String sceneNum, String fileName, String type, String planId) throws Exception {
|
|
public String downloadPanoramaOrVideo(String sceneNum, String fileName, String type, String planId) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(fileName) || StringUtils.isEmpty(type)|| StringUtils.isEmpty(planId)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName) || StrUtil.isEmpty(type)|| StrUtil.isEmpty(planId)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3534,7 +3495,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadPanoramaOrVideo(String sceneNum, String fileName, String type, MultipartFile file, String planId) throws Exception {
|
|
public ResultData uploadPanoramaOrVideo(String sceneNum, String fileName, String type, MultipartFile file, String planId) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(fileName) || StringUtils.isEmpty(type) || StringUtils.isEmpty(planId)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName) || StrUtil.isEmpty(type) || StrUtil.isEmpty(planId)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3599,8 +3560,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
@Override
|
|
@Override
|
|
public ResultData uploadROIVideo(String sceneNum, String fileName, MultipartFile file, String planId, String rect,
|
|
public ResultData uploadROIVideo(String sceneNum, String fileName, MultipartFile file, String planId, String rect,
|
|
String videoDirMatrix, String dir, String hfov, String vfov) throws Exception {
|
|
String videoDirMatrix, String dir, String hfov, String vfov) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(fileName) ||
|
|
|
|
- StringUtils.isEmpty(planId) || StrUtil.isEmpty(rect)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName) ||
|
|
|
|
+ StrUtil.isEmpty(planId) || StrUtil.isEmpty(rect)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3766,7 +3727,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData deleteROIVideo(String sceneNum, String fileName, String planId) throws Exception {
|
|
public ResultData deleteROIVideo(String sceneNum, String fileName, String planId) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(fileName) || StringUtils.isEmpty(planId)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName) || StrUtil.isEmpty(planId)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3830,7 +3791,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData uploadBgMusic(String sceneNum, String fileName, MultipartFile file) throws Exception {
|
|
public ResultData uploadBgMusic(String sceneNum, String fileName, MultipartFile file) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(fileName)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3876,7 +3837,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData deleteUploadBgMusic(String sceneNum) throws Exception {
|
|
public ResultData deleteUploadBgMusic(String sceneNum) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3908,7 +3869,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData savePanorama(String sceneNum, String sid, MultipartFile file, String imagesName) throws Exception {
|
|
public ResultData savePanorama(String sceneNum, String sid, MultipartFile file, String imagesName) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(sid)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(sid)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4068,7 +4029,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData savePanoramaJson(String sceneNum, String fileData, String fileName, String sid) throws Exception {
|
|
public ResultData savePanoramaJson(String sceneNum, String fileData, String fileName, String sid) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(fileName)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4100,14 +4061,14 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
scenejson.put("uploadPanoramaJson", 1);
|
|
scenejson.put("uploadPanoramaJson", 1);
|
|
scenejson.put("version", scenejson.getIntValue("version") + 1);
|
|
scenejson.put("version", scenejson.getIntValue("version") + 1);
|
|
- if(StringUtils.isNotEmpty(fileData)){
|
|
|
|
|
|
+ if(StrUtil.isNotEmpty(fileData)){
|
|
scenejson.put("jumpScene", true);
|
|
scenejson.put("jumpScene", true);
|
|
}else {
|
|
}else {
|
|
scenejson.put("jumpScene", false);
|
|
scenejson.put("jumpScene", false);
|
|
}
|
|
}
|
|
FileUtils.writeFile(dataBuffer.toString() + "scene.json", scenejson.toString());
|
|
FileUtils.writeFile(dataBuffer.toString() + "scene.json", scenejson.toString());
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(sid)){
|
|
|
|
|
|
+ if(StrUtil.isNotEmpty(sid)){
|
|
String target = imagesBuffer.toString() + "panorama/" + sid;
|
|
String target = imagesBuffer.toString() + "panorama/" + sid;
|
|
FileUtils.deleteDirectory(target);
|
|
FileUtils.deleteDirectory(target);
|
|
uploadToOssUtil.deleteFile(imagesBuf.toString() + "panorama_edit/" + sid);
|
|
uploadToOssUtil.deleteFile(imagesBuf.toString() + "panorama_edit/" + sid);
|
|
@@ -4118,7 +4079,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData copyAndUpdateFloorJson(String sceneNum, String floorJsonData) throws Exception{
|
|
public ResultData copyAndUpdateFloorJson(String sceneNum, String floorJsonData) throws Exception{
|
|
- if(StringUtils.isEmpty(sceneNum) ){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) ){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4135,7 +4096,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
scenejson = JSONObject.parseObject(strsceneInfos);
|
|
scenejson = JSONObject.parseObject(strsceneInfos);
|
|
}
|
|
}
|
|
|
|
|
|
- if(StringUtils.isEmpty(floorJsonData)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(floorJsonData)){
|
|
ScenePro scenePro = baseMapper.findByNum(sceneNum);
|
|
ScenePro scenePro = baseMapper.findByNum(sceneNum);
|
|
if(scenePro == null){
|
|
if(scenePro == null){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
@@ -4156,7 +4117,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData updateFloorJson(String sceneNum, String floorJsonData) throws Exception{
|
|
public ResultData updateFloorJson(String sceneNum, String floorJsonData) throws Exception{
|
|
- if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(floorJsonData)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(floorJsonData)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4246,7 +4207,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData downloadPanoramaData(String sceneNum) throws Exception {
|
|
public ResultData downloadPanoramaData(String sceneNum) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
ScenePro scenePro = findBySceneNum(sceneNum);
|
|
ScenePro scenePro = findBySceneNum(sceneNum);
|
|
@@ -4303,7 +4264,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ResultData downloadVisionData(String sceneCode) throws Exception {
|
|
public ResultData downloadVisionData(String sceneCode) throws Exception {
|
|
- if(StringUtils.isEmpty(sceneCode)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneCode)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
List<ScenePro> sceneProList = this.list(
|
|
List<ScenePro> sceneProList = this.list(
|
|
@@ -4347,7 +4308,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public SceneVO getInfo(String sceneNum) {
|
|
public SceneVO getInfo(String sceneNum) {
|
|
- if(StringUtils.isEmpty(sceneNum)){
|
|
|
|
|
|
+ if(StrUtil.isEmpty(sceneNum)){
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4435,6 +4396,47 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
return baseMapper.findLikeNum(sceneNum);
|
|
return baseMapper.findLikeNum(sceneNum);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void dealTour(SceneEditVO base, JSONObject scenejson, Map<String,String> map,
|
|
|
|
+ StringBuffer dataBuffer, StringBuffer imagesBuffer) throws IOException {
|
|
|
|
+ if(!StrUtil.isEmpty(base.getTourList())){
|
|
|
|
+ if(scenejson.containsKey("uploadTourList") && scenejson.getIntValue("uploadTourList") == 1){
|
|
|
|
+ int screencapLen = 0;
|
|
|
|
+ File file = new File(dataBuffer.toString() + ConstantFileName.TOURLIST_FOLDER);
|
|
|
|
+ String[] strs = file.list();
|
|
|
|
+ if(strs!=null) {
|
|
|
|
+ for(int i=0;i<strs.length;++i) {
|
|
|
|
+ if(strs[i].indexOf(ConstantFileName.SCREEN_CRP_DATAFILE)>-1)
|
|
|
|
+ {
|
|
|
|
+ ++screencapLen;
|
|
|
|
+ map.put(dataBuffer.toString() + ConstantFileName.TOURLIST_FOLDER+File.separator+strs[i],
|
|
|
|
+ "data/data"+base.getSceneNum()+"/tour/"+strs[i]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ scenejson.put("screencapLen", screencapLen);
|
|
|
|
+
|
|
|
|
+ String path = imagesBuffer.toString() + ConstantFileName.TOURLIST_FOLDER;
|
|
|
|
+ JSONArray tourJsons = JSONArray.parseArray(base.getTourList());
|
|
|
|
+ for(int i=0;i<tourJsons.size();++i) {
|
|
|
|
+ String fileName = path + File.separator +"guide"+i+".jpg";
|
|
|
|
+ map.put(fileName,"images/images"+base.getSceneNum()+"/tour/guide"+i+".jpg");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ scenejson.put("uploadTourList", 0);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String tourListPath = dataBuffer.toString() + ConstantFileName.TOUR_LIST;
|
|
|
|
+ FileUtils.deleteFile(tourListPath);
|
|
|
|
+ FileUtils.writeFile(tourListPath, base.getTourList());
|
|
|
|
+ map.put(tourListPath, dataBuffer.toString() + ConstantFileName.TOUR_LIST);
|
|
|
|
+ }else{
|
|
|
|
+ if(scenejson.containsKey("uploadTourList") && scenejson.getIntValue("uploadTourList") == 1){
|
|
|
|
+ scenejson.put("uploadTourList", 0);
|
|
|
|
+ }
|
|
|
|
+ scenejson.put("screencapLen", 0);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|