|
@@ -395,15 +395,8 @@ public class QwSopTempServiceImpl implements IQwSopTempService
|
|
|
rules.setCourseType(0);
|
|
|
rules.setCourseId(e.getCourseId());
|
|
|
rules.setVideoId(e.getVideoId());
|
|
|
- rules.setSorts(sorts.getAndIncrement());
|
|
|
// 设置消息类型
|
|
|
- if(rules.getSorts() == 0){
|
|
|
- rules.setCourseType(0);
|
|
|
- }else if(rules.getSorts() == 1){
|
|
|
- rules.setCourseType(1);
|
|
|
- }else{
|
|
|
- rules.setCourseType(4);
|
|
|
- }
|
|
|
+
|
|
|
QwSopTempContent content = new QwSopTempContent();
|
|
|
content.setTempId(temp.getId());
|
|
|
content.setContentType(3);
|
|
@@ -417,7 +410,27 @@ public class QwSopTempServiceImpl implements IQwSopTempService
|
|
|
setting.setContentType("4");
|
|
|
content.setContent(JSON.toJSONString(setting));
|
|
|
content.setIsBindUrl(1);
|
|
|
- rules.setList(Collections.singletonList(content));
|
|
|
+ List<QwSopTempContent> qwSopTempContents = new ArrayList<>() ;
|
|
|
+ qwSopTempContents.add(content);
|
|
|
+ if (sorts.get() == 0 && !temp.getModeContent().isEmpty()) {
|
|
|
+ QwSopTempContent content2 = new QwSopTempContent();
|
|
|
+ content2.setTempId(temp.getId());
|
|
|
+ content2.setContentType(3);
|
|
|
+ QwSopTempSetting2.Content.Setting setting2 = new QwSopTempSetting2.Content.Setting();
|
|
|
+ setting2.setValue(temp.getModeContent());
|
|
|
+ setting2.setContentType("1");
|
|
|
+ content2.setContent(JSON.toJSONString(setting2));
|
|
|
+ qwSopTempContents.add(content2);
|
|
|
+ }
|
|
|
+ rules.setSorts(sorts.getAndIncrement());
|
|
|
+ if(rules.getSorts() == 0){
|
|
|
+ rules.setCourseType(0);
|
|
|
+ }else if(rules.getSorts() == 1){
|
|
|
+ rules.setCourseType(1);
|
|
|
+ }else{
|
|
|
+ rules.setCourseType(4);
|
|
|
+ }
|
|
|
+ rules.setList(qwSopTempContents);
|
|
|
return rules;
|
|
|
}).collect(Collectors.toList());
|
|
|
day.getList().addAll(rulesList);
|