8 changed files with 87 additions and 20 deletions
@ -0,0 +1,9 @@ |
|||||
|
package com.project.exam.domain.service; |
||||
|
|
||||
|
import com.project.base.domain.result.Result; |
||||
|
import com.project.exam.domain.dto.ExamRecordDTO; |
||||
|
|
||||
|
public interface GetDetailExamRecordDomainService { |
||||
|
|
||||
|
Result<ExamRecordDTO> getDetail(Long id) throws Exception; |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
package com.project.exam.domain.service.impl; |
||||
|
|
||||
|
import com.project.base.domain.result.Result; |
||||
|
import com.project.exam.domain.dto.ExamRecordDTO; |
||||
|
import com.project.exam.domain.service.BuildExamRecordDomainService; |
||||
|
import com.project.exam.domain.service.GetDetailExamRecordDomainService; |
||||
|
import com.project.exam.mapper.ExamRecordMapper; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service |
||||
|
public class GetDetailExamRecordDomainServiceImpl implements GetDetailExamRecordDomainService { |
||||
|
|
||||
|
@Autowired |
||||
|
private BuildExamRecordDomainService buildExamRecordDomainService; |
||||
|
@Autowired |
||||
|
private ExamRecordMapper examRecordMapper; |
||||
|
@Override |
||||
|
public Result<ExamRecordDTO> getDetail(Long id) throws Exception { |
||||
|
ExamRecordDTO dto = examRecordMapper.selectById(id).toDTO(ExamRecordDTO::new); |
||||
|
|
||||
|
return Result.success(buildExamRecordDomainService.buildDTO(dto)); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue