xiangpei
2024-05-31 c9d04bc519b73f7fc4841c34e2f15fca9db7aad2
src/main/java/com/ycl/jxkg/controller/wx/student/ExamPaperController.java
@@ -12,6 +12,7 @@
import com.ycl.jxkg.vo.student.exam.ExamPaperPageResponseVO;
import com.ycl.jxkg.vo.student.exam.ExamPaperPageVO;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -19,7 +20,7 @@
import javax.validation.Valid;
@RequiredArgsConstructor
@Controller("WXStudentExamController")
@RequestMapping(value = "/api/wx/student/exampaper")
@ResponseBody
@@ -27,12 +28,6 @@
    private final ExamPaperService examPaperService;
    private final SubjectService subjectService;
    @Autowired
    public ExamPaperController(ExamPaperService examPaperService, SubjectService subjectService) {
        this.examPaperService = examPaperService;
        this.subjectService = subjectService;
    }
    @RequestMapping(value = "/select/{id}", method = RequestMethod.POST)
@@ -49,7 +44,7 @@
        PageInfo<ExamPaperPageResponseVO> page = PageInfoHelper.copyMap(pageInfo, e -> {
            ExamPaperPageResponseVO vo = new ExamPaperPageResponseVO();
            BeanUtils.copyProperties(e, vo);
            Subject subject = subjectService.selectById(vo.getSubjectId());
            Subject subject = subjectService.getById(vo.getSubjectId());
            vo.setSubjectName(subject.getName());
            vo.setCreateTime(DateTimeUtil.dateFormat(e.getCreateTime()));
            return vo;