From 9a693eb2ac3e1d8787b9c166993cfe4de0391338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 22 Jun 2022 16:02:39 +0800 Subject: [PATCH] 1 --- business/model/order.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/business/model/order.go b/business/model/order.go index 5dce03772..3c107b3a9 100644 --- a/business/model/order.go +++ b/business/model/order.go @@ -11,8 +11,8 @@ const ( ) const ( - PayTypeWX = 1 // 微信支付 - PayTypeTL = 2 // 通联宝支付 + PayTypeWX = 1 // 微信支付 + PayTypeTL = 2 // 通联宝支付 PayTypeTicTok = 3 // 抖音支付 PayTypeTL_DiscountCard = 3 // 通联宝支付(会员折扣卡) @@ -135,18 +135,18 @@ type GoodsOrder struct { DeliveryType string `orm:"size(32)" json:"deliveryType"` // 订单配送方式,缺省是平台配送 CreateDeliveryType int `orm:"default(0)" json:"createDeliveryType"` //默认0系统发单,1为门店发单 - VendorWaybillID string `orm:"column(vendor_waybill_id);size(48)" json:"vendorWaybillID"` - WaybillVendorID int `orm:"column(waybill_vendor_id)" json:"waybillVendorID"` // 表示当前承运商,-1表示还没有安排 - AdjustCount int8 `json:"adjustCount"` // 调整单(次数) - DeliveryFlag int8 `json:"deliveryFlag"` // 第1位为1表示禁止调度器调度三方配送 - DuplicatedCount int `json:"-"` // 重复新订单消息数,这个一般不是由于消息重发造成的(消息重发由OrderStatus过滤),一般是业务逻辑造成的 - OrderCreatedAt time.Time `orm:"type(datetime);index" json:"orderCreatedAt"` // 这里记录的是订单生效时间,即用户支付完成(货到付款即为下单时间) - 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:"-"` - Flag int `json:"flag"` //非运单调整相关的其它状态 + VendorWaybillID string `orm:"column(vendor_waybill_id);size(48)" json:"vendorWaybillID"` + WaybillVendorID int `orm:"column(waybill_vendor_id)" json:"waybillVendorID"` // 表示当前承运商,-1表示还没有安排 + AdjustCount int8 `json:"adjustCount"` // 调整单(次数) + DeliveryFlag int8 `json:"deliveryFlag"` // 第1位为1表示禁止调度器调度三方配送 + DuplicatedCount int `json:"-"` // 重复新订单消息数,这个一般不是由于消息重发造成的(消息重发由OrderStatus过滤),一般是业务逻辑造成的 + OrderCreatedAt time.Time `orm:"type(datetime);index" json:"orderCreatedAt"` // 这里记录的是订单生效时间,即用户支付完成(货到付款即为下单时间) + 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:"-"` + Flag int `json:"flag"` //非运单调整相关的其它状态 InvoiceTitle string `orm:"size(64)" json:"invoiceTitle"` // 发票抬头 InvoiceTaxerID string `orm:"size(32);column(invoice_taxer_id)" json:"invoiceTaxerID"` // 发票纳税人识别码 @@ -549,7 +549,7 @@ func IsOrderHaveWaybill(order *GoodsOrder) bool { // 订单是否有自己平台的有效运单 func IsOrderHaveOwnWaybill(order *GoodsOrder) bool { - return order.VendorID == order.WaybillVendorID && order.VendorWaybillID != "" + return order.VendorID == order.WaybillVendorID && order.VendorWaybillID != "" } // 订单的初始配送方式是否是门店自配送 @@ -564,7 +564,7 @@ func IsOrderDeliveryByPlatform(order *GoodsOrder) bool { //订单是否是自提单 func IsOrderDeliveryBySelf(order *GoodsOrder) bool { - return order.DeliveryType == OrderDeliveryTypeStoreSelf + return order.DeliveryType == OrderDeliveryTypeSelfTake } func IsOrderJXTemp(order *GoodsOrder) bool {