| | |
| | | AppUser appUser = appuClient.queryAppUser(appUserId); |
| | | CourseDetailsResponse response = new CourseDetailsResponse(); |
| | | TCoursePackagePayment tCoursePackagePayment = this.baseMapper.selectById(coursePayId); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = this.baseMapper.selectList(new QueryWrapper<TCoursePackagePayment>().eq("appUserId", appUserId).eq("coursePackageId", tCoursePackagePayment.getCoursePackageId())); |
| | | List<Integer> stuIds = new ArrayList<>(); |
| | | for (TCoursePackagePayment coursePackagePayment : tCoursePackagePayments) { |
| | | stuIds.add(coursePackagePayment.getStudentId()); |
| | | } |
| | | response.setStuIds(stuIds); |
| | | response.setChooseHours(tCoursePackagePayment.getClassHours()); |
| | | |
| | | |
| | | if (null != tCoursePackagePayment){ |
| | | TCoursePackage coursePackage = tcpmapper.selectById(tCoursePackagePayment.getCoursePackageId()); |
| | |
| | | } |
| | | } |
| | | |
| | | // switch (payType) { |
| | | // case 1: |
| | | // case 2: |
| | | // response.setAmount(cashPaymentValue); |
| | | // response.setVipAmount(discountMember); |
| | | // break; |
| | | // case 3: |
| | | // response.setWpGold(playPaiCoin); |
| | | // break; |
| | | // } |
| | | switch (payType) { |
| | | case 1: |
| | | case 2: |
| | | response.setAmount(cashPaymentValue); |
| | | response.setVipAmount(discountMember); |
| | | break; |
| | | case 3: |
| | | response.setWpGold(playPaiCoin); |
| | | break; |
| | | } |
| | | |
| | | // coursePackage.get |
| | | |
| | |
| | | } |
| | | coursePackagePaymentConfigVo.setPaymentPrice(paymentPrice); |
| | | |
| | | |
| | | TCoursePackageDiscount discount = coursePackageDiscountService.getOne(new QueryWrapper<TCoursePackageDiscount>().eq("coursePackagePaymentConfigId", coursePackagePaymentConfig.getId()) |
| | | .eq("type", 2).eq("auditStatus", 2)); |
| | | |
| | | Double continuingMember = JSON.parseObject(discount.getContent()).getDouble("continuingUser"); |
| | | Double vipcontinuingMember = JSON.parseObject(discount.getContent()).getDouble("continuingMember"); |
| | | |
| | | |
| | | if (coursePackagePaymentConfigVo.getPaymentPrice()>continuingMember){ |
| | | coursePackagePaymentConfigVo.setPaymentPrice(continuingMember); |
| | | } |
| | | if (coursePackagePaymentConfigVo.getVipPrice()>vipcontinuingMember){ |
| | | coursePackagePaymentConfigVo.setVipPrice(vipcontinuingMember); |
| | | } |
| | | |
| | | |
| | | if (coursePackagePaymentConfigVo.getPaymentPrice()<coursePackagePaymentConfigVo.getVipPrice()){ |
| | | coursePackagePaymentConfigVo.setOriginalPrice(coursePackagePaymentConfig.getCashPayment()); |
| | | coursePackagePaymentConfigVo.setVipPrice(null); |
| | |
| | | } |
| | | list.add(coursePackagePaymentConfigVo); |
| | | }); |
| | | // coursePackageInfo.setList(list); |
| | | response.setList(list); |
| | | |
| | | |
| | | |