|
@@ -61,7 +61,7 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro> implements ISceneProAppService {
|
|
|
|
|
|
- @Value("${oss.type}")
|
|
|
+ @Value("${upload.type}")
|
|
|
private String type;
|
|
|
|
|
|
@Value("${oss.prefix.ali}")
|
|
@@ -148,7 +148,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
sceneProEditService.updateById(sceneProEdit);
|
|
|
|
|
|
scenePro.setThumb(prefixAli + imagesBuf.toString() + "thumbSmallImg.jpg");
|
|
|
- if("s3".equals(type)){
|
|
|
+ if("aws".equals(type)){
|
|
|
scenePro.setThumb(ConstantUrl.PREFIX_AWS + imagesBuf.toString() + "thumbSmallImg.jpg");
|
|
|
}
|
|
|
sceneProService.updateById(scenePro);
|
|
@@ -557,7 +557,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
Map map = new HashMap();
|
|
|
map.put("screencapVoiceFileName", originalFileName);
|
|
|
String voiceSrc = prefixAli + "voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
- if("s3".equals(type)){
|
|
|
+ if("aws".equals(type)){
|
|
|
voiceSrc = ConstantUrl.PREFIX_AWS + "voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
}
|
|
|
map.put("screencapVoiceSrc", voiceSrc);
|
|
@@ -726,7 +726,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
JSONArray inputdata = JSONArray.parseArray(base.getData());
|
|
|
|
|
|
String modeldataUrl = prefixAli + imagesBuf.toString() + "vision.modeldata?t=" + System.currentTimeMillis();
|
|
|
- if("s3".equals(type)){
|
|
|
+ if("aws".equals(type)){
|
|
|
modeldataUrl = ConstantUrl.PREFIX_AWS + imagesBuf.toString() + "vision.modeldata?t=" + System.currentTimeMillis();
|
|
|
}
|
|
|
FileUtils.downLoadFromUrl(modeldataUrl, "vision.modeldata", dataBuffer.toString());
|
|
@@ -838,7 +838,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
Map map = new HashMap();
|
|
|
map.put("screencapVoiceSoundsyncFileName", originalFileName);
|
|
|
String voiceSrc = prefixAli+"voice/voice"+base.getNum()+"/"+originalFileName;
|
|
|
- if("s3".equals(type)){
|
|
|
+ if("aws".equals(type)){
|
|
|
voiceSrc = ConstantUrl.PREFIX_AWS+"voice/voice"+base.getNum()+"/"+originalFileName;
|
|
|
}
|
|
|
map.put("screencapVoiceSoundsync", voiceSrc);
|
|
@@ -853,7 +853,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
sceneProEdit.setUpdateTime(Calendar.getInstance().getTime());
|
|
|
sceneProEditService.updateById(sceneProEdit);
|
|
|
FileUtils.deleteFile(ConstantFilePath.SCENE_PATH+"voice"+File.separator+"voice"+base.getNum()+File.separator+ConstantFileName.WECHAT_VOICE_NAME+".amr");
|
|
|
- if("s3".equals(type)){
|
|
|
+ if("aws".equals(type)){
|
|
|
return ResultData.ok(ConstantUrl.PREFIX_AWS+"voice/voice"+base.getNum()+"/"+originalFileName);
|
|
|
}
|
|
|
return ResultData.ok(prefixAli+"voice/voice"+base.getNum()+"/"+originalFileName);
|
|
@@ -924,7 +924,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
uploadToOssUtil.upload(path+File.separator +originalFileName, "voice/voice"+sceneNum+"/"+originalFileName);
|
|
|
|
|
|
String voiceSrc = prefixAli+"voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
- if("s3".equals(this.type)){
|
|
|
+ if("aws".equals(this.type)){
|
|
|
voiceSrc = ConstantUrl.PREFIX_AWS+"voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
}
|
|
|
|
|
@@ -986,7 +986,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
}
|
|
|
|
|
|
FileUtils.delAllFile(path + File.separator + "part");
|
|
|
- if("s3".equals(this.type)){
|
|
|
+ if("aws".equals(this.type)){
|
|
|
CreateObjUtil.ossFileCp("voice"+File.separator+"voice"+sceneNum + "/" + soundFile, partPath + File.separator + fileName);
|
|
|
}else {
|
|
|
CreateObjUtil.ossUtilCp("voice"+File.separator+"voice"+sceneNum + "/" + soundFile, partPath + File.separator);
|
|
@@ -998,7 +998,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
uploadToOssUtil.upload(path+File.separator +originalFileName, "voice/voice"+sceneNum+"/"+originalFileName);
|
|
|
|
|
|
String voiceSrc = prefixAli+"voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
- if("s3".equals(this.type)){
|
|
|
+ if("aws".equals(this.type)){
|
|
|
voiceSrc = ConstantUrl.PREFIX_AWS+"voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
}
|
|
|
|
|
@@ -1118,7 +1118,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
uploadToOssUtil.upload(path+File.separator +originalFileName, "voice/voice"+sceneNum+"/"+originalFileName);
|
|
|
|
|
|
String voiceSrc = prefixAli+"voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
- if("s3".equals(this.type)){
|
|
|
+ if("aws".equals(this.type)){
|
|
|
voiceSrc = ConstantUrl.PREFIX_AWS+"voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
}
|
|
|
|
|
@@ -1598,7 +1598,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
FileUtils.deleteFile(partPath + File.separator + fileName);
|
|
|
}
|
|
|
|
|
|
- if("s3".equals(this.type)){
|
|
|
+ if("aws".equals(this.type)){
|
|
|
CreateObjUtil.ossFileCp("voice"+File.separator+"voice"+sceneNum + "/" + soundFile, partPath + File.separator + fileName);
|
|
|
}else {
|
|
|
CreateObjUtil.ossUtilCp("voice"+File.separator+"voice"+sceneNum + "/" + soundFile, partPath + File.separator);
|
|
@@ -1639,7 +1639,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
uploadToOssUtil.upload(path+File.separator +originalFileName, "voice/voice"+sceneNum+"/"+originalFileName);
|
|
|
|
|
|
String voiceSrc = prefixAli+"voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
- if("s3".equals(this.type)){
|
|
|
+ if("aws".equals(this.type)){
|
|
|
voiceSrc = ConstantUrl.PREFIX_AWS+"voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
}
|
|
|
|
|
@@ -1667,7 +1667,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
this.dealVioce(path, partPath, fileName, originalFileName, sceneNum, times);
|
|
|
|
|
|
String voiceSrc = prefixAli+"voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
- if("s3".equals(this.type)){
|
|
|
+ if("aws".equals(this.type)){
|
|
|
voiceSrc = ConstantUrl.PREFIX_AWS+"voice/voice"+sceneNum+"/"+originalFileName;
|
|
|
}
|
|
|
|
|
@@ -1876,7 +1876,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
|
|
|
jsonhots.remove(i);
|
|
|
jsonhot = ele;
|
|
|
|
|
|
- if(!"s3".equals(this.type)){
|
|
|
+ if(!"aws".equals(this.type)){
|
|
|
JSONObject paramData = new JSONObject();
|
|
|
paramData.put("hotId", sid);
|
|
|
JSONObject hotListJson = JSONObject.parseObject(OkHttpUtils.httpGet(hotDomainList));
|