| | |
| | | TCoursePackagePaymentService paymentService; |
| | | @Autowired |
| | | private CourseCounsumService counsumService; |
| | | |
| | | @Autowired |
| | | private TCoursePackageService coursePackageService; |
| | | //获取退费记录 |
| | | @RequestMapping("/getRefund") |
| | | @ResponseBody |
| | |
| | | @RequestMapping("/bypac") |
| | | @ResponseBody |
| | | public List<Map<String, Object>> bypac(@RequestBody PacQueryDto pacQueryDto) { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | System.out.println("-====studentQeryDto========="+pacQueryDto); |
| | | if (pacQueryDto.getStoreIds()!=null && pacQueryDto.getStoreIds().size()!=0){ |
| | | // 根据门店id 查询课包ids |
| | | List<Integer> coursePackageIds = coursePackageService.list(new QueryWrapper<TCoursePackage>() |
| | | .in("storeId", pacQueryDto.getStoreIds())).stream() |
| | | .map(TCoursePackage::getId).collect(Collectors.toList()); |
| | | pacQueryDto.setStoreIds(coursePackageIds); |
| | | } |
| | | List<Map<String, Object>> pays = paymentService.bypac(pacQueryDto); |
| | | |
| | | System.out.println("=========pays======"+pays); |
| | | |
| | | return pays; |
| | |
| | | CourseCounsum courseCounsum = new CourseCounsum(); |
| | | courseCounsum.setInsertTime(new Date()); |
| | | if (orinPay.getAppUserId()!=studentPay.getAppUserId()){ |
| | | courseCounsum.setReason("赠课"); |
| | | }else { courseCounsum.setReason("转课"); |
| | | courseCounsum.setReason("课时转移"); |
| | | }else { courseCounsum.setReason("课时转移"); |
| | | } |
| | | courseCounsum.setNum(laveClassHours); |
| | | courseCounsum.setChangeType(0); |
| | |
| | | |
| | | CourseCounsum courseCounsum1 = new CourseCounsum(); |
| | | courseCounsum1.setInsertTime(new Date()); |
| | | courseCounsum1.setReason("转课"); |
| | | courseCounsum1.setReason("课时转移"); |
| | | courseCounsum1.setNum(laveClassHours); |
| | | courseCounsum1.setChangeType(1); |
| | | courseCounsum1.setPaymentId(studentPay.getId()); |
| | |
| | | |
| | | CourseCounsum courseCounsum = new CourseCounsum(); |
| | | courseCounsum.setInsertTime(new Date()); |
| | | courseCounsum.setReason("赠课"); |
| | | courseCounsum.setReason("课时转移"); |
| | | courseCounsum.setNum(orinPay.getLaveClassHours()); |
| | | courseCounsum.setChangeType(0); |
| | | courseCounsum.setPaymentId(orinPay.getId()); |
| | |
| | | |
| | | CourseCounsum courseCounsum1 = new CourseCounsum(); |
| | | courseCounsum1.setInsertTime(new Date()); |
| | | courseCounsum1.setReason("赠课"); |
| | | courseCounsum1.setReason("课时转移"); |
| | | courseCounsum1.setNum(orinPay.getLaveClassHours()); |
| | | courseCounsum1.setChangeType(1); |
| | | courseCounsum1.setPaymentId(to.getId()); |
| | |
| | | |
| | | String join = StringUtils.join(stringArray, ","); |
| | | System.out.println("==========join========"+join); |
| | | return "转课成功"; |
| | | return "课时转移成功"; |
| | | } |
| | | |
| | | |