nickchange
2023-10-18 062fb1ed6efcaac5d75bbe184524c4929dff7fcd
cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageServiceImpl.java
@@ -683,6 +683,9 @@
                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 {
@@ -698,10 +701,10 @@
                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("支付金额异常,请刷新后重试");
                }
            }