feat(预期):学习预期后端闭环——实体/服务/端点
- 迁移:study_expectations.session_num 改为 varchar 对齐会话编码
- StudyExpectationsEntity / Mapper / Service:每会话一条预期,重复创建覆盖
- StudySessionController:PUT/GET /{sessionNum}/expectation
- 移除空的 studySessionList 占位方法
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.guo.learningprogresstracker.service;
|
||||
|
||||
import com.guo.learningprogresstracker.entity.StudyExpectationsEntity;
|
||||
import com.guo.learningprogresstracker.exception.ErrorParameterException;
|
||||
|
||||
/**
|
||||
* 学习预期服务
|
||||
*/
|
||||
public interface StudyExpectationsService {
|
||||
|
||||
/**
|
||||
* 为学习会话创建学习预期(每个会话最多一条,重复创建则覆盖)
|
||||
*/
|
||||
StudyExpectationsEntity upsertExpectation(String sessionNum, String description) throws ErrorParameterException;
|
||||
|
||||
/**
|
||||
* 查询学习会话的学习预期,不存在时返回 null
|
||||
*/
|
||||
StudyExpectationsEntity getBySessionNum(String sessionNum);
|
||||
}
|
||||
Reference in New Issue
Block a user