package cn.iselab.mooctest.site.service; import cn.iselab.mooctest.site.common.enums.EntityTypeEnum; import cn.iselab.mooctest.site.models.CourseResource; import cn.iselab.mooctest.site.models.StudyRecord; import cn.iselab.mooctest.site.models.ThemeDetail; import cn.iselab.mooctest.site.models.ThemeEntityRelations; import cn.iselab.mooctest.site.web.data.CourseVO; import cn.iselab.mooctest.site.web.data.ThemeDetailVO; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import java.util.List; /** * @program: mooctest-site * @mail: menduo96@gmail.com * @author: menduo * @create: 2019-04-23 13:16 **/ public interface ThemeService { ThemeDetail createThemeDetail(ThemeDetail themeDetail); ThemeDetail updateThemeDetail(ThemeDetail themeDetail); ThemeDetail deleteThemeDetailById(long id); ThemeDetail getThemeDetailById(long id); Page getThemeDetails(Pageable pageable); Page getThemeDetails(Pageable pageable, String keyword, int type); Page getThemeDetailsByOwnerId(Long ownerId, String keyword, Pageable pageable); Page getThemeCourseResources(Pageable pageable, String keyword); List getThemeDetails(); List getThemeDetailList(); List getThemeDetailByIds(Long[] ids); List getThemeDetailListByOwnerId(Long ownerId); List getThemeEntityRelations(long themeId); List getThemeEntityRelations(long themeId, EntityTypeEnum entityTypeEnum); List getThemeEntityRelationsByEntityId(long entityId, EntityTypeEnum entityTypeEnum); ThemeEntityRelations createRelationBetweenThemeAndEntity(long themeId, long caseId, EntityTypeEnum entityTypeEnum); boolean deleteEntityRelationByThemeId(Long themeId); boolean deleteRelationBetweenThemeAndEntity(long themeId, long caseId, EntityTypeEnum entityTypeEnum); ThemeEntityRelations checkRelationBetweenThemeAndEntity(long themeId, long entityId, EntityTypeEnum entityTypeEnum); ThemeEntityRelations addEntity(ThemeEntityRelations themeEntityRelations); void rmEntity(long id); ThemeEntityRelations createEntityRelation(long themeId, long entityId, EntityTypeEnum entityType, int sortId); void createStudyViewRecord(Long themeId, Long courseId, Long userId, EntityTypeEnum entityType); int getStudyRecord(Long themeId, List studentIds, EntityTypeEnum entityType); StudyRecord getStudyRecordByThemeId(Long themeId, Long courseId, Long userId, EntityTypeEnum entityType); List getStudyCompletenessByThemeId(Long themeId, Long userId, EntityTypeEnum entityType); Integer updateStatus(ThemeDetail themeDetail); boolean canBeDeleted(Long themeId); ThemeEntityRelations createEntityRelation(long themeId, long entityId, EntityTypeEnum entityType); List getPlatformThemeDetails(); List getCourseByParticipant(Long participantId); }