- GetMissingStoreSkuFromOrder的fromTime是强制参数

This commit is contained in:
gazebo
2019-06-18 10:52:44 +08:00
parent a9052f4bbc
commit 41a6e71708
2 changed files with 4 additions and 4 deletions

View File

@@ -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,

View File

@@ -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]