|
|
@@ -174,15 +174,15 @@ public class SpeakerServiceImpl implements ISpeakerService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void textParseVoiceAppIps(String texts,List<PlayVo> playVoList,Integer playNum) {
|
|
|
+ public void textParseVoiceAppIps(String texts,List<PlayVo> playVoList,Integer playNum,Integer level) {
|
|
|
if (playVoList.size() == 1) {
|
|
|
- commonTextUrlVoice(texts, playVoList,playNum);
|
|
|
+ commonTextUrlVoice(texts, playVoList,playNum,level);
|
|
|
} else {
|
|
|
String deviceIp =playVoList.get(0).getDeviceIp();
|
|
|
- PlayBatchVo playBatchVo=commonPatchTextUrlVoice(texts,playVoList,playNum);
|
|
|
+ PlayBatchVo playBatchVo=commonPatchTextUrlVoice(texts,playVoList,playNum,level);
|
|
|
boolean isTrue = invokePost(JSONObject.toJSON(playBatchVo).toString(), deviceIp,1, playVoList.get(0).getPort());
|
|
|
if (isTrue) {
|
|
|
- textParseVoiceAppIps(texts,playVoList,playNum);
|
|
|
+ textParseVoiceAppIps(texts,playVoList,playNum,level);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -266,17 +266,18 @@ public class SpeakerServiceImpl implements ISpeakerService {
|
|
|
* @param texts
|
|
|
* @param playVoList
|
|
|
*/
|
|
|
- private void commonTextUrlVoice(String texts,List<PlayVo> playVoList,Integer playNum) {
|
|
|
+ private void commonTextUrlVoice(String texts,List<PlayVo> playVoList,Integer playNum,Integer level) {
|
|
|
for (PlayVo play : playVoList) {
|
|
|
String deviceIp=play.getDeviceIp();
|
|
|
List<UrlVo> urlVoList = getUrlList(texts,playNum);
|
|
|
if (null != play.getParams()) {
|
|
|
play.getParams().setTid(UUID.randomUUID().toString());
|
|
|
play.getParams().setUrls(urlVoList);
|
|
|
+ play.getParams().setLevel(level);
|
|
|
}
|
|
|
boolean isTrue = invokePost(JSONObject.toJSON(play).toString(),deviceIp, 0, play.getPort());
|
|
|
if (isTrue) {
|
|
|
- commonTextParseVoice(texts,playVoList);
|
|
|
+ commonTextUrlVoice(texts,playVoList,playNum,level);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -289,13 +290,14 @@ public class SpeakerServiceImpl implements ISpeakerService {
|
|
|
* @param texts
|
|
|
* @param playVoList
|
|
|
*/
|
|
|
- private PlayBatchVo commonPatchTextUrlVoice(String texts,List<PlayVo> playVoList,Integer playNum) {
|
|
|
+ private PlayBatchVo commonPatchTextUrlVoice(String texts,List<PlayVo> playVoList,Integer playNum,Integer level) {
|
|
|
PlayBatchVo playBatchVo = new PlayBatchVo();
|
|
|
BeanUtils.copyProperties(playVoList.get(0), playBatchVo);
|
|
|
List<UrlVo> urlVoList = getUrlList(texts,playNum);
|
|
|
if (null != playBatchVo.getParams()) {
|
|
|
playBatchVo.getParams().setTid(UUID.randomUUID().toString());
|
|
|
playBatchVo.getParams().setUrls(urlVoList);
|
|
|
+ playBatchVo.getParams().setLevel(level);
|
|
|
}
|
|
|
List<String> snsList = new ArrayList<>();
|
|
|
for (PlayVo playVo : playVoList) {
|