- SyncJdStoreProducts
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user