加入测试

This commit is contained in:
邹宗楠
2022-06-02 10:37:50 +08:00
parent cbbb9bfd89
commit 2fc12ba443

View File

@@ -1010,14 +1010,17 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
// B2B门店订单不足一千配送费一百
if strings.Contains(storeDetail.BrandName, model.B2BTag) {
outJxOrder.FreightPrice = 10000 // b2b运费一百元
outJxOrder.FreightPrice = 10000 // b2b运费一百元
}
// 订单超过一千配送费优惠(门店运费)
discountPrice, err := cms.GetStoreVendorMaps(ctx, nil, jxOrder.StoreID, -1)
if len(discountPrice) == 1 && outJxOrder.OrderPrice >= int64(discountPrice[0].DeliveryFeeDeductionSill) {
outJxOrder.FreightPrice = outJxOrder.FreightPrice - int64(discountPrice[0].DeliveryFeeDeductionFee)
outJxOrder.FreightPrice = outJxOrder.FreightPrice - int64(discountPrice[0].DeliveryFeeDeductionFee)
}
// ?????????????????????? 测试
if storeDetail.ID == 668470 {
outJxOrder.FreightPrice = 1
}
if err == nil {
if jxOrder.OrderType == model.OrderTypeNormal {
outJxOrder.TotalPrice = outJxOrder.OrderPrice + outJxOrder.FreightPrice
@@ -1397,7 +1400,7 @@ func CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string)
if err != nil {
errList.AddErr(err)
}
}else if orderPay.PayType == model.PayTypeTicTok {
} else if orderPay.PayType == model.PayTypeTicTok {
orderPayRefund, err = RefundOrderByTT(ctx, orderPay, refundID, orderPay.TotalFee, reason)
if err != nil {
errList.AddErr(err)