| | |
| | | AppUser appUser = appUserClient.queryAppUser(uid); |
| | | TCoursePackage coursePackage = this.getById(id); |
| | | CoursePackageInfo coursePackageInfo = new CoursePackageInfo(); |
| | | coursePackageInfo.setIsVip(appUser.getIsVip()); |
| | | coursePackageInfo.setId(id); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd"); |
| | | if(coursePackage.getType()==2){ |
| | |
| | | if(playPaiCoin1!=null || playPaiCoin1>0){ |
| | | payType=2; |
| | | } |
| | | if((cashPayment!=null || cashPayment>0) &&(playPaiCoin1!=null || playPaiCoin1>0)){ |
| | | payType=3; |
| | | } |
| | | |
| | | if(cashPayment!=null && cashPayment>0 && playPaiCoin1 !=null && playPaiCoin1>0){ |
| | | }else { |
| | |
| | | paymentPrice = new BigDecimal(students.length).multiply(new BigDecimal(paymentPrice)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | Double playPaiCoin = coursePackagePaymentConfigVo.getPlayPaiCoin().doubleValue();//支付币 |
| | | playPaiCoin = new BigDecimal(students.length).multiply(new BigDecimal(playPaiCoin)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | if(payType == 1 && paymentPrice.compareTo(paymentCourseVo.getPrice()) != 0){ |
| | | if(paymentCourseVo.getPayType() != 3 && paymentPrice.compareTo(paymentCourseVo.getPrice()) != 0){ |
| | | return ResultUtil.error("支付金额异常,请刷新后重试"); |
| | | } |
| | | if(payType == 2 && playPaiCoin.compareTo(paymentCourseVo.getPrice()) != 0){ |
| | | if(paymentCourseVo.getPayType() == 3 && playPaiCoin.compareTo(paymentCourseVo.getPrice()) != 0){ |
| | | return ResultUtil.error("支付金额异常,请刷新后重试"); |
| | | } |
| | | } |