| | |
| | | import com.mindskip.xzs.utility.PageInfoHelper; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | @RequestMapping(value = "/list", method = RequestMethod.GET) |
| | | public RestResponse<PageInfo<ExamTemplatesVO>> list(ExamTemplatesVO examTemplatesVO) throws Exception { |
| | | // 如果是部门管理员,需要做数据权限 |
| | | examTemplatesVO.setDeptId(isDeptAdmin() ? getAdminDeptIds() : null); |
| | | examTemplatesVO.setDeptId(ObjectUtils.isNotEmpty(examTemplatesVO.getDeptId()) ? examTemplatesVO.getDeptId() : getAdminDeptIds()); |
| | | PageInfo<ExamTemplates> pageInfo = examTemplatesService.getByadmins(examTemplatesVO); |
| | | PageInfo<ExamTemplatesVO> info = PageInfoHelper.copyMap(pageInfo, e -> { |
| | | ExamTemplatesVO vo = new ExamTemplatesVO(); |