puzhibing
2023-07-20 fa11cbae4e50f211ca388bf4baf83cae521b9ae6
更新用户端接口
2个文件已修改
24 ■■■■ 已修改文件
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
@@ -476,7 +476,7 @@
    public ResultUtil payLogisticsOrder(Integer payType, Integer bankCardId, Integer orderId, Integer type, Integer language) throws Exception {
        OrderLogistics orderLogistics = this.selectById(orderId);
        if(orderLogistics.getState() != 7){
            return ResultUtil.error("订单已完成支付,不允许重复支付", "");
            return ResultUtil.error(language == 1 ? "订单已完成支付,不允许重复支付" : language == 2 ? "The order has been paid, no double payment is allowed" : "La commande a été payée, aucun paiement en double n’est autorisé", "");
        }
        Integer uid = orderLogistics.getUserId();
        Double orderMoney = orderLogistics.getOrderMoney();
@@ -506,7 +506,7 @@
            if(resultUtil.getCode()==200){
                paymentRecordService.saveData(1, null, null, orderId, 4, 1, orderMoney, null, 1);//添加预支付数据
            }else{
                resultUtil = ResultUtil.error("支付失败", "");
                resultUtil = ResultUtil.error(language == 1 ? "支付失败" : language == 2 ? "Payment failure" : "Paiement échoué", "");
            }
            return resultUtil;
        }
@@ -533,7 +533,7 @@
            if(resultUtil.getCode()==200){
                paymentRecordService.saveData(1, null, null, orderId, 4, 2, orderMoney, null, 1);//添加预支付数据
            }else{
                resultUtil = ResultUtil.error("支付失败", "");
                resultUtil = ResultUtil.error(language == 1 ? "支付失败" : language == 2 ? "Payment failure" : "Paiement échoué", "");
            }
            return resultUtil;
        }
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
@@ -830,10 +830,10 @@
    public ResultUtil payPrivateCarOrder(Integer payType, Integer bankCardId, Integer orderId, Integer couponId, Integer type, Integer language) throws Exception {
        OrderPrivateCar orderPrivateCar = this.selectById(orderId);
        if(orderPrivateCar.getState() == 8 || orderPrivateCar.getState() == 9){
            return ResultUtil.error("订单已完成支付,不允许重复支付", "");
            return ResultUtil.error(language == 1 ? "订单已完成支付,不允许重复支付" : language == 2 ? "The order has been paid, no double payment is allowed" : "La commande a été payée, aucun paiement en double n’est autorisé", "");
        }
        if(orderPrivateCar.getState() != 7){
            return ResultUtil.error("订单不在待支付状态,不允许支付", "");
            return ResultUtil.error(language == 1 ? "订单不在待支付状态,不允许支付" : language == 2 ? "The order is not pending payment and cannot be paid" : "La commande n’est pas en attente de paiement et ne permet pas le paiement", "");
        }
        Integer uid = orderPrivateCar.getUserId();
        Double orderMoney = orderPrivateCar.getOrderMoney();
@@ -847,19 +847,19 @@
        if(null != couponId){
            userCouponRecord = userCouponRecordService.selectById(couponId);
            if(userCouponRecord.getCompanyId() != orderPrivateCar.getCompanyId()){
                return ResultUtil.error("优惠券不能用于此订单", "");
                return ResultUtil.error(language == 1 ? "优惠券不能用于此订单" : language == 2 ? "Coupons cannot be used for this order" : "Le coupon ne peut pas être utilisé pour cette commande", "");
            }
            if(userCouponRecord.getState() == 2){
                return ResultUtil.error("优惠券已使用", "");
                return ResultUtil.error(language == 1 ? "优惠券已使用" : language == 2 ? "Coupon used" : "Coupon a été utilisé", "");
            }
            if(userCouponRecord.getState() == 3){
                return ResultUtil.error("优惠券已过期", "");
                return ResultUtil.error(language == 1 ? "优惠券已过期" : language == 2 ? "Coupon has expired" : "Le coupon a expiré", "");
            }
            if(userCouponRecord.getCouponUseType() != 0 && userCouponRecord.getCouponUseType() != 1){
                return ResultUtil.error("优惠券不能用于此类型订单", "");
                return ResultUtil.error(language == 1 ? "优惠券不能用于此订单" : language == 2 ? "Coupons cannot be used for this order" : "Le coupon ne peut pas être utilisé pour cette commande", "");
            }
            if(userCouponRecord.getCouponType() == 2 && orderMoney.compareTo(userCouponRecord.getFullMoney()) < 0){
                return ResultUtil.error("优惠券不能用于此订单", "");
                return ResultUtil.error(language == 1 ? "优惠券不能用于此订单" : language == 2 ? "Coupons cannot be used for this order" : "Le coupon ne peut pas être utilisé pour cette commande", "");
            }
            orderMoney = orderMoney - userCouponRecord.getMoney();
            orderPrivateCar.setCouponMoney(userCouponRecord.getMoney());
@@ -912,7 +912,7 @@
            if(resultUtil.getCode()==200){
                paymentRecordService.saveData(1, null, null, orderId, 1, 1, orderMoney, null, 1);//添加预支付数据
            }else{
                resultUtil = ResultUtil.error("支付失败", "");
                resultUtil = ResultUtil.error(language == 1 ? "支付失败" : language == 2 ? "Payment failure" : "Paiement échoué", "");
            }
        }
@@ -938,7 +938,7 @@
            if(resultUtil.getCode()==200){
                paymentRecordService.saveData(1, null, null, orderId, 1, 2, orderMoney, null, 1);//添加预支付数据
            }else{
                resultUtil = ResultUtil.error("支付失败", "");
                resultUtil = ResultUtil.error(language == 1 ? "支付失败" : language == 2 ? "Payment failure" : "Paiement échoué", "");
            }
        }
        if(payType == 3){//余额支付