|
@@ -93,11 +93,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData saveInitialPage(SceneEditParamVO base) throws Exception {
|
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getInitialPoint())){
|
|
|
+ if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getInitialPoint())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(Objects.isNull(scenePro)){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -106,13 +106,13 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
|
|
|
StringBuffer imagesBuf = new StringBuffer()
|
|
|
.append("images").append(File.separator)
|
|
|
- .append("images").append(scenePro.getSceneCode())
|
|
|
+ .append("images").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -158,12 +158,12 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData saveFloorLogo(SceneEditParamVO base) throws Exception {
|
|
|
- if(StrUtil.isEmpty(base.getSceneNum()) || StrUtil.isEmpty(base.getSize()) ||
|
|
|
+ if(StrUtil.isEmpty(base.getNum()) || StrUtil.isEmpty(base.getSize()) ||
|
|
|
StrUtil.isEmpty(base.getLogoType())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -172,12 +172,12 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer imagesBuf = new StringBuffer()
|
|
|
.append("images").append(File.separator)
|
|
|
- .append("images").append(scenePro.getSceneCode())
|
|
|
+ .append("images").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -208,7 +208,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if (scenePro == null ) {
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -219,11 +219,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
StringBuffer imagesBuf = new StringBuffer()
|
|
|
.append("images").append(File.separator)
|
|
|
- .append("images").append(scenePro.getSceneCode())
|
|
|
+ .append("images").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer imagesBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(imagesBuf.toString());
|
|
@@ -260,11 +260,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData saveBackgroundMusic(SceneEditParamVO base) throws Exception {
|
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getMusicName())){
|
|
|
+ if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getMusicName())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -273,7 +273,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -293,12 +293,12 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData saveSceneInfo(SceneEditParamVO base) throws Exception{
|
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getSceneName()) ||
|
|
|
+ if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getSceneName()) ||
|
|
|
StringUtils.isEmpty(base.getSceneType()) || StringUtils.isEmpty(base.getSceneDec())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -307,7 +307,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -352,11 +352,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData saveSceneKey(SceneEditParamVO base) throws Exception{
|
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getSceneKey())){
|
|
|
+ if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getSceneKey())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -365,7 +365,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -388,11 +388,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData saveTourList(SceneEditParamVO base) throws Exception{
|
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getTourList())){
|
|
|
+ if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getTourList())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -401,12 +401,12 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer imagesBuf = new StringBuffer()
|
|
|
.append("images").append(File.separator)
|
|
|
- .append("images").append(scenePro.getSceneCode())
|
|
|
+ .append("images").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer imagesBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(imagesBuf.toString());
|
|
@@ -583,12 +583,12 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData saveScreencapFile(SceneEditParamVO base) throws Exception{
|
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getIndex()) ||
|
|
|
+ if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getIndex()) ||
|
|
|
StringUtils.isEmpty(base.getCamerasData())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -597,7 +597,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -645,7 +645,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -656,11 +656,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
StringBuffer imagesBuf = new StringBuffer()
|
|
|
.append("images").append(File.separator)
|
|
|
- .append("images").append(scenePro.getSceneCode())
|
|
|
+ .append("images").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer imagesBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(imagesBuf.toString());
|
|
@@ -696,11 +696,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData saveLinkPano(SceneEditParamVO base) throws Exception{
|
|
|
- if(StringUtils.isEmpty(base.getData()) || StringUtils.isEmpty(base.getSceneNum())){
|
|
|
+ if(StringUtils.isEmpty(base.getData()) || StringUtils.isEmpty(base.getNum())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -709,11 +709,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
StringBuffer imagesBuf = new StringBuffer()
|
|
|
.append("images").append(File.separator)
|
|
|
- .append("images").append(scenePro.getSceneCode())
|
|
|
+ .append("images").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -780,11 +780,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData getRecordAudioFromWeixin(SceneEditParamVO base) throws Exception{
|
|
|
- if(StringUtils.isEmpty(base.getSceneNum()) || StringUtils.isEmpty(base.getId())){
|
|
|
+ if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getId())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -807,61 +807,61 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
http.connect();
|
|
|
// 获取文件转化为byte流
|
|
|
is = http.getInputStream();
|
|
|
- File dic = new File(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getSceneNum());
|
|
|
+ File dic = new File(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getNum());
|
|
|
if(!dic.exists())
|
|
|
{
|
|
|
dic.mkdirs();
|
|
|
}
|
|
|
- File voice = new File(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getSceneNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".amr");
|
|
|
+ File voice = new File(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".amr");
|
|
|
if(voice.exists())
|
|
|
{
|
|
|
- FileUtils.deleteFile(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getSceneNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".amr");
|
|
|
+ FileUtils.deleteFile(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".amr");
|
|
|
}
|
|
|
- FileUtils.saveImageToDisk( accessToken, base.getId(), ConstantFileName.WECHAT_VOICE_NAME, ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getSceneNum()+File.separator, is);
|
|
|
+ FileUtils.saveImageToDisk( accessToken, base.getId(), ConstantFileName.WECHAT_VOICE_NAME, ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getNum()+File.separator, is);
|
|
|
|
|
|
try
|
|
|
{
|
|
|
- FileUtils.changeVoiceToMp3(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getSceneNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".amr",
|
|
|
- ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getSceneNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".mp3");
|
|
|
+ FileUtils.changeVoiceToMp3(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".amr",
|
|
|
+ ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".mp3");
|
|
|
}
|
|
|
catch(Exception e)
|
|
|
{
|
|
|
StringWriter trace=new StringWriter();
|
|
|
e.printStackTrace(new PrintWriter(trace));
|
|
|
- log.error("voice:"+ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getSceneNum()+File.separator+ConstantFileName.VOICE_NAME+".amr");
|
|
|
+ log.error("voice:"+ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getNum()+File.separator+ConstantFileName.VOICE_NAME+".amr");
|
|
|
log.error(trace.toString());
|
|
|
return ResultData.error(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
|
String originalFileName = ConstantFileName.WECHAT_VOICE_NAME+".mp3";
|
|
|
- uploadToOssUtil.upload(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getSceneNum()+File.separator +originalFileName, "voice/voice"+base.getSceneNum()+"/"+originalFileName);
|
|
|
+ uploadToOssUtil.upload(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getNum()+File.separator +originalFileName, "voice/voice"+base.getNum()+"/"+originalFileName);
|
|
|
|
|
|
Map map = new HashMap();
|
|
|
map.put("screencapVoiceSoundsyncFileName", originalFileName);
|
|
|
- String voiceSrc = prefixAli+"voice/voice"+base.getSceneNum()+"/"+originalFileName;
|
|
|
+ String voiceSrc = prefixAli+"voice/voice"+base.getNum()+"/"+originalFileName;
|
|
|
if("s3".equals(type)){
|
|
|
- voiceSrc = ConstantUrl.PREFIX_AWS+"voice/voice"+base.getSceneNum()+"/"+originalFileName;
|
|
|
+ voiceSrc = ConstantUrl.PREFIX_AWS+"voice/voice"+base.getNum()+"/"+originalFileName;
|
|
|
}
|
|
|
map.put("screencapVoiceSoundsync", voiceSrc);
|
|
|
log.info("微信上传的音频路径:{}", voiceSrc);
|
|
|
map.put("screencapVoiceType", "soundsync");
|
|
|
map.put("version", sceneProEdit.getVersion()+1);
|
|
|
- FileUtils.writeJsonFile(ConstantFilePath.SCENE_PATH + "data/data" + base.getSceneNum() + "/scene.json", map);
|
|
|
+ FileUtils.writeJsonFile(ConstantFilePath.SCENE_PATH + "data/data" + base.getNum() + "/scene.json", map);
|
|
|
|
|
|
sceneProEdit.setScreencapVoiceType("soundsync");
|
|
|
sceneProEdit.setScreencapVoiceSoundsync(voiceSrc);
|
|
|
sceneProEdit.setVersion(sceneProEdit.getVersion());
|
|
|
sceneProEdit.setUpdateTime(Calendar.getInstance().getTime());
|
|
|
sceneProEditService.updateById(sceneProEdit);
|
|
|
- FileUtils.deleteFile(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getSceneNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".amr");
|
|
|
+ FileUtils.deleteFile(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".amr");
|
|
|
if("s3".equals(type)){
|
|
|
- return ResultData.ok(ConstantUrl.PREFIX_AWS+"voice/voice"+base.getSceneNum()+"/"+originalFileName);
|
|
|
+ return ResultData.ok(ConstantUrl.PREFIX_AWS+"voice/voice"+base.getNum()+"/"+originalFileName);
|
|
|
}
|
|
|
- return ResultData.ok(prefixAli+"voice/voice"+base.getSceneNum()+"/"+originalFileName);
|
|
|
+ return ResultData.ok(prefixAli+"voice/voice"+base.getNum()+"/"+originalFileName);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public ResultData getRecordAudioFromWeixinV3(FileParamVO param) throws Exception {
|
|
|
- String sceneNum = param.getSceneNum();
|
|
|
+ String sceneNum = param.getNum();
|
|
|
String id = param.getId();
|
|
|
String fileName = param.getFileName();
|
|
|
if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(id)){
|
|
@@ -948,7 +948,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData getRecordAudioFromAppV3(FileParamVO param) throws Exception {
|
|
|
- String sceneNum = param.getSceneNum();
|
|
|
+ String sceneNum = param.getNum();
|
|
|
String soundFile = param.getSoundFile();
|
|
|
String fileName = param.getFileName();
|
|
|
if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(soundFile)){
|
|
@@ -1023,7 +1023,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
@Override
|
|
|
public ResultData deleteRecordAudioPart(FileParamVO param) throws Exception {
|
|
|
|
|
|
- String sceneNum = param.getSceneNum();
|
|
|
+ String sceneNum = param.getNum();
|
|
|
String index = param.getIndex();
|
|
|
String times = param.getTimes();
|
|
|
if(StringUtils.isEmpty(sceneNum)){
|
|
@@ -1142,7 +1142,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
@Override
|
|
|
public ResultData uploadFloorJsonAndRebuild(SceneEditParamVO sceneEdit) throws Exception {
|
|
|
|
|
|
- String lockKey = String.format(RedisLockKey.LOCK_UPLOAD_FLOORJSON_REBUILD, sceneEdit.getSceneNum());
|
|
|
+ String lockKey = String.format(RedisLockKey.LOCK_UPLOAD_FLOORJSON_REBUILD, sceneEdit.getNum());
|
|
|
Boolean lock = redisLockUtil.lock(lockKey, RedisKey.EXPIRE_TIME_2_HOUR);
|
|
|
if(!lock){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5036);
|
|
@@ -1152,11 +1152,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
long start = System.currentTimeMillis();
|
|
|
log.info("画墙重建模型开始时间:{}", start);
|
|
|
- if(StringUtils.isEmpty(sceneEdit.getSceneNum())){
|
|
|
+ if(StringUtils.isEmpty(sceneEdit.getNum())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(sceneEdit.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(sceneEdit.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -1167,13 +1167,13 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
}
|
|
|
|
|
|
//更新scene.json文件
|
|
|
- String strsceneInfos = FileUtils.readFile(ConstantFilePath.SCENE_PATH + "data" + File.separator + "data" + sceneEdit.getSceneNum() + File.separator + "scene.json");
|
|
|
+ String strsceneInfos = FileUtils.readFile(ConstantFilePath.SCENE_PATH + "data" + File.separator + "data" + sceneEdit.getNum() + File.separator + "scene.json");
|
|
|
JSONObject scenejson = new JSONObject();
|
|
|
if(strsceneInfos!=null)
|
|
|
{
|
|
|
scenejson = JSONObject.parseObject(strsceneInfos);
|
|
|
}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.getNum() + File.separator + "scene.json").createNewFile();
|
|
|
}
|
|
|
if(!StringUtils.isEmpty(sceneEdit.getSceneData())){
|
|
|
JSONObject sceneObject = JSONObject.parseObject(sceneEdit.getSceneData());
|
|
@@ -1189,7 +1189,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
}
|
|
|
|
|
|
//上传过模型只更新floor.json
|
|
|
- FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+sceneEdit.getSceneNum() + File.separator + "floor.json",
|
|
|
+ FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+sceneEdit.getNum() + File.separator + "floor.json",
|
|
|
new String(sceneEdit.getWebFloor().getBytes(), "UTF-8"));
|
|
|
|
|
|
//更新scene.json文件
|
|
@@ -1197,8 +1197,8 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
{
|
|
|
scenejson.put("floorEditVer", sceneProEdit.getFloorPublishVer() + 1);
|
|
|
scenejson.put("floorPublishVer", sceneProEdit.getFloorPublishVer() + 1);
|
|
|
- FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+sceneEdit.getSceneNum()+File.separator+"scene.json", scenejson.toString());
|
|
|
- log.info("写入scene.json文件完成, sceneCode:{}", sceneEdit.getSceneNum());
|
|
|
+ FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+sceneEdit.getNum()+File.separator+"scene.json", scenejson.toString());
|
|
|
+ log.info("写入scene.json文件完成, sceneCode:{}", sceneEdit.getNum());
|
|
|
}
|
|
|
|
|
|
//floorEditVer字段增加1
|
|
@@ -1207,8 +1207,8 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
sceneProEdit.setUpdateTime(Calendar.getInstance().getTime());
|
|
|
sceneProEditService.updateById(sceneProEdit);
|
|
|
|
|
|
- uploadToOssUtil.upload(ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+sceneEdit.getSceneNum() + File.separator + "floor.json",
|
|
|
- "data"+File.separator+"data"+sceneEdit.getSceneNum() + File.separator + "floor.json");
|
|
|
+ uploadToOssUtil.upload(ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+sceneEdit.getNum() + File.separator + "floor.json",
|
|
|
+ "data"+File.separator+"data"+sceneEdit.getNum() + File.separator + "floor.json");
|
|
|
}catch (Exception e){
|
|
|
log.error("画墙重建模型失败...", e);
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5039);
|
|
@@ -1221,22 +1221,22 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData saveScreencapData(SceneEditParamVO base) throws Exception {
|
|
|
- if(StringUtils.isEmpty(base.getSceneNum())){
|
|
|
+ if(StringUtils.isEmpty(base.getNum())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
StringBuffer imagesBuf = new StringBuffer()
|
|
|
.append("images").append(File.separator)
|
|
|
- .append("images").append(scenePro.getSceneCode())
|
|
|
+ .append("images").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -1305,11 +1305,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
}
|
|
|
|
|
|
public ResultData saveAllVisi(SceneEditParamVO base) throws Exception {
|
|
|
- if(StrUtil.isEmpty(base.getSceneNum())){
|
|
|
+ if(StrUtil.isEmpty(base.getNum())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = baseMapper.findByNum(base.getSceneNum());
|
|
|
+ ScenePro scenePro = baseMapper.findByNum(base.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -1318,7 +1318,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -1366,11 +1366,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
StringBuffer imagesBuf = new StringBuffer()
|
|
|
.append("images").append(File.separator)
|
|
|
- .append("images").append(scenePro.getSceneCode())
|
|
|
+ .append("images").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer imagesBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(imagesBuf.toString());
|
|
@@ -1442,12 +1442,12 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer imagesBuf = new StringBuffer()
|
|
|
.append("images").append(File.separator)
|
|
|
- .append("images").append(scenePro.getSceneCode())
|
|
|
+ .append("images").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -1503,7 +1503,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuf = new StringBuffer()
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scenePro.getSceneCode())
|
|
|
+ .append("data").append(scenePro.getNum())
|
|
|
.append(File.separator);
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH).append(dataBuf.toString());
|
|
@@ -1979,13 +1979,12 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
List<SceneCooperation> list = sceneCooperationService.list(
|
|
|
new LambdaQueryWrapper<SceneCooperation>()
|
|
|
.eq(SceneCooperation::getTbStatus, TbStatus.VALID.code())
|
|
|
- .eq(SceneCooperation::getRecStatus, RecStatus.VALID.code())
|
|
|
.eq(SceneCooperation::getUserId, userId)
|
|
|
.orderByDesc(SceneCooperation::getId));
|
|
|
|
|
|
if(CollUtil.isNotEmpty(list)){
|
|
|
sceneCodeList = list.parallelStream().map(co -> {
|
|
|
- return co.getSceneCode();
|
|
|
+ return co.getNum();
|
|
|
}).collect(Collectors.toList());
|
|
|
}
|
|
|
}
|
|
@@ -2074,7 +2073,6 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
List<ScenePro> list = sceneProService.list(
|
|
|
new LambdaQueryWrapper<ScenePro>()
|
|
|
.eq(ScenePro::getTbStatus, TbStatus.VALID.code())
|
|
|
- .eq(ScenePro::getRecStatus, RecStatus.VALID.code())
|
|
|
.eq(ScenePro::getCameraId, camera.getId())
|
|
|
.ne(ScenePro::getSceneType, SceneType.YJHZXNFY.code())
|
|
|
.in(ScenePro::getSceneStatus, SceneStatus.SUCCESS, SceneStatus.NO_DISPLAY).orderByDesc(ScenePro::getId));
|
|
@@ -2105,7 +2103,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
public Integer getSceneStatus(@RequestBody UserParamVO user) {
|
|
|
|
|
|
if(StrUtil.isEmpty(user.getAppUserName()) || StrUtil.isEmpty(user.getAppPassword())
|
|
|
- || StrUtil.isEmpty(user.getSceneNum())){
|
|
|
+ || StrUtil.isEmpty(user.getNum())){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
ResultData<Camera> CameraResult = platformGoodsClient.getByChildNameAndChildPassword(user.getAppUserName(), user.getAppPassword());
|
|
@@ -2114,9 +2112,9 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3014);
|
|
|
}
|
|
|
|
|
|
- ScenePro scene = sceneProService.findBySceneNum(user.getSceneNum());
|
|
|
+ ScenePro scene = sceneProService.findBySceneNum(user.getNum());
|
|
|
if(scene == null){
|
|
|
- scene = sceneProService.findDeleteSceneBySceneNum(user.getSceneNum());
|
|
|
+ scene = sceneProService.findDeleteSceneBySceneNum(user.getNum());
|
|
|
if(scene == null){
|
|
|
throw new BusinessException(SceneConstant.FAILURE_CODE_5005, SceneConstant.FAILURE_MSG_5005);
|
|
|
}
|
|
@@ -2161,7 +2159,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
//临时将-2改成1,app还没完全更新
|
|
|
map.put("status", sceneProPO.getSceneStatus() == -2? 1 : sceneProPO.getSceneStatus());
|
|
|
map.put("webSite", sceneProPO.getWebSite());
|
|
|
- map.put("sceneNum", sceneProPO.getSceneCode());
|
|
|
+ map.put("sceneNum", sceneProPO.getNum());
|
|
|
map.put("thumb", sceneProPO.getThumb());
|
|
|
map.put("dataSource", sceneProPO.getDataSource());
|
|
|
map.put("payStatus", sceneProPO.getPayStatus());
|
|
@@ -2179,7 +2177,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
@Override
|
|
|
public ResultData deleteForCameraName(@RequestBody UserParamVO user) throws Exception {
|
|
|
- if (user.getCameraId() == null || StrUtil.isEmpty(user.getSceneNum())) {
|
|
|
+ if (user.getCameraId() == null || StrUtil.isEmpty(user.getNum())) {
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
ResultData<CameraDetail> detailResult = platformGoodsClient.getCameraDetailByCameraId(user.getCameraId());
|
|
@@ -2188,7 +2186,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
throw new BusinessException(CameraConstant.FAILURE_6003);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = sceneProService.findBySceneNum(user.getSceneNum());
|
|
|
+ ScenePro scenePro = sceneProService.findBySceneNum(user.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(SceneConstant.FAILURE_CODE_5005, SceneConstant.FAILURE_MSG_5005);
|
|
|
}
|
|
@@ -2197,7 +2195,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
throw new BusinessException(SceneConstant.FAILURE_CODE_5010, SceneConstant.FAILURE_MSG_5010);
|
|
|
}
|
|
|
|
|
|
- String[] nums = user.getSceneNum().split(",");
|
|
|
+ String[] nums = user.getNum().split(",");
|
|
|
for (String num : nums) {
|
|
|
SceneVO sceneVO = this.getSceneDetail(num);
|
|
|
if (sceneVO == null){
|
|
@@ -2269,18 +2267,18 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
try{
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("payStatus", 1);
|
|
|
- FileUtils.writeJsonFile(ConstantFilePath.SCENE_PATH + "data/data" + scenePro.getSceneCode() + "/scene.json", map);
|
|
|
+ FileUtils.writeJsonFile(ConstantFilePath.SCENE_PATH + "data/data" + scenePro.getNum() + "/scene.json", map);
|
|
|
com.alibaba.fastjson.JSONObject statusJson = new com.alibaba.fastjson.JSONObject();
|
|
|
|
|
|
//临时将-2改成1,app还没完全更新
|
|
|
statusJson.put("status", scenePro.getSceneStatus() == -2? 1 : scenePro.getSceneStatus());
|
|
|
statusJson.put("webSite", scenePro.getWebSite());
|
|
|
- statusJson.put("sceneNum", scenePro.getSceneCode());
|
|
|
+ statusJson.put("sceneNum", scenePro.getNum());
|
|
|
statusJson.put("thumb", scenePro.getThumb());
|
|
|
statusJson.put("payStatus", scenePro.getPayStatus());
|
|
|
- FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data/data"+scenePro.getSceneCode()+ File.separator+"status.json", statusJson.toString());
|
|
|
- uploadToOssUtil.upload(ConstantFilePath.SCENE_PATH+"data/data"+scenePro.getSceneCode()+File.separator+"status.json",
|
|
|
- "data/data"+scenePro.getSceneCode()+File.separator+"status.json");
|
|
|
+ FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data/data"+scenePro.getNum()+ File.separator+"status.json", statusJson.toString());
|
|
|
+ uploadToOssUtil.upload(ConstantFilePath.SCENE_PATH+"data/data"+scenePro.getNum()+File.separator+"status.json",
|
|
|
+ "data/data"+scenePro.getNum()+File.separator+"status.json");
|
|
|
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
@@ -2345,7 +2343,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
if(scenePo != null){
|
|
|
sceneService.update(new LambdaUpdateWrapper<Scene>()
|
|
|
.eq(Scene::getId, scenePo.getId())
|
|
|
- .set(Scene::getRecStatus, RecStatus.DISABLE.code())
|
|
|
+ .set(Scene::getTbStatus, TbStatus.DELETE.code())
|
|
|
.set(Scene::getUpdateTime, Calendar.getInstance().getTime()));
|
|
|
|
|
|
vo = getResponseScene(vo, scenePo);
|
|
@@ -2354,7 +2352,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
ScenePro scenePro = sceneProService.findBySceneNum(sceneNum);
|
|
|
SceneProExt sceneProExt = sceneProExtService.findBySceneProId(scenePro.getId());
|
|
|
- scenePro.setRecStatus("I");
|
|
|
+ scenePro.setTbStatus(TbStatus.DELETE.code());
|
|
|
scenePro.setUpdateTime(new Date());
|
|
|
sceneProService.updateById(scenePro);
|
|
|
|
|
@@ -2362,10 +2360,10 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
//临时将-2改成1,app还没完全更新
|
|
|
statusJson.put("status", scenePro.getSceneStatus() == -2? 1 : scenePro.getSceneStatus());
|
|
|
statusJson.put("webSite", scenePro.getWebSite());
|
|
|
- statusJson.put("sceneNum", scenePro.getSceneCode());
|
|
|
+ statusJson.put("sceneNum", scenePro.getNum());
|
|
|
statusJson.put("thumb", scenePro.getThumb());
|
|
|
statusJson.put("payStatus", scenePro.getPayStatus());
|
|
|
- statusJson.put("recStatus", scenePro.getRecStatus());
|
|
|
+ statusJson.put("tbStatus", scenePro.getTbStatus());
|
|
|
FileUtils.writeFile(ConstantFilePath.SCENE_PATH+"data/data"+sceneNum+File.separator+"status.json", statusJson.toString());
|
|
|
uploadToOssUtil.upload(ConstantFilePath.SCENE_PATH+"data/data"+sceneNum+File.separator+"status.json",
|
|
|
"data/data"+sceneNum+File.separator+"status.json");
|
|
@@ -2376,7 +2374,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
@Override
|
|
|
public List<SceneVO> findScenesByUserIdAndSceneScheme(Long cameraId, String orderBy, Integer payStatus) {
|
|
|
List<ScenePro> sceneProList = sceneProService.list(new LambdaQueryWrapper<ScenePro>()
|
|
|
- .eq(ScenePro::getRecStatus, RecStatus.VALID.code())
|
|
|
+ .eq(ScenePro::getTbStatus, TbStatus.VALID.code())
|
|
|
.in(ScenePro::getSceneStatus, SceneStatus.SUCCESS.code(), SceneStatus.NO_DISPLAY.code())
|
|
|
.eq(ScenePro::getCameraId, cameraId)
|
|
|
.eq(ScenePro::getPayStatus, payStatus).last(orderBy));
|
|
@@ -2405,11 +2403,11 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
@Override
|
|
|
public ResultData getScreencapVoice(@RequestBody SceneParamVO scene) throws Exception {
|
|
|
if (StrUtil.isEmpty(scene.getScreencapMusic()) || StrUtil.isEmpty(scene.getOriginalFileName())
|
|
|
- || StrUtil.isEmpty(scene.getSceneNum())) {
|
|
|
+ || StrUtil.isEmpty(scene.getNum())) {
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
|
|
|
- ScenePro scenePro = sceneProService.findBySceneNum(scene.getSceneNum());
|
|
|
+ ScenePro scenePro = sceneProService.findBySceneNum(scene.getNum());
|
|
|
if(scenePro == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -2427,7 +2425,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
StringBuffer dataBuffer = new StringBuffer(ConstantFilePath.SCENE_PATH)
|
|
|
.append("data").append(File.separator)
|
|
|
- .append("data").append(scene.getSceneNum());
|
|
|
+ .append("data").append(scene.getNum());
|
|
|
FileUtils.writeJsonFile(dataBuffer.append(File.separator).append("scene.json").toString(), map);
|
|
|
|
|
|
sceneProEdit.setScreencapVoiceSoundsync(scene.getOriginalFileName() + "?t=" + time);
|
|
@@ -2435,7 +2433,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
sceneProEdit.setVersion(sceneProEdit.getVersion() + 1);
|
|
|
|
|
|
FileUtils.downLoadFromUrl(scene.getOriginalFileName() + "?t=" + time, scene.getScreencapMusic() + ".mp3",
|
|
|
- ConstantFilePath.SCENE_PATH+ "voice" + File.separator + "voice" + scene.getSceneNum());
|
|
|
+ ConstantFilePath.SCENE_PATH+ "voice" + File.separator + "voice" + scene.getNum());
|
|
|
|
|
|
sceneProEditService.updateById(sceneProEdit);
|
|
|
return ResultData.ok();
|
|
@@ -2488,7 +2486,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
|
|
|
List<SceneCooperation> list = sceneCooperationService.list(
|
|
|
new LambdaQueryWrapper<SceneCooperation>()
|
|
|
- .eq(SceneCooperation::getRecStatus, RecStatus.VALID.code())
|
|
|
+ .eq(SceneCooperation::getTbStatus, TbStatus.VALID.code())
|
|
|
.eq(SceneCooperation::getUserId, ssoUser.getId())
|
|
|
.orderByDesc(SceneCooperation::getId));
|
|
|
|
|
@@ -2497,7 +2495,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
}
|
|
|
|
|
|
List<String> sceneCodeList = list.parallelStream().map(sc -> {
|
|
|
- return sc.getSceneCode();
|
|
|
+ return sc.getNum();
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
List<SceneProPO> sceneProPOList = sceneProService.findBySceneNums(sceneCodeList, user.getCameraType());
|