feat: 报告作为思维导图生成的参考上下文
This commit is contained in:
@@ -29,6 +29,7 @@ import com.guo.learningprogresstracker.mapper.UserReviewPreferencesMapper;
|
||||
import com.guo.learningprogresstracker.dto.request.UpdateStudyReportRequest;
|
||||
import com.guo.learningprogresstracker.service.ReviewService;
|
||||
import com.guo.learningprogresstracker.service.StudyExpectationsService;
|
||||
import com.guo.learningprogresstracker.service.StudyReportFragmentsService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -70,6 +71,7 @@ public class ReviewServiceImpl implements ReviewService {
|
||||
|
||||
private final StudyReportsMapper studyReportsMapper;
|
||||
private final StudyReportFragmentsMapper studyReportFragmentsMapper;
|
||||
private final StudyReportFragmentsService studyReportFragmentsService;
|
||||
private final StudySessionsMapper studySessionsMapper;
|
||||
private final TasksMapper tasksMapper;
|
||||
private final ReviewRecallRecordMapper reviewRecallRecordMapper;
|
||||
@@ -360,6 +362,8 @@ public class ReviewServiceImpl implements ReviewService {
|
||||
patch.setExpectationVerdict(request.getExpectationVerdict());
|
||||
patch.setFreeSummary(request.getFreeSummary());
|
||||
studyReportsMapper.updateById(patch);
|
||||
// 报告-02:报告内容作为导图参考上下文,改动后相关导图置「待更新」
|
||||
studyReportFragmentsService.markMindMapsStaleForSession(existing.getSessionNum());
|
||||
log.info("学习报告[{}]已修改", id);
|
||||
}
|
||||
|
||||
@@ -368,6 +372,8 @@ public class ReviewServiceImpl implements ReviewService {
|
||||
StudyReportsEntity existing = getReportDetail(id);
|
||||
// 软删除。刻意不连带删除同一会话的知识碎片:碎片是独立原料,可能已被归类到其他任务
|
||||
studyReportsMapper.deleteById(existing.getId());
|
||||
// 报告-02:报告不再作为参考上下文,相关导图置「待更新」
|
||||
studyReportFragmentsService.markMindMapsStaleForSession(existing.getSessionNum());
|
||||
log.info("学习报告[{}]已删除(知识碎片保留)", id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user