From bb57eacecc2c2bbf676f7674d88fc237e9c1e0c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 23 May 2023 15:04:55 +0800 Subject: [PATCH] 1 --- business/jxcallback/scheduler/defsch/defsch.go | 5 ----- business/jxcallback/scheduler/defsch/defsch_ext.go | 4 ++-- business/model/order.go | 11 +++++++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index 93a0896d2..2ec3db9b5 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -559,11 +559,6 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo } } } - //if !model.IsWaybillPlatformOwn(bill) { - // if storeDetail, err2 := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, ""); err2 == nil { - // s.updateBrandAccount(storeDetail, bill) - // } - //} } flag2Clear := model.WaybillVendorID2Mask(bill.WaybillVendorID) if order.DeliveryFlag&flag2Clear != 0 { diff --git a/business/jxcallback/scheduler/defsch/defsch_ext.go b/business/jxcallback/scheduler/defsch/defsch_ext.go index 4f61ed2ed..3fea776c9 100644 --- a/business/jxcallback/scheduler/defsch/defsch_ext.go +++ b/business/jxcallback/scheduler/defsch/defsch_ext.go @@ -99,8 +99,8 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, ven CourierMobile: courierMobile, Status: model.OrderStatusNew, VendorStatus: utils.Int2Str(model.OrderStatusNew), - ActualFee: 500, - DesiredFee: order.ActualPayPrice, + ActualFee: 0, + DesiredFee: 0, TipFee: 0, DuplicatedCount: 0, DeliveryFlag: 0, diff --git a/business/model/order.go b/business/model/order.go index efa1940f6..5af832db2 100644 --- a/business/model/order.go +++ b/business/model/order.go @@ -1,6 +1,8 @@ package model import ( + "fmt" + "git.rosy.net.cn/baseapi/utils" "time" ) @@ -145,8 +147,8 @@ type GoodsOrder struct { OrderFinishedAt time.Time `orm:"type(datetime)" json:"orderFinishedAt"` StatusTime time.Time `orm:"type(datetime)" json:"statusTime"` // last status time PickDeadline time.Time `orm:"type(datetime);null" json:"pickDeadline"` - DeliveryFeeFrom *time.Time `orm:"type(datetime);null" json:"deliveryFeeFrom,omitempty"` // 三方配置费计算的开始基准时间 - ModelTimeInfo `json:"-"` // 1 + DeliveryFeeFrom *time.Time `orm:"type(datetime);null" json:"deliveryFeeFrom,omitempty"` // 三方配置费计算的开始基准时间 + ModelTimeInfo `json:"-"` // 1 Flag int `json:"flag"` // 非运单调整相关的其它状态 InvoiceTitle string `orm:"size(64)" json:"invoiceTitle"` // 发票抬头 InvoiceTaxerID string `orm:"size(32);column(invoice_taxer_id)" json:"invoiceTaxerID"` // 发票纳税人识别码 @@ -324,6 +326,11 @@ func Waybill2Status(bill *Waybill) (retVal *OrderStatus) { StatusTime: bill.StatusTime, Remark: bill.Remark, } + if retVal.Remark == "" { + retVal.Remark = fmt.Sprintf("运费: %s", utils.Float64ToStr(float64(bill.DesiredFee)/float64(100))) + } else { + retVal.Remark += fmt.Sprintf(",运费: %s", utils.Float64ToStr(float64(bill.DesiredFee)/float64(100))) + } return retVal }