| @@ -8,6 +8,7 @@ import com.google.common.collect.Lists; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.sm.VoiceInfo; | import com.iformall.domain.po.sm.VoiceInfo; | ||||
| import com.iformall.enums.EnumSex; | import com.iformall.enums.EnumSex; | ||||
| import com.iformall.enums.EnumSpeakType; | |||||
| import com.iformall.mapper.VoiceMapper; | import com.iformall.mapper.VoiceMapper; | ||||
| import com.iformall.service.sm.VoiceInfoService; | import com.iformall.service.sm.VoiceInfoService; | ||||
| import com.iformall.sm.AiPhotoSpeakResult; | import com.iformall.sm.AiPhotoSpeakResult; | ||||
| @@ -17,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import org.springframework.util.ObjectUtils; | import org.springframework.util.ObjectUtils; | ||||
| import java.util.ArrayList; | |||||
| import java.util.List; | import java.util.List; | ||||
| @Service | @Service | ||||
| @@ -31,7 +33,11 @@ public class VoiceInfoServiceImpl implements VoiceInfoService { | |||||
| voiceInfos.forEach(x -> { | voiceInfos.forEach(x -> { | ||||
| if (StringUtils.isNotEmpty(x.getStyleList())) { | if (StringUtils.isNotEmpty(x.getStyleList())) { | ||||
| List<String> strings = JSON.parseArray(x.getStyleList(), String.class); | List<String> strings = JSON.parseArray(x.getStyleList(), String.class); | ||||
| x.setStyle(strings); | |||||
| List<String> list = new ArrayList<>(); | |||||
| strings.forEach(y->{ | |||||
| list.add(EnumSpeakType.getEnum(y).getMessage()); | |||||
| }); | |||||
| x.setStyle(list); | |||||
| } else { | } else { | ||||
| x.setStyle(Lists.newArrayList()); | x.setStyle(Lists.newArrayList()); | ||||
| } | } | ||||