Commit 856dce62 authored by 刘基明's avatar 刘基明

添加新课程Feign接口

parent 1b72f29d
...@@ -211,7 +211,7 @@ public class ThemeManager { ...@@ -211,7 +211,7 @@ public class ThemeManager {
//Entity转Qo //Entity转Qo
List<ThemeQo> themeQos = ConvertUtil.themeEntitiesToDTOs(themeEntities); List<ThemeQo> themeQos = ConvertUtil.themeEntitiesToDTOs(themeEntities);
//批量查询附件detail //批量查询附件detail
productService.transferAttachment(themeQos,userId); productService.transferAttachments(themeQos);
for (ThemeQo themeQO : themeQos) { for (ThemeQo themeQO : themeQos) {
buildThemeQoExtraInfo(userId, themeQO); buildThemeQoExtraInfo(userId, themeQO);
} }
...@@ -269,6 +269,8 @@ public class ThemeManager { ...@@ -269,6 +269,8 @@ public class ThemeManager {
private void buildMainTestExtraInfo(ThemeQo themeQo, String userId) { private void buildMainTestExtraInfo(ThemeQo themeQo, String userId) {
//附件列表 //附件列表
String themeId = themeQo.getThemeId(); String themeId = themeQo.getThemeId();
productService.transferAttachement(themeQo);
//迄今时间 //迄今时间
themeQo.setUpToNowTime(calUpToNowTime(themeQo.getCreateTime())); themeQo.setUpToNowTime(calUpToNowTime(themeQo.getCreateTime()));
//用户信息:头像、昵称 //用户信息:头像、昵称
......
...@@ -28,6 +28,7 @@ import org.springframework.util.CollectionUtils; ...@@ -28,6 +28,7 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -65,7 +66,14 @@ public class ProductService { ...@@ -65,7 +66,14 @@ public class ProductService {
private TopicService topicService; private TopicService topicService;
public void transferAttachment(List<ThemeQo> themeQos, String userId) { public void transferAttachement(ThemeQo themeQo){
ArrayList<ThemeQo> themeQos = new ArrayList<>();
themeQos.add(themeQo);
transferAttachments(themeQos);
}
public void transferAttachments(List<ThemeQo> themeQos) {
// 短视频信息 // 短视频信息
Map<String, ShortVideoBaseInfoResp> shortVideoMap = Maps.newHashMap(); Map<String, ShortVideoBaseInfoResp> shortVideoMap = Maps.newHashMap();
// 课程信息 // 课程信息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment