diff --git a/lib/retrofit/data/min_order_info.dart b/lib/retrofit/data/min_order_info.dart index c4aac5c2..65b2efba 100644 --- a/lib/retrofit/data/min_order_info.dart +++ b/lib/retrofit/data/min_order_info.dart @@ -66,8 +66,9 @@ class MinOrderInfo { int orderSource, dynamic address, dynamic discountPercent, - String discountAmount, - dynamic discountType, + String discountAmount, + dynamic discountType, + dynamic uniqueDiscountType, dynamic discountMoney, dynamic overTime, List orderProductVOList, @@ -153,6 +154,7 @@ class MinOrderInfo { this.discountPercent = discountPercent; this.discountAmount = discountAmount; this.discountType = discountType; + this.uniqueDiscountType = uniqueDiscountType; this.discountMoney = discountMoney; this.overTime = overTime; this.orderProductVOList = orderProductVOList; @@ -241,6 +243,7 @@ class MinOrderInfo { this.discountPercent = json['discountPercent']; this.discountAmount = json['discountAmount']; this.discountType = json['discountType']; + this.uniqueDiscountType = json['uniqueDiscountType']; this.discountMoney = json['discountMoney']; this.overTime = json['overTime']; if (json['orderProductVOList'] != null) { @@ -332,6 +335,7 @@ class MinOrderInfo { dynamic discountPercent; String discountAmount; dynamic discountType; + dynamic uniqueDiscountType; dynamic discountMoney; dynamic overTime; List orderProductVOList; @@ -420,6 +424,7 @@ class MinOrderInfo { map['discountPercent'] = this.discountPercent; map['discountAmount'] = this.discountAmount; map['discountType'] = this.discountType; + map['uniqueDiscountType'] = this.uniqueDiscountType; map['discountMoney'] = this.discountMoney; map['overTime'] = this.overTime; if (this.orderProductVOList != null) { diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index e23aca93..b722a1bf 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -197,7 +197,7 @@ class _Settlement extends State { productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - (!placeOrder) ? "NONE" : "AUTO", + "AUTO", // useVipPriceSelect, // (useVipPriceSelect == true && isVips) ? false:useBenefitSelect, count1, @@ -608,8 +608,7 @@ class _Settlement extends State { // : widget.arguments["cid"] ?? ""; // placeOrderFirst.promotionInfoDTO.useVipPrice = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && (settleOrderInfo.usePlateMoney == false))) ) ? false : useVipPriceSelect; // placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false : useBenefitSelect; - placeOrderFirst.promotionInfoDTO.discountType = - settleOrderInfo?.discountType ?? ""; + placeOrderFirst.promotionInfoDTO.discountType = (!placeOrder) ? "AUTO" :settleOrderInfo?.discountType ?? ""; placeOrderFirst.recMobile = (mobile == null || mobile == "") ? mobile : storeInfo.headMobile; placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; @@ -1529,13 +1528,13 @@ class _Settlement extends State { selectedBtn != 2) ? diningStatus : selectedBtn, - couponBean?.id, + ((couponBean?.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? 0: couponBean?.id, 0, - productId ?? 0, + ((couponBean?.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? promotion?.id ?? productId :0, productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - (couponBean?.id ?? 0) == 0 ? "AUTO" : "COUPON", + (couponBean?.id ?? 0) == 0 ? ((promotion?.id ?? productId ?? 0) !=0 ? "ACTIVITY":"AUTO") : "COUPON", // useVipPriceSelect, // useBenefitSelect, count1, @@ -1569,13 +1568,13 @@ class _Settlement extends State { selectedBtn != 2) ? diningStatus : selectedBtn, + (((pro?.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0)?couponListBean?.id:0, 0, - 0, - (pro?.id ?? 0) ?? productId, + (((pro?.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0) ? 0 :((pro?.id ?? 0) ?? productId), productSkuId ?? "", actProductId ?? "", actProductSkuId ?? "", - ((pro?.id ?? 0) ?? productId) == 0 ? "AUTO" : "ACTIVITY", + (((pro?.id ?? 0) ?? (productId ?? 0)) == 0 ? ((couponListBean?.id ??0) != 0 ? "COUPON":"AUTO") : "ACTIVITY"), // useVipPriceSelect, // useBenefitSelect, count1,