From 41a6e71708689d99da15e64a7401b7729abdacad Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 18 Jun 2019 10:52:44 +0800 Subject: [PATCH] =?UTF-8?q?-=20GetMissingStoreSkuFromOrder=E7=9A=84fromTim?= =?UTF-8?q?e=E6=98=AF=E5=BC=BA=E5=88=B6=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/model/dao/store_sku.go | 6 +++--- controllers/cms_store_sku.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/business/model/dao/store_sku.go b/business/model/dao/store_sku.go index 5107a8567..3d72a58a0 100644 --- a/business/model/dao/store_sku.go +++ b/business/model/dao/store_sku.go @@ -394,9 +394,9 @@ func GetStoresSkusInfo(db *DaoDB, storeIDs, skuIDs []int) (storeSkuList []*model } func GetMissingStoreSkuFromOrder(db *DaoDB, storeIDs []int, fromTime time.Time) (storeSkuList []*MissingStoreSkuInfo, err error) { - // if time.Now().Sub(fromTime) > 24*time.Hour*60 { - // return nil, fmt.Errorf("GetMissingStoreSkuFromOrder,时间超过60天") - // } + if time.Now().Sub(fromTime) > 24*time.Hour*60 { + return nil, fmt.Errorf("GetMissingStoreSkuFromOrder,时间超过60天") + } sql := ` SELECT IF(t2.jx_store_id <> 0, t2.jx_store_id, t2.store_id) store_id, t4.name_id, t1.sku_id, t4.spec_quality, t4.spec_unit, t5.unit, diff --git a/controllers/cms_store_sku.go b/controllers/cms_store_sku.go index faa051faa..5b080ecd1 100644 --- a/controllers/cms_store_sku.go +++ b/controllers/cms_store_sku.go @@ -413,7 +413,7 @@ func (c *StoreSkuController) SyncJdStoreProducts() { // @Title 从订单得到本地没有关注的商品信息 // @Description 从订单得到本地没有关注的商品信息 // @Param token header string true "认证token" -// @Param fromTime query string false "扫描的订单开始时间" +// @Param fromTime query string true "扫描的订单开始时间" // @Success 200 {object} controllers.CallResult // @Failure 200 {object} controllers.CallResult // @router /GetMissingStoreSkuFromOrder [get]