| | |
| | | import com.ycl.jxkg.base.BaseApiController; |
| | | import com.ycl.jxkg.base.Result; |
| | | import com.ycl.jxkg.domain.entity.ExamPaper; |
| | | import com.ycl.jxkg.mapper.ExamPaperMapper; |
| | | import com.ycl.jxkg.service.ExamPaperService; |
| | | import com.ycl.jxkg.utils.DateTimeUtil; |
| | | import com.ycl.jxkg.utils.PageInfoHelper; |
| | | import com.ycl.jxkg.vo.admin.exam.ExamPaperPageRequestVO; |
| | | import com.ycl.jxkg.vo.admin.exam.ExamPaperEditRequestVO; |
| | | import com.ycl.jxkg.vo.admin.exam.ExamResponseVO; |
| | | import com.ycl.jxkg.domain.vo.admin.exam.ExamPaperPageRequestVO; |
| | | import com.ycl.jxkg.domain.vo.admin.exam.ExamPaperEditRequestVO; |
| | | import com.ycl.jxkg.domain.vo.admin.exam.ExamResponseVO; |
| | | import com.github.pagehelper.PageInfo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | @RequestMapping(value = "/api/admin/exam/paper") |
| | | public class ExamPaperController extends BaseApiController { |
| | | |
| | | private final ExamPaperService examPaperService; |
| | | private final ExamPaperService examPaperService; |
| | | |
| | | private final ExamPaperMapper baseMapper; |
| | | @RequestMapping(value = "/page", method = RequestMethod.POST) |
| | | public Result<PageInfo<ExamResponseVO>> pageList(@RequestBody ExamPaperPageRequestVO model) { |
| | | PageInfo<ExamPaper> pageInfo = examPaperService.page(model); |
| | |
| | | |
| | | @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) |
| | | public Result delete(@PathVariable Integer id) { |
| | | ExamPaper examPaper = examPaperService.getById(id); |
| | | examPaperService.updateById(examPaper); |
| | | baseMapper.deleteById(id); |
| | | return Result.ok(); |
| | | } |
| | | } |