47 lines
2.1 KiB
Java
47 lines
2.1 KiB
Java
package com.guo.learningprogresstracker.service;
|
|
|
|
import com.guo.learningprogresstracker.dto.request.CreateFragmentsRequest;
|
|
import com.guo.learningprogresstracker.dto.request.UpdateFragmentsRequest;
|
|
import com.guo.learningprogresstracker.entity.StudyReportFragmentsEntity;
|
|
import com.baomidou.mybatisplus.extension.service.IService;
|
|
import com.guo.learningprogresstracker.exception.NotFindEntitiesException;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @author guo
|
|
* @description 针对表【study_report_fragments(记录学习过程中的学习内容报告残片)】的数据库操作Service
|
|
* @createDate 2024-06-09 15:28:48
|
|
*/
|
|
public interface StudyReportFragmentsService extends IService<StudyReportFragmentsEntity> {
|
|
|
|
void createFragments(CreateFragmentsRequest request) throws NotFindEntitiesException;
|
|
|
|
void updateFragments(Integer id, UpdateFragmentsRequest request) throws NotFindEntitiesException;
|
|
|
|
List<StudyReportFragmentsEntity> getFragmentsBySession(String sessionNum);
|
|
|
|
/**
|
|
* 修改内容归属(归属-01)。传空表示清空归属、回到待归类。
|
|
* <p>归属变化会把原任务与新任务的导图标记为待更新。</p>
|
|
*/
|
|
void assignOwnership(Integer id, String ownerTaskNum) throws NotFindEntitiesException;
|
|
|
|
/** 删除知识碎片(软删除);所属任务的导图会被标记为待更新 */
|
|
void deleteFragment(Integer id) throws NotFindEntitiesException;
|
|
|
|
/** 待归类内容:没有内容归属的碎片,按时间倒序 */
|
|
List<StudyReportFragmentsEntity> getPendingOwnershipFragments();
|
|
|
|
/** 待归类内容的条数,用于复习总览的独立区块 */
|
|
long countPendingOwnershipFragments();
|
|
|
|
/**
|
|
* 报告内容变化(新增/编辑/删除)后,把该会话碎片对应的任务导图与标签导图置「待更新」(报告-02)。
|
|
*
|
|
* <p>报告现在是导图生成的参考上下文,因此它也属于「导图素材」的一部分:
|
|
* 变化只置「待更新」,重建仍由用户手动触发,与碎片/标签变化同口径。</p>
|
|
*/
|
|
void markMindMapsStaleForSession(String sessionNum);
|
|
}
|