This commit is contained in:
邹宗楠
2023-05-19 11:42:41 +08:00
parent 764d74e902
commit 538479d55d
5 changed files with 4 additions and 14 deletions

View File

@@ -184,15 +184,12 @@ func (s *DefScheduler) CreateWaybillOnProviders4SavedOrder(ctx *jxcontext.Contex
}
deliveryFeeMap, _ := s.QueryOrderWaybillFeeInfoEx(ctx, order.VendorOrderID, order.VendorID)
globals.SugarLogger.Debugf("=========deliveryFeeMap= := %s", utils.Format4Output(deliveryFeeMap, false))
// 不管是门店发单还是品牌发单都要扣钱,门店发单扣门店,品牌发单扣品牌
if order.CreateDeliveryType == model.YES {
// 获取平台配送费
isEqual, isZero, _ := partner.CurStoreAcctManager.CheckStoreAcctExpendExist(order.VendorOrderID) // 当前订单的支出记录
expend, lastFee, _ := partner.CurStoreAcctManager.GetStoreAcctExpendLastCreateWayBillFee(order.VendorOrderID) // 最后一个运单支出记录
// 收最贵的一个订单配送费(配送费发送变化,收取最贵的价格)
globals.SugarLogger.Debugf("==========iszero,isequal := %s,%s", utils.Format4Output(isZero, false), utils.Format4Output(isZero, false))
globals.SugarLogger.Debugf("==========expend,lastFee := %s,%s", utils.Format4Output(expend, false), utils.Format4Output(lastFee, false))
if !isZero && !isEqual { // 满足此条件是,门店发单已经存在此订单的发单记录,且支出记录大于退还记录
var newPrice int64
if len(courierVendorIDs) == 1 {