| | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | .eq("status", 1) |
| | | .orderByDesc("insertTime")); |
| | | |
| | | List<Integer> ids = new ArrayList<>(); |
| | | for (CoursePackageOrderStudent tCoursePackagePayment : tCoursePackagePayments) { |
| | | ids.add(tCoursePackagePayment.getCoursePackageId()); |
| | | } |
| | | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(new Date()); |
| | | calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH), 23, 59, 59); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | List<CoursePackageScheduling> list = coursePackageSchedulingService.list(new QueryWrapper<CoursePackageScheduling>() |
| | | .eq("appUserId", appUserId) |
| | | .eq("studentId", stuId) |
| | | // .lt("classDate", sdf.format(calendar.getTime())) |
| | | .orderByAsc("classDate") |
| | | ); |
| | | List<Long> ids = list.stream().map(CoursePackageScheduling::getId).collect(Collectors.toList()); |
| | | |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd"); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd HH:mm"); |
| | | if (tCoursePackagePayments.size() > 0) { |
| | | if (list.size() > 0) { |
| | | |
| | | // int pageNum = 1; // 页码 |
| | | int pageSize = 10; // 每页记录数 |
| | | Page<CoursePackageStudent> page = new Page<>(pageNum, pageSize); |
| | | IPage<CoursePackageStudent> coursePackageStudentPage = cpsMapper.selectPage(page, new QueryWrapper<CoursePackageStudent>() |
| | | .in("coursePackageId", ids) |
| | | .eq("studentId", stuId) |
| | | .eq("appUserId", appUserId) |
| | | .in("coursePackageSchedulingId", ids) |
| | | .eq("reservationStatus", 1)); |
| | | List<CoursePackageStudent> coursePackageStudent1 = coursePackageStudentPage.getRecords(); |
| | | |
| | |
| | | if (byId == null) { |
| | | continue; |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String dateString1 = sdf.format(byId.getClassDate()); |
| | | String dateString2 = sdf.format(byId.getEndDate()); |
| | | |