代码注释package com.mindskip.xzs.controller.admin; import…
- User
代码注释package com.mindskip.xzs.controller.admin;
import com.mindskip.xzs.base.BaseApiController; import com.mindskip.xzs.base.RestResponse; import com.mindskip.xzs.domain.ExamPaperAnswer; import com.mindskip.xzs.domain.Subject; import com.mindskip.xzs.domain.User; import com.mindskip.xzs.service.; import com.mindskip.xzs.utility.DateTimeUtil; import com.mindskip.xzs.utility.ExamUtil; import com.mindskip.xzs.utility.PageInfoHelper; import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageResponseVM; import com.mindskip.xzs.viewmodel.admin.paper.ExamPaperAnswerPageRequestVM; import com.github.pagehelper.PageInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.;
@RestController("AdminExamPaperAnswerController") @RequestMapping(value = "/api/admin/examPaperAnswer") public class ExamPaperAnswerController extends BaseApiController {
codeprivate final ExamPaperAnswerService examPaperAnswerService; private final SubjectService subjectService; private final UserService userService; @Autowired public ExamPaperAnswerController(ExamPaperAnswerService examPaperAnswerService, SubjectService subjectService, UserService userService) { this.examPaperAnswerService = examPaperAnswerService; this.subjectService = subjectService; this.userService = userService; } @RequestMapping(value = "/page", method = RequestMethod.POST) public RestResponse<PageInfo<ExamPaperAnswerPageResponseVM>> pageJudgeList(@RequestBody ExamPaperAnswerPageRequestVM model) { PageInfo<ExamPaperAnswer> pageInfo = examPaperAnswerService.adminPage(model); PageInfo<ExamPaperAnswerPageResponseVM> page = PageInfoHelper.copyMap(pageInfo, e -> { ExamPaperAnswerPageResponseVM vm = modelMapper.map(e, ExamPaperAnswerPageResponseVM.class); Subject subject = subjectService.selectById(vm.getSubjectId()); vm.setDoTime(ExamUtil.secondToVM(e.getDoTime())); vm.setSystemScore(ExamUtil.scoreToVM(e.getSystemScore())); vm.setUserScore(ExamUtil.scoreToVM(e.getUserScore())); vm.setPaperScore(ExamUtil.scoreToVM(e.getPaperScore())); vm.setSubjectName(subject.getName()); vm.setCreateTime(DateTimeUtil.dateFormat(e.getCreateTime())); User user = userService.selectById(e.getCreateUser()); vm.setUserName(user.getUserName()); return vm; }); return RestResponse.ok(page); } - Assistant
这段代码是一个Java Spring框架下的后端控制器类,用于处理一个管理员查询学生考试试卷答案的请求。代码中涉及到的诸多类型、方法等,都是框架或自定义的类、方法。下面是对代码中重要部分的注释:
java - User
- Assistant
- User
- Assistant
这段代码是一个Java Spring框架下的后端控制器类,用于处理一个管理员管理考试试卷的请求。代码中涉及到的诸多类型、方法等,都是框架或自定义的类、方法。下面是对代码中重要部分的注释:
java