Commit bf9dc5b3 authored by 刘基明's avatar 刘基明

添加新课程Feign接口

parent 856dce62
...@@ -129,7 +129,7 @@ public class ThemeManager { ...@@ -129,7 +129,7 @@ public class ThemeManager {
if (themeEntity == null) { if (themeEntity == null) {
throw new BizException("找不到帖子id:" + themeId); throw new BizException("找不到帖子id:" + themeId);
} }
ThemeQo themeQo = ConvertUtil.themeEntityToQo2(themeEntity); ThemeQo themeQo = ConvertUtil.themeEntityToQo(themeEntity);
buildMainTestExtraInfo(themeQo, userId); buildMainTestExtraInfo(themeQo, userId);
return themeQo; return themeQo;
} }
......
...@@ -18,6 +18,16 @@ import java.util.stream.Collectors; ...@@ -18,6 +18,16 @@ import java.util.stream.Collectors;
public class ConvertUtil { public class ConvertUtil {
public static ThemeQo themeEntityToQo(ThemeEntity themeEntity) {
if (themeEntity==null){
return null;
}
ThemeQo themeQO = new ThemeQo();
BeanUtils.copyProperties(themeEntity, themeQO);
List<ThemeContentQo> themeContentQos = JsonUtil.toBean(themeEntity.getContent(), new TypeReference<List<ThemeContentQo>>() {});
return themeQO;
}
public static ThemeQo themeEntityToQo2(ThemeEntity themeEntity) { public static ThemeQo themeEntityToQo2(ThemeEntity themeEntity) {
if (themeEntity==null){ if (themeEntity==null){
return null; return null;
......
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