| | |
| | | List<Integer> collect = byUserId.stream().map(TCoursePackagePayment::getCoursePackageId).collect(Collectors.toList()); |
| | | List<TCoursePackage> list = tcpService.list(new QueryWrapper<TCoursePackage>() |
| | | .in("id", collect)); |
| | | list.forEach(vo -> { |
| | | |
| | | byUserId.forEach(vo -> { |
| | | |
| | | StuSessionDetailsVo detVo = new StuSessionDetailsVo(); |
| | | if (vo.getType()!=2) { |
| | | detVo.setSessionid(vo.getId()); |
| | | detVo.setSessionName(vo.getName()); |
| | | String afterDayDate = DateUtil.getAfterDayDate2(vo.getInsertTime(), vo.getValidDays() + ""); |
| | | detVo.setPeriodOfValidity(afterDayDate); |
| | | detVo.setSessionid(vo.getCoursePackageId()); |
| | | TCoursePackage byId = coursePackageService.getById(vo.getCoursePackageId()); |
| | | detVo.setSessionName(byId.getName()); |
| | | // String afterDayDate = DateUtil.getAfterDayDate2(vo.getInsertTime(), vo.getValidDays() + ""); |
| | | |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String format1 = simpleDateFormat.format(vo.getUseTime()); |
| | | detVo.setPeriodOfValidity(format1); |
| | | |
| | | detVo.setTotalNums(vo.getTotalClassHours()); |
| | | detVo.setDeductedNums(vo.getTotalClassHours()-vo.getLaveClassHours()); |
| | | detVo.setRemainingNums(vo.getLaveClassHours()); |
| | | |
| | | detailsVos.add(detVo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }); |
| | | |
| | | // list.forEach(vo -> { |
| | | // StuSessionDetailsVo detVo = new StuSessionDetailsVo(); |
| | | // if (vo.getType()!=2) { |
| | | // detVo.setSessionid(vo.getId()); |
| | | // detVo.setSessionName(vo.getName()); |
| | | // String afterDayDate = DateUtil.getAfterDayDate2(vo.getInsertTime(), vo.getValidDays() + ""); |
| | | // detVo.setPeriodOfValidity(afterDayDate); |
| | | // |
| | | // detVo.setTotalNums(ToolUtil.isEmpty(tCoursePackagePayment.getTotalCourseNums()) ? 0 : tCoursePackagePayment.getTotalCourseNums()); |
| | | // detVo.setDeductedNums(ToolUtil.isEmpty(tCoursePackagePayment.getDeductionNums()) ? 0 : tCoursePackagePayment.getDeductionNums()); |
| | | // detVo.setRemainingNums(ToolUtil.isEmpty(tCoursePackagePayment.getResidueNums())? 0 : tCoursePackagePayment.getResidueNums()); |
| | | // |
| | | // detailsVos.add(detVo); |
| | | // } |
| | | // }); |
| | | } |
| | | return detailsVos; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | private TOrderService orderService; |
| | | |
| | | |
| | | /** |
| | | * 已报名课程详情 |
| | |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(packagePaymentService.queryRegisteredCourseDetails(coursePayId,appUserId)); |
| | | CourseDetailsResponse courseDetailsResponse = packagePaymentService.queryRegisteredCourseDetails(coursePayId, appUserId,lon,lat); |
| | | |
| | | |
| | | if (orderId!=null){ |
| | | TOrder byId = orderService.getById(orderId); |
| | | courseDetailsResponse.setAmount(byId.getPrice()); |
| | | } |
| | | return ResultUtil.success(courseDetailsResponse); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | throw new RuntimeException(e.getMessage()); |
| | |
| | | .eq(CoursePackageScheduling::getCoursePackageId, tCoursePackage.getId()) |
| | | .like(CoursePackageScheduling::getClassDate, courseDetailReq.getTime()) |
| | | ); |
| | | if(list3.size()==0){ |
| | | if(list3.isEmpty()){ |
| | | detailsListVo.setType(2); |
| | | objects.add(detailsListVo); |
| | | continue; |
| | | } |
| | | //排课的ids |
| | | List<Long> collect2 = list3.stream().map(CoursePackageScheduling::getId).collect(Collectors.toList()); |
| | | if(collect2.size()==0){ |
| | | if(collect2.isEmpty()){ |
| | | collect2.add(-1l); |
| | | } |
| | | |