把京西有,平台无且没有待创建标记的商品加上待创建标记

This commit is contained in:
Rosy-zhudan
2019-08-20 15:56:24 +08:00
parent 81845d2ed6
commit 212800934f
4 changed files with 112 additions and 0 deletions

View File

@@ -181,3 +181,23 @@ func (c *SyncController) PruneMissingStoreSkus() {
return retVal, "", err
})
}
// @Title 把京西有,平台无且没有待创建标记的商品加上待创建标记
// @Description 把京西有,平台无且没有待创建标记的商品加上待创建标记
// @Param token header string true "认证token"
// @Param storeIDs formData string false "门店ID列表"
// @Param vendorIDs formData string false "运营商ID列表(京东0 美团1 饿百3)"
// @Param isAsync formData bool false "是否异步操作"
// @Param isContinueWhenError formData bool false "单个同步失败是否继续缺省false"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /AddCreateFlagForJxStoreSku [post]
func (c *SyncController) AddCreateFlagForJxStoreSku() {
c.callAddCreateFlagForJxStoreSku(func(params *tSyncAddCreateFlagForJxStoreSkuParams) (retVal interface{}, errCode string, err error) {
var storeIDs, vendorIDs []int
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs, params.VendorIDs, &vendorIDs); err == nil {
retVal, err = cms.CurVendorSync.AddCreateFlagForJxStoreSku(params.Ctx, vendorIDs, storeIDs, params.IsAsync, params.IsContinueWhenError)
}
return retVal, "", err
})
}