- SyncJdStoreProducts

This commit is contained in:
gazebo
2019-06-13 15:22:32 +08:00
parent 35caf649c7
commit ca62926d3f
6 changed files with 103 additions and 2 deletions

View File

@@ -368,3 +368,24 @@ func (c *StoreSkuController) RefreshStoresSkuByVendor() {
return retVal, "", err
})
}
// @Title 京东商家商品状态同步
// @Description 京东商家商品状态同步
// @Param token header string true "认证token"
// @Param storeIDs formData string true "门店ID列表"
// @Param skuIDs formData string false "SKU ID列表缺省为全部"
// @Param isAsync formData bool false "是否异步操作"
// @Param isContinueWhenError formData bool false "单个同步失败是否继续缺省false"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /SyncJdStoreProducts [put]
func (c *StoreSkuController) SyncJdStoreProducts() {
c.callSyncJdStoreProducts(func(params *tStoreSkuSyncJdStoreProductsParams) (retVal interface{}, errCode string, err error) {
var storeIDList, skuIDList []int
err = jxutils.Strings2Objs(params.StoreIDs, &storeIDList, params.SkuIDs, &skuIDList)
if err == nil {
retVal, err = cms.SyncJdStoreProducts(params.Ctx, storeIDList, skuIDList, params.IsAsync, params.IsContinueWhenError)
}
return retVal, "", err
})
}