|
@@ -5,10 +5,7 @@ import cn.iselab.mooctest.site.models.*;
|
|
|
import cn.iselab.mooctest.site.service.*;
|
|
|
import cn.iselab.mooctest.site.service.common.PdfService;
|
|
|
import cn.iselab.mooctest.site.web.data.*;
|
|
|
-import cn.iselab.mooctest.site.web.data.wrapper.CaseExtendsVOWrapper;
|
|
|
-import cn.iselab.mooctest.site.web.data.wrapper.ExamVOWrapper;
|
|
|
-import cn.iselab.mooctest.site.web.data.wrapper.PaperVOWrapper;
|
|
|
-import cn.iselab.mooctest.site.web.data.wrapper.ThemeVOWrapper;
|
|
|
+import cn.iselab.mooctest.site.web.data.wrapper.*;
|
|
|
import cn.iselab.mooctest.site.web.logic.OSSLogic;
|
|
|
import cn.iselab.mooctest.site.web.logic.ThemeLogic;
|
|
|
import com.google.common.collect.Lists;
|
|
@@ -60,6 +57,8 @@ public class ThemeLogicImpl implements ThemeLogic {
|
|
|
private OSSLogic ossLogic;
|
|
|
@Autowired
|
|
|
private CourseResourceService courseResourceService;
|
|
|
+ @Autowired
|
|
|
+ private CourseResourceVOWrapper courseResourceVOWrapper;
|
|
|
|
|
|
private static final String BASE_DIR = "theme";
|
|
|
@Override
|
|
@@ -219,4 +218,10 @@ public class ThemeLogicImpl implements ThemeLogic {
|
|
|
if(user2ThemeService.findByUserIdAndThemeId(userId,themeId)==null)
|
|
|
user2ThemeService.createRelation(userId,themeId);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CourseResourceVO getCourseResourceById(long resourceId) {
|
|
|
+ CourseResource courseResource = courseResourceService.getCourseResourceByResourceId(resourceId);
|
|
|
+ return courseResourceVOWrapper.wrap(courseResource);
|
|
|
+ }
|
|
|
}
|