From 4eb46bcbbe42b6a403ed20356fc8a53b51c182fe Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 20 Sep 2018 23:10:19 +0800 Subject: [PATCH 1/2] - alarm for shop price. - add index for ref_vendor_order_id. --- business/jxcallback/orderman/order.go | 17 ++++++++++++++++- business/model/order.go | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index e06b96d1b..2b3c27d65 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -13,6 +13,21 @@ import ( "github.com/astaxie/beego/orm" ) +var ( + needAlarmStores map[int]int +) + +func init() { + needAlarmStores = map[int]int{ + 100997: 1, + 100992: 1, + 100973: 1, + 100960: 1, + 100961: 1, + 100999: 1, + } +} + func (c *OrderManager) LoadPendingOrders() []*model.GoodsOrder { db := orm.NewOrm() var orders []*model.GoodsOrder @@ -196,7 +211,7 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db orm.O } } opNum := "2" - if order.VendorStoreID == "163183405" || jxStoreID == 100961 { + if needAlarmStores[jxStoreID] != 0 { opNum = "" } diff --git a/business/model/order.go b/business/model/order.go index 43334b45a..2dd055cc6 100644 --- a/business/model/order.go +++ b/business/model/order.go @@ -143,6 +143,7 @@ type OrderStatus struct { func (v *OrderStatus) TableIndex() [][]string { return [][]string{ []string{"VendorOrderID", "Status", "VendorStatus"}, + []string{"RefVendorOrderID", "Status", "VendorStatus"}, } } From dd2eb743cb04f66cf7e33722b812939c054d89e1 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 21 Sep 2018 16:51:00 +0800 Subject: [PATCH 2/2] - change time2Schedule3rdCarrier to half an hour. --- business/jxcallback/scheduler/defsch/defsch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index df1985903..acad62cfb 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -20,7 +20,7 @@ import ( const ( time2Delivered = 1 * time.Hour // 正常从下单到送达的时间。 - time2Schedule3rdCarrier = 60 * time.Minute // 京东要求5分钟后才能转自送,保险起见,设置为5分半钟 + time2Schedule3rdCarrier = 30 * time.Minute // 京东要求5分钟后才能转自送,保险起见,设置为5分半钟 // time2Schedule3rdCarrierGap4OrderStatus = 3 * time.Minute // 京东要求是运单状态为待抢单且超时5分钟,但为了防止没有运单事件,所以就拣货完成事件开始算,添加3分钟 time2AutoPickupMin = 15 * time.Minute time2AutoPickupGap = 5 * 60 //随机5分钟