瀏覽代碼

Merge remote-tracking branch 'origin/photo' into photo

# Conflicts:
#	suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java
private_deployment
谈文友 1 年之前
父節點
當前提交
c90f82db49
共有 4 個文件被更改,包括 40 次插入45 次删除
  1. +6
    -11
      suimangCApi/src/main/java/com/iformall/controller/PhotoSpeakVideoController.java
  2. +1
    -1
      suimangCApi/src/main/resources/application-dev.yml
  3. +1
    -1
      suimangSchedule/src/main/resources/application-dev.yml
  4. +32
    -32
      suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java

+ 6
- 11
suimangCApi/src/main/java/com/iformall/controller/PhotoSpeakVideoController.java 查看文件

@@ -178,8 +178,8 @@ public class PhotoSpeakVideoController extends BaseController {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"视频已生成完成"); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"视频已生成完成");
} }


PhotoSpeakVideo videoUpd = new PhotoSpeakVideo();
videoUpd.setId(record.getId());
// PhotoSpeakVideo videoUpd = new PhotoSpeakVideo();
// videoUpd.setId(record.getId());


if (mouldVideo.getPersonPhotoId() == null) { if (mouldVideo.getPersonPhotoId() == null) {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到人物照片"); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到人物照片");
@@ -187,19 +187,13 @@ public class PhotoSpeakVideoController extends BaseController {
if(StringUtils.isBlank(mouldVideo.getPersonPhotoUrl())){ if(StringUtils.isBlank(mouldVideo.getPersonPhotoUrl())){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到人物照片地址"); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未查询到人物照片地址");
} }
videoUpd.setPersonPhotoId(mouldVideo.getPersonPhotoId());
videoUpd.setPersonPhotoUrl(mouldVideo.getPersonPhotoUrl());


Integer voiceFrom = mouldVideo.getVoiceFrom(); Integer voiceFrom = mouldVideo.getVoiceFrom();
videoUpd.setVoiceFrom(voiceFrom);
if(EnumVoiceFrom.FROM_MOULD.getCode().equals(voiceFrom)){ if(EnumVoiceFrom.FROM_MOULD.getCode().equals(voiceFrom)){
String voiceMouldSmId = null; String voiceMouldSmId = null;
try{ try{
JSONObject personMouldObject = JSONObject.parseObject(mouldVideo.getVoiceMouldSm()); JSONObject personMouldObject = JSONObject.parseObject(mouldVideo.getVoiceMouldSm());
voiceMouldSmId = personMouldObject.getString("mouldSmId"); voiceMouldSmId = personMouldObject.getString("mouldSmId");
videoUpd.setVoiceMouldSm(voiceMouldSmId);
videoUpd.setPaperwork(mouldVideo.getPaperwork());
videoUpd.setVoiceMouldSm(mouldVideo.getVoiceMouldSm());
}catch(Exception e){ }catch(Exception e){
logger.info(e.getMessage()); logger.info(e.getMessage());
} }
@@ -221,7 +215,7 @@ public class PhotoSpeakVideoController extends BaseController {
if(StringUtils.isBlank(voiceMaterialUrl)){ if(StringUtils.isBlank(voiceMaterialUrl)){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未找到上传声音文件"); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"未找到上传声音文件");
} }
videoUpd.setVoiceMaterialUrl(voiceMaterialUrl);
mouldVideo.setVoiceMaterialUrl(voiceMaterialUrl);
// videoUpd.setVideoTime(String.valueOf(voiceMaterial.getTime())); // videoUpd.setVideoTime(String.valueOf(voiceMaterial.getTime()));
} else if (EnumVoiceFrom.MUSIC.getCode().equals(voiceFrom)) { } else if (EnumVoiceFrom.MUSIC.getCode().equals(voiceFrom)) {
Long musicId = mouldVideo.getMusicId(); Long musicId = mouldVideo.getMusicId();
@@ -235,7 +229,7 @@ public class PhotoSpeakVideoController extends BaseController {
if(musicInfo.getTime() == null){ if(musicInfo.getTime() == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"音乐时长为空"); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"音乐时长为空");
} }
videoUpd.setVoiceMaterialUrl(musicInfo.getUrl());
mouldVideo.setVoiceMaterialUrl(musicInfo.getUrl());
// videoUpd.setVideoTime(String.valueOf(musicInfo.getTime())); // videoUpd.setVideoTime(String.valueOf(musicInfo.getTime()));
} else { } else {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"声音数据异常"); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"声音数据异常");
@@ -247,7 +241,8 @@ public class PhotoSpeakVideoController extends BaseController {
mouldVideoUpd.setCreateVideoDate(new Date()); mouldVideoUpd.setCreateVideoDate(new Date());


photoSpeakVideoService.saveOrUpdate(mouldVideoUpd); photoSpeakVideoService.saveOrUpdate(mouldVideoUpd);
photoSpeakVideoService.createVideo(videoUpd);

photoSpeakVideoService.createVideo(mouldVideo);


return new ResultData(); return new ResultData();
} }


+ 1
- 1
suimangCApi/src/main/resources/application-dev.yml 查看文件

@@ -189,7 +189,7 @@ logging:
path: ./logs/c path: ./logs/c


photo: photo:
url: http://111.198.0.15:22299
url: http://nas.pucao.cn:2002
hy_url: http://111.198.0.15:22288 hy_url: http://111.198.0.15:22288
talk: http://111.198.0.15:22266 talk: http://111.198.0.15:22266
callbackUrl: https://phototest.metavatar.cc/C callbackUrl: https://phototest.metavatar.cc/C

+ 1
- 1
suimangSchedule/src/main/resources/application-dev.yml 查看文件

@@ -192,7 +192,7 @@ logging:
path: ./logs/s path: ./logs/s


photo: photo:
url: http://111.198.0.15:22299
url: http://nas.pucao.cn:2002
hy_url: http://111.198.0.15:22288 hy_url: http://111.198.0.15:22288
talk: http://111.198.0.15:22266 talk: http://111.198.0.15:22266
callbackUrl: https://phototest.metavatar.cc/C callbackUrl: https://phototest.metavatar.cc/C

+ 32
- 32
suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java 查看文件

@@ -220,38 +220,38 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService {


Integer voiceFrom = photoSpeakVideo.getVoiceFrom(); Integer voiceFrom = photoSpeakVideo.getVoiceFrom();
String voiceMaterialUrl = photoSpeakVideo.getVoiceMaterialUrl(); String voiceMaterialUrl = photoSpeakVideo.getVoiceMaterialUrl();
// if (photoSpeakVideo.getSubtitleEnabled()==1){
//// //开启字幕 查询字幕列表
// Map reSubtitle = new HashMap();
// Map params = new HashMap();
// JSONObject subtitle = JSON.parseObject(photoSpeakVideo.getSubtitleParams());
// params.put("Fontname",(subtitle.get("Fontname")==null?"宋体":subtitle.get("Fontname")));
// params.put("Fontsize",(subtitle.get("Fontsize")==null? 25:subtitle.get("Fontsize")));
// params.put("PrimaryColour",(subtitle.get("PrimaryColour")==null?"&Hffffff":subtitle.get("PrimaryColour")));
// params.put("SecondaryColour",(subtitle.get("SecondaryColour")==null?"BBGGRR":subtitle.get("SecondaryColour")));
// params.put("OutlineColour",(subtitle.get("OutlineColour")==null?"BBGGRR":subtitle.get("OutlineColour")));
// params.put("BackColour",(subtitle.get("BackColour")==null?"&H0000ff":subtitle.get("BackColour")));
// params.put("Bold",(subtitle.get("Bold")==null? -1:subtitle.get("Bold")));
// params.put("Italic",(subtitle.get("Italic")==null? 0:subtitle.get("Italic")));
// params.put("Underline",(subtitle.get("Underline")==null? 0:subtitle.get("Underline")));
// params.put("Strikeout",(subtitle.get("Strikeout")==null? 0:subtitle.get("Strikeout")));
// params.put("ScaleX",(subtitle.get("ScaleX")==null? 100:subtitle.get("ScaleX")));
// params.put("ScaleY",(subtitle.get("ScaleY")==null? 100:subtitle.get("ScaleY")));
// params.put("Spacing",(subtitle.get("Spacing")==null? 0:subtitle.get("Spacing")));
// params.put("Angle",(subtitle.get("Angle")==null? 15:subtitle.get("Angle")));
// params.put("BorderStyle",(subtitle.get("BorderStyle")==null?"1":subtitle.get("BorderStyle")));
// params.put("Outline",(subtitle.get("Outline")==null? 20:subtitle.get("Outline")));
// params.put("Shadow",(subtitle.get("Shadow")==null? 12:subtitle.get("Shadow")));
// params.put("Alignment",(subtitle.get("Alignment")==null? 1:subtitle.get("Alignment")));
// params.put("MarginL",(subtitle.get("MarginL")==null? 100:subtitle.get("MarginL")));
// params.put("MarginR",(subtitle.get("MarginR")==null? 100:subtitle.get("MarginR")));
// params.put("MarginV",(subtitle.get("MarginV")==null? 100:subtitle.get("MarginV")));
// subtitle.put("enabled",1);
// subtitle.put("text",photoSpeakVideo.getPaperwork());
// subtitle.put("params",params);
// param.setSubtitle_params(subtitle);
//
// }
if (photoSpeakVideo.getSubtitleEnabled()==1){
// //开启字幕 查询字幕列表
Map reSubtitle = new HashMap();
Map params = new HashMap();
JSONObject subtitle = JSON.parseObject(photoSpeakVideo.getSubtitleParams());
params.put("Fontname",(subtitle.get("Fontname")==null?"宋体":subtitle.get("Fontname")));
params.put("Fontsize",(subtitle.get("Fontsize")==null? 25:subtitle.get("Fontsize")));
params.put("PrimaryColour",(subtitle.get("PrimaryColour")==null?"&Hffffff":subtitle.get("PrimaryColour")));
params.put("SecondaryColour",(subtitle.get("SecondaryColour")==null?"BBGGRR":subtitle.get("SecondaryColour")));
params.put("OutlineColour",(subtitle.get("OutlineColour")==null?"BBGGRR":subtitle.get("OutlineColour")));
params.put("BackColour",(subtitle.get("BackColour")==null?"&H0000ff":subtitle.get("BackColour")));
params.put("Bold",(subtitle.get("Bold")==null? -1:subtitle.get("Bold")));
params.put("Italic",(subtitle.get("Italic")==null? 0:subtitle.get("Italic")));
params.put("Underline",(subtitle.get("Underline")==null? 0:subtitle.get("Underline")));
params.put("Strikeout",(subtitle.get("Strikeout")==null? 0:subtitle.get("Strikeout")));
params.put("ScaleX",(subtitle.get("ScaleX")==null? 100:subtitle.get("ScaleX")));
params.put("ScaleY",(subtitle.get("ScaleY")==null? 100:subtitle.get("ScaleY")));
params.put("Spacing",(subtitle.get("Spacing")==null? 0:subtitle.get("Spacing")));
params.put("Angle",(subtitle.get("Angle")==null? 15:subtitle.get("Angle")));
params.put("BorderStyle",(subtitle.get("BorderStyle")==null?"1":subtitle.get("BorderStyle")));
params.put("Outline",(subtitle.get("Outline")==null? 20:subtitle.get("Outline")));
params.put("Shadow",(subtitle.get("Shadow")==null? 12:subtitle.get("Shadow")));
params.put("Alignment",(subtitle.get("Alignment")==null? 1:subtitle.get("Alignment")));
params.put("MarginL",(subtitle.get("MarginL")==null? 100:subtitle.get("MarginL")));
params.put("MarginR",(subtitle.get("MarginR")==null? 100:subtitle.get("MarginR")));
params.put("MarginV",(subtitle.get("MarginV")==null? 100:subtitle.get("MarginV")));
subtitle.put("enabled",1);
subtitle.put("text",photoSpeakVideo.getPaperwork());
subtitle.put("params",params);
param.setSubtitle_params(subtitle);
}
// List<PhotoSpeakVideo> videoMapperList = photoSpeakVideoMapper.findList(speakVideoUpd); // List<PhotoSpeakVideo> videoMapperList = photoSpeakVideoMapper.findList(speakVideoUpd);
// for (PhotoSpeakVideo speakVideo : videoMapperList) { // for (PhotoSpeakVideo speakVideo : videoMapperList) {
// if (speakVideo.getSubtitleEnabled()==1){ // if (speakVideo.getSubtitleEnabled()==1){


Loading…
取消
儲存