|
|
@@ -108,7 +108,7 @@ public class VoiceInfoServiceImpl implements VoiceInfoService { |
|
|
|
VoiceInfo voiceInfo = voiceMapper.selectOne(new LambdaQueryWrapper<VoiceInfo>() |
|
|
|
.eq(VoiceInfo::getIsDel, 0) |
|
|
|
.eq(VoiceInfo::getId, aiPreviewParam.getVoice_id())); |
|
|
|
voiceInfo = Optional.ofNullable(voiceInfo).orElseThrow(() -> new BizException(ErrorCode.SYS_SERVER_ERROR.getCode(), "声音信息不存在")); |
|
|
|
voiceInfo = Optional.ofNullable(voiceInfo).orElseThrow(() -> new BizException(ErrorCode.MEMBER_NO_POINTS.getCode(), "声音信息不存在")); |
|
|
|
|
|
|
|
AiPreviewParam param = new AiPreviewParam(); |
|
|
|
param.setGen_txt(aiPreviewParam.getGen_txt().replaceAll(Constant.text_pause,"[*]")); |
|
|
@@ -128,7 +128,7 @@ public class VoiceInfoServiceImpl implements VoiceInfoService { |
|
|
|
vo.setUrl(result.getUrl()); |
|
|
|
return vo; |
|
|
|
} |
|
|
|
throw new BizException(result.getCode(), result.getMsg()); |
|
|
|
throw new BizException(ErrorCode.MEMBER_NO_POINTS.getCode(), result.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
} |