| | |
| | | public Result list(@RequestParam(defaultValue = "") String keyword, |
| | | @RequestParam(defaultValue = "10") Integer limit, @RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "1")Integer pageType) { |
| | | |
| | | // System.out.println(ClientUtils.getUserId()); |
| | | // System.out.println(ClientUtils.isAdmin()); |
| | | String teacherId = ClientUtils.isAdmin() ? null : teacherService.getTeacherIdByUserId(ClientUtils.getUserId()); |
| | | // System.out.println("aaa"+teacherId); |
| | | // 获取数据 |
| | | List<ClsClass> clsLst = classService.getClassLst(keyword, teacherId, limit, pageNum, pageType); |
| | | // System.out.println(clsLst); |
| | | // 获取班级总数 |
| | | int count = classService.getClassLstCount(keyword, teacherId, pageType); |
| | | // System.out.println(count); |
| | | // 转成前端所需字段和结构 |
| | | List<Map<String, Object>> lstResult = QBeanUtils.listBean2ListMap(clsLst, |
| | | CollectionUtils.newStringMap("name", "className", "classId", "classId", "classNumber", "classNumber","classTypes","classTypes", |