运费减免逻辑修改
This commit is contained in:
@@ -1019,7 +1019,11 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
|
|||||||
// 订单超过一千配送费优惠(门店运费)
|
// 订单超过一千配送费优惠(门店运费)
|
||||||
discountPrice, err := cms.GetStoreVendorMaps(ctx, nil, jxOrder.StoreID, -1)
|
discountPrice, err := cms.GetStoreVendorMaps(ctx, nil, jxOrder.StoreID, -1)
|
||||||
if len(discountPrice) == 1 && outJxOrder.OrderPrice >= int64(discountPrice[0].DeliveryFeeDeductionSill) {
|
if len(discountPrice) == 1 && outJxOrder.OrderPrice >= int64(discountPrice[0].DeliveryFeeDeductionSill) {
|
||||||
outJxOrder.FreightPrice = outJxOrder.FreightPrice - int64(discountPrice[0].DeliveryFeeDeductionFee)
|
if outJxOrder.FreightPrice-int64(discountPrice[0].DeliveryFeeDeductionFee) >= 0 {
|
||||||
|
outJxOrder.FreightPrice = outJxOrder.FreightPrice - int64(discountPrice[0].DeliveryFeeDeductionFee)
|
||||||
|
} else {
|
||||||
|
outJxOrder.FreightPrice = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// ?????????????????????? 测试
|
// ?????????????????????? 测试
|
||||||
if storeDetail.ID == 668470 || storeDetail.ID == 668469 {
|
if storeDetail.ID == 668470 || storeDetail.ID == 668469 {
|
||||||
@@ -1720,7 +1724,7 @@ func CancelPayTimeOutOrder(ctx *jxcontext.Context) (err error) {
|
|||||||
AND vendor_id = ?
|
AND vendor_id = ?
|
||||||
`
|
`
|
||||||
sqlParams := []interface{}{
|
sqlParams := []interface{}{
|
||||||
time.Now().Add(-time.Minute * 1),
|
time.Now().Add(-time.Minute * 30),
|
||||||
model.OrderStatusWait4Pay,
|
model.OrderStatusWait4Pay,
|
||||||
model.VendorIDJX,
|
model.VendorIDJX,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user