ThemeService.java 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package cn.iselab.mooctest.site.service;
  2. import cn.iselab.mooctest.site.common.enums.EntityTypeEnum;
  3. import cn.iselab.mooctest.site.models.*;
  4. import cn.iselab.mooctest.site.web.data.CourseVO;
  5. import cn.iselab.mooctest.site.web.data.ThemeDetailVO;
  6. import org.springframework.data.domain.Page;
  7. import org.springframework.data.domain.Pageable;
  8. import java.util.List;
  9. import java.util.Map;
  10. /**
  11. * @program: mooctest-site
  12. * @mail: menduo96@gmail.com
  13. * @author: menduo
  14. * @create: 2019-04-23 13:16
  15. **/
  16. public interface ThemeService {
  17. ThemeDetail createThemeDetail(ThemeDetail themeDetail);
  18. ThemeDetail updateThemeDetail(ThemeDetail themeDetail);
  19. ThemeDetail deleteThemeDetailById(long id);
  20. ThemeDetail getThemeDetailById(long id);
  21. Page<ThemeDetail> getThemeDetails(Pageable pageable);
  22. Page<ThemeDetail> getThemeDetails(Pageable pageable, String keyword, int type);
  23. Page<ThemeDetail> getThemeDetailsByOwnerId(Long ownerId, String keyword, Pageable pageable);
  24. Page<CourseResource> getThemeCourseResources(Pageable pageable, String keyword);
  25. List<CourseResource> getCourseResources();
  26. List<ThemeDetail> getThemeDetailList();
  27. List<ThemeDetail> getThemeDetailByIds(Long[] ids);
  28. List<ThemeDetail> getThemeDetailByIdList(List<Long> ids);
  29. List<ThemeDetail> getThemeDetailListByOwnerId(Long ownerId);
  30. List<ThemeEntityRelations> getThemeEntityRelations(long themeId);
  31. List<ThemeEntityRelations> getThemeEntityRelations(long themeId, EntityTypeEnum entityTypeEnum);
  32. List<ThemeEntityRelations> getThemeEntityRelationsByEntityId(long entityId, EntityTypeEnum entityTypeEnum);
  33. ThemeEntityRelations createRelationBetweenThemeAndEntity(long themeId, long caseId, EntityTypeEnum entityTypeEnum);
  34. boolean deleteEntityRelationByThemeId(Long themeId);
  35. boolean deleteRelationBetweenThemeAndEntity(long themeId, long caseId, EntityTypeEnum entityTypeEnum);
  36. ThemeEntityRelations checkRelationBetweenThemeAndEntity(long themeId, long entityId, EntityTypeEnum entityTypeEnum);
  37. ThemeEntityRelations addEntity(ThemeEntityRelations themeEntityRelations);
  38. void rmEntity(long id);
  39. ThemeEntityRelations createEntityRelation(long themeId, long entityId, EntityTypeEnum entityType, int sortId, boolean previewable);
  40. void createStudyViewRecord(Long themeId, Long courseId, Long userId, EntityTypeEnum entityType);
  41. int getStudyRecord(Long themeId, List<Long> studentIds, EntityTypeEnum entityType);
  42. StudyRecord getStudyRecordByThemeId(Long themeId, Long courseId, Long userId, EntityTypeEnum entityType);
  43. List<StudyRecord> getStudyCompletenessByThemeId(Long themeId, Long userId, EntityTypeEnum entityType);
  44. Integer updateStatus(ThemeDetail themeDetail);
  45. ThemeEntityRelations createEntityRelation(long themeId, long entityId, EntityTypeEnum entityType);
  46. List<ThemeDetail> getPlatformThemeDetails();
  47. List<ThemeDetail> getCourseByParticipant(Long participantId);
  48. Page<ParticipantCourse> getCourseByParticipant(Long userId, Map<String, String> extraCondition, String keyword, Pageable pageable);
  49. Page<OperationCourse> getOperationCourseList(Pageable pageable, Long userId, Long ownerId, String operation, Map<String, String> extraCondition, String keyword);
  50. List<OperationCourse> getOperationCourseList(Long userId, String operation);
  51. boolean isUserJoinCourse(Long courseId, Long participantId);
  52. Page<ThemeDetail> getPlatformThemeDetails(Map<String, String> extraCondition, Map<String, String> excludeCondition, Pageable pageable, String keyword);
  53. }