| @@ -63,6 +63,9 @@ public class PhotoSpeakVideoController extends BaseController { | |||||
| @Autowired | @Autowired | ||||
| private MusicInfoService musicInfoService; | private MusicInfoService musicInfoService; | ||||
| @Autowired | |||||
| private VoiceMaterialService voiceMaterialService; | |||||
| @ApiOperation("分页列表接口") | @ApiOperation("分页列表接口") | ||||
| @GetMapping("list") | @GetMapping("list") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -93,6 +96,10 @@ public class PhotoSpeakVideoController extends BaseController { | |||||
| VoiceInfo voiceInfo = voiceInfoService.getById(photoSpeakVideo.getVoiceMouldId()); | VoiceInfo voiceInfo = voiceInfoService.getById(photoSpeakVideo.getVoiceMouldId()); | ||||
| photoSpeakVideo.setVoiceInfo(voiceInfo); | photoSpeakVideo.setVoiceInfo(voiceInfo); | ||||
| } | } | ||||
| if(photoSpeakVideo.getVoiceMaterialId() != null){ | |||||
| VoiceMaterial voiceMaterial = voiceMaterialService.getById(photoSpeakVideo.getVoiceMaterialId()); | |||||
| photoSpeakVideo.setVoiceMaterial(voiceMaterial); | |||||
| } | |||||
| return new ResultData(photoSpeakVideo); | return new ResultData(photoSpeakVideo); | ||||
| } | } | ||||
| @@ -69,7 +69,7 @@ public class VoiceMaterialController extends BaseController { | |||||
| public ResultData save(@RequestBody VoiceMaterial record) { | public ResultData save(@RequestBody VoiceMaterial record) { | ||||
| logger.debug("[" + getIpAddr() + "] VoiceMaterialController::save"); | logger.debug("[" + getIpAddr() + "] VoiceMaterialController::save"); | ||||
| if(record == null)record = new VoiceMaterial(); | if(record == null)record = new VoiceMaterial(); | ||||
| record.setSendType(EnumMouldSendType.build.getCode()); | |||||
| // record.setSendType(EnumMouldSendType.build.getCode()); | |||||
| record.setUserId(getMemberId()); | record.setUserId(getMemberId()); | ||||
| if(StringUtils.isBlank(record.getVideoId())){ | if(StringUtils.isBlank(record.getVideoId())){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"音频为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"音频为空"); | ||||
| @@ -77,6 +77,9 @@ public class VoiceMaterialController extends BaseController { | |||||
| if(record.getTitle() == null){ | if(record.getTitle() == null){ | ||||
| record.setTitle("用户自建"); | record.setTitle("用户自建"); | ||||
| } | } | ||||
| if(record.getSendType() == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"上传音频类型不能为空"); | |||||
| } | |||||
| record.setPrice(0); | record.setPrice(0); | ||||
| record.setSalePrice(0); | record.setSalePrice(0); | ||||
| record.setStatus(EnumaMouldPatchStatus.put_on.getCode()); | record.setStatus(EnumaMouldPatchStatus.put_on.getCode()); | ||||
| @@ -11,6 +11,8 @@ public enum EnumMouldSendType { | |||||
| auto(1,"系统免费"), | auto(1,"系统免费"), | ||||
| // buy(2, "系统收费"), | // buy(2, "系统收费"), | ||||
| build(3, "用户自建"), | build(3, "用户自建"), | ||||
| RECODING(4,"录音"), | |||||
| FROM_UPD(5,"用户上传"), | |||||
| ; | ; | ||||
| public static EnumMouldSendType getEnum(Integer code) { | public static EnumMouldSendType getEnum(Integer code) { | ||||
| @@ -8,6 +8,7 @@ public enum EnumVoiceFrom { | |||||
| FROM_MOULD(1, "模板"), | FROM_MOULD(1, "模板"), | ||||
| FROM_UPD(2,"用户上传"), | FROM_UPD(2,"用户上传"), | ||||
| MUSIC(3,"音乐"), | MUSIC(3,"音乐"), | ||||
| RECODING(4,"录音"), | |||||
| ; | ; | ||||
| public static EnumVoiceFrom getEnum(Integer code) { | public static EnumVoiceFrom getEnum(Integer code) { | ||||