This commit is contained in:
邹宗楠
2023-06-07 11:20:46 +08:00
parent f0422dae20
commit 2b4b23b2f5
9 changed files with 44 additions and 21 deletions

View File

@@ -140,9 +140,10 @@ func (d DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee i
return nil, err
}
//+0.2
// 系统加价
desiredFee := utils.Float64TwoInt(sfTotalPrice) + utils.WayBillDeliveryMarkUp
// 运营加价
desiredFee += store.FreightMarkup
bill = &model.Waybill{
VendorOrderID: order.VendorOrderID,
OrderVendorID: order.VendorID,
@@ -220,8 +221,6 @@ func (d DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo
}
deliveryFeeInfo = &partner.WaybillFeeInfo{}
price, err := api.SfPsAPI.PreCreateOrder(param)
//+0.2
//deliveryFee := utils.Float64TwoInt(price) + utils.WayBillDeliveryMarkUp
deliveryFeeInfo.DeliveryFee = utils.Float64TwoInt64(price)
globals.SugarLogger.Debugf("GetWaybillFee deliveryFeeInfo.DeliveryFee=%d", deliveryFeeInfo.DeliveryFee)
return deliveryFeeInfo, err
@@ -330,8 +329,7 @@ func OnWaybillMsg(urlIndex string, msg interface{}) (resp *sfps2.CallbackRespons
order.CourierMobile = sfOrder.RiderPhone
}
//+0.2
sfTotalPrice := utils.Float64TwoInt(sfOrder.TotalPrice) + utils.WayBillDeliveryMarkUp
sfTotalPrice := utils.Float64TwoInt(sfOrder.TotalPrice)
sfActualPrice := utils.Float64TwoInt64(sfOrder.RealPayMoney)
globals.SugarLogger.Debugf("SFPS OnWaybillMsg,sfTotalPrice=%d,sfActualPrice=%d", sfTotalPrice, sfActualPrice)
@@ -341,6 +339,9 @@ func OnWaybillMsg(urlIndex string, msg interface{}) (resp *sfps2.CallbackRespons
dao.GetRow(dao.GetDB(), &good, sql, sqlParams)
order.OrderVendorID = good.VendorID
store, _ := dao.GetStoreDetail(dao.GetDB(), good.JxStoreID, good.VendorID, good.VendorOrgCode)
sfTotalPrice += store.FreightMarkup
orderStatus := utils.Str2Int64(order.VendorStatus)
switch orderStatus {
case sfps2.OrderStatusNewOrder: //1订单创建