xiangpei
2024-06-04 81b6f1cc38a941b65f989ecdd40529f2648bdd8c
src/main/java/com/ycl/jxkg/controller/admin/ExamPaperController.java
@@ -2,30 +2,26 @@
import com.ycl.jxkg.base.BaseApiController;
import com.ycl.jxkg.base.Result;
import com.ycl.jxkg.domain.ExamPaper;
import com.ycl.jxkg.domain.entity.ExamPaper;
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;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@RequiredArgsConstructor
@RestController("AdminExamPaperController")
@RequestMapping(value = "/api/admin/exam/paper")
public class ExamPaperController extends BaseApiController {
    private final ExamPaperService examPaperService;
    @Autowired
    public ExamPaperController(ExamPaperService examPaperService) {
        this.examPaperService = examPaperService;
    }
    @RequestMapping(value = "/page", method = RequestMethod.POST)
    public Result<PageInfo<ExamResponseVO>> pageList(@RequestBody ExamPaperPageRequestVO model) {
@@ -70,9 +66,8 @@
    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
    public Result delete(@PathVariable Integer id) {
        ExamPaper examPaper = examPaperService.selectById(id);
        examPaper.setDeleted(true);
        examPaperService.updateByIdFilter(examPaper);
        ExamPaper examPaper = examPaperService.getById(id);
        examPaperService.updateById(examPaper);
        return Result.ok();
    }
}