From b8057327fd3611230f03e84ec95ee57bc617316a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 19 May 2023 09:43:52 +0800 Subject: [PATCH] 1 --- business/jxcallback/scheduler/defsch/defsch_ext.go | 2 +- business/jxstore/cms/store_acct.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/business/jxcallback/scheduler/defsch/defsch_ext.go b/business/jxcallback/scheduler/defsch/defsch_ext.go index b47ec0e50..4df82b1cc 100644 --- a/business/jxcallback/scheduler/defsch/defsch_ext.go +++ b/business/jxcallback/scheduler/defsch/defsch_ext.go @@ -193,7 +193,7 @@ func (s *DefScheduler) CreateWaybillOnProviders4SavedOrder(ctx *jxcontext.Contex // 收最贵的一个订单配送费(配送费发送变化,收取最贵的价格) 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 { // 满足此条件是,门店发单已经存在此订单的发单记录 + if !isZero && !isEqual { // 满足此条件是,门店发单已经存在此订单的发单记录,且支出记录大于退还记录 var newPrice int64 if len(courierVendorIDs) == 1 { courierVendorID := courierVendorIDs[0] diff --git a/business/jxstore/cms/store_acct.go b/business/jxstore/cms/store_acct.go index 583035836..5d7ae992f 100644 --- a/business/jxstore/cms/store_acct.go +++ b/business/jxstore/cms/store_acct.go @@ -158,8 +158,8 @@ func (s *StoreAcctManager) CheckStoreAcctExpendExist(vendorOrderID string) (isEq expends, incomes int db = dao.GetDB() ) - // 当前订单的支出金额(临时运费+真实运费)[小费] - expends, err = dao.GetStoreAcctExpendTotal(db, 0, []int{partner.StoreAcctTypeExpendCreateWaybillEx, partner.StoreAcctTypeExpendCreateWaybillTip, partner.StoreAcctTypeExpendCreateWaybill2ndMore, partner.StoreAcctTypeExpendCreateWaybillDeductFee, partner.StoreAcctTypeRealFeeExpend}, vendorOrderID, utils.ZeroTimeValue, utils.ZeroTimeValue) + // 当前订单的支出金额(临时运费+真实运费)[小费] partner.StoreAcctTypeExpendCreateWaybillDeductFee 违约金不参与计算,本来就要扣除 + expends, err = dao.GetStoreAcctExpendTotal(db, 0, []int{partner.StoreAcctTypeExpendCreateWaybillEx, partner.StoreAcctTypeExpendCreateWaybillTip, partner.StoreAcctTypeExpendCreateWaybill2ndMore, partner.StoreAcctTypeRealFeeExpend}, vendorOrderID, utils.ZeroTimeValue, utils.ZeroTimeValue) // 当前订单的退费金额() incomes, err = dao.GetStoreAcctIncomeTotal(db, 0, []int{partner.StoreAcctTypeRealFeeIncome, partner.StoreAcctTypeIncomeCancelTemp, partner.StoreAcctTypeIncomeCancelReal}, vendorOrderID, utils.ZeroTimeValue, utils.ZeroTimeValue) if expends != incomes {