ThemeService.java 3.0 KB

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