| | |
| | | public CourseDetailsResponse queryRegisteredCourseDetails(Long coursePayId, Integer appUserId, String lon, String lat) { |
| | | AppUser appUser = appuClient.queryAppUser(appUserId); |
| | | CourseDetailsResponse response = new CourseDetailsResponse(); |
| | | CoursePackageOrderStudent coursePackageOrderStudent = coursePackageOrderStudentService.getById(coursePayId); |
| | | CoursePackageOrder coursePackageOrder = coursePackageOrderService.getOne(new QueryWrapper<CoursePackageOrder>() |
| | | .eq("appUserId", coursePackageOrderStudent.getAppUserId()) |
| | | .eq("coursePackageId", coursePackageOrderStudent.getCoursePackageId()) |
| | | .eq("payStatus", 2) |
| | | .eq("state", 1) |
| | | .like("studentIds", coursePackageOrderStudent.getStudentId()) |
| | | .orderByDesc("insertTime") |
| | | .last(" limit 0, 1") |
| | | ); |
| | | CoursePackageOrder coursePackageOrder = coursePackageOrderService.getById(coursePayId); |
| | | |
| | | |
| | | response.setChooseHours(coursePackageOrder.getClassHours()); |
| | |
| | | @Override |
| | | public List<Map<String, Object>> queryRegistrationRecord(Page<Map<String, Object>> page, QueryRegistrationRecord queryRegistrationRecord) { |
| | | Integer coursePackageId = queryRegistrationRecord.getCoursePackageId(); |
| | | TCoursePackage coursePackage = coursePackageService.getById(coursePackageId); |
| | | String userName = queryRegistrationRecord.getUserName(); |
| | | List<Integer> userIds = null; |
| | | List<Integer> studentIds = null; |
| | |
| | | studentIds = students.stream().map(Student::getId).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.queryRegistrationRecord(page, coursePackageId, userIds, studentIds); |
| | | |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | |
| | | if (coursePackage.getType()==1){ |
| | | list = this.baseMapper.queryRegistrationRecord(page, coursePackageId, userIds, studentIds);}else { |
| | | list = this.baseMapper.queryRegistrationRecord1(page, coursePackageId, userIds, studentIds); |
| | | } |
| | | for (Map<String, Object> map : list) { |
| | | |
| | | Long id = Long.valueOf(map.get("id").toString()); |
| | | Integer appUserId = Integer.valueOf(map.get("appUserId").toString()); |
| | | Integer studentId = Integer.valueOf(map.get("studentId").toString()); |
| | | Integer studentId = 0; |
| | | if (coursePackage.getType()==1) { |
| | | studentId = Integer.valueOf(map.get("studentId").toString()); |
| | | }else { |
| | | studentId = Integer.valueOf(map.get("studentIds").toString()); |
| | | } |
| | | |
| | | TAppUser appUser = appuClient.queryAppUser1(appUserId); |
| | | map.put("userName", null != appUser ? appUser.getName() : ""); |