|
|
@@ -3,6 +3,7 @@ package com.iformall.service.sm.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.iformall.domain.po.sm.VoiceInfo; |
|
|
|
import com.iformall.mapper.VoiceMapper; |
|
|
|
import com.iformall.service.sm.VoiceInfoService; |
|
|
@@ -20,11 +21,13 @@ public class VoiceInfoServiceImpl implements VoiceInfoService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<VoiceInfo> chooseType(Long id) { |
|
|
|
List<VoiceInfo> voiceInfos = voiceMapper.selectList(new LambdaQueryWrapper<VoiceInfo>().eq(VoiceInfo::getLanguageId, id).select(VoiceInfo::getId, VoiceInfo::getDisplayName, VoiceInfo::getStyleList)); |
|
|
|
List<VoiceInfo> voiceInfos = voiceMapper.selectList(new LambdaQueryWrapper<VoiceInfo>().eq(VoiceInfo::getLanguageId, id).orderByAsc(VoiceInfo::getDisplayName).select(VoiceInfo::getId, VoiceInfo::getDisplayName, VoiceInfo::getStyleList)); |
|
|
|
voiceInfos.forEach(x -> { |
|
|
|
if (StringUtils.isNotEmpty(x.getStyleList())) { |
|
|
|
List<String> strings = JSON.parseArray(x.getStyleList(), String.class); |
|
|
|
x.setStyle(strings); |
|
|
|
} else { |
|
|
|
x.setStyle(Lists.newArrayList()); |
|
|
|
} |
|
|
|
}); |
|
|
|
return voiceInfos; |
|
|
|