feat:1. 修正错误命名 2. 为学习会话详情接口增加taskName字段
This commit is contained in:
+4
-4
@@ -2,7 +2,7 @@ package com.guo.learningprogresstracker.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.guo.learningprogresstracker.dto.request.EndedStudySessionRequest;
|
||||
import com.guo.learningprogresstracker.dto.response.StudySessionResponce;
|
||||
import com.guo.learningprogresstracker.dto.response.StudySessionResponse;
|
||||
import com.guo.learningprogresstracker.entity.CommonResult;
|
||||
import com.guo.learningprogresstracker.entity.StudySessionsEntity;
|
||||
import com.guo.learningprogresstracker.exception.ErrorParameterException;
|
||||
@@ -41,12 +41,12 @@ public class StudySessionController {
|
||||
* 通过sessionNum获取一个【学习会话】
|
||||
*/
|
||||
@GetMapping("/{sessionNum}")
|
||||
public CommonResult<StudySessionResponce> getStudySessionBySessionNum(@NotEmpty(message = "sessionNum不可为空") @PathVariable String sessionNum) throws ErrorParameterException {
|
||||
public CommonResult<StudySessionResponse> getStudySessionBySessionNum(@NotEmpty(message = "sessionNum不可为空") @PathVariable String sessionNum) throws ErrorParameterException {
|
||||
StudySessionsEntity studySessionsEntity = studySessionsServiceImpl.getOneOpt(Wrappers.lambdaQuery(StudySessionsEntity.class)
|
||||
.eq(StudySessionsEntity::getSessionNum, sessionNum))
|
||||
.orElseThrow(() -> new ErrorParameterException("会话[" + sessionNum + "]不存在"));
|
||||
StudySessionResponce studySessionResponce = StudySessionConvert.MAPPER.toStudySessionResponce(studySessionsEntity);
|
||||
return CommonResult.success(studySessionResponce);
|
||||
StudySessionResponse studySessionResponse = StudySessionConvert.MAPPER.toStudySessionResponse(studySessionsEntity);
|
||||
return CommonResult.success(studySessionResponse);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user