xiangpei
2024-05-17 abdd896a66eced1355a24ea5eabbee497a745fe5
src/main/java/com/mindskip/xzs/controller/admin/ExamPaperController.java
@@ -19,6 +19,7 @@
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperPageRequestVM;
import com.mindskip.xzs.viewmodel.admin.exam.ExamResponseVM;
import lombok.SneakyThrows;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -48,7 +49,7 @@
    @RequestMapping(value = "/page", method = RequestMethod.POST)
    public RestResponse<PageInfo<ExamResponseVM>> pageList(@RequestBody ExamPaperPageRequestVM model) {
        model.setDeptIds(isDeptAdmin() ? getAdminDeptIds() : null);
        model.setDeptIds(ObjectUtils.isNotEmpty(model.getDeptIds()) ? model.getDeptIds() : getAdminDeptIds());
        if (Objects.nonNull(model.getLevel())) {
            model.setDeptIds(Collections.singletonList(model.getLevel()));
        }
@@ -138,6 +139,7 @@
    @RequestMapping(value = "/selectStudent", method = RequestMethod.POST)
    public RestResponse<PageInfo<UserVO>> selectStudent(@RequestBody UserVO userVO) {
        return RestResponse.ok(examPaperService.selectStudent(userVO));
        List<Integer> adminDeptIds = getAdminDeptIds();
        return RestResponse.ok(examPaperService.selectStudent(userVO, adminDeptIds));
    }
}