同步银豹到京西商品,测试list

This commit is contained in:
苏尹岚
2020-04-27 14:08:27 +08:00
parent 8d342e6086
commit 99bcaaad05
4 changed files with 218 additions and 83 deletions

View File

@@ -347,3 +347,22 @@ func (c *SyncController) UploadFakeJdThingMap() {
})
}
}
// @Title 同步银豹到京西商品
// @Description 同步银豹到京西商品
// @Param token header string true "认证token"
// @Param storeIDs formData string true "门店ID列表"
// @Param isAsync formData bool true "是否异步操作"
// @Param isContinueWhenError formData bool false "单个同步失败是否继续缺省false"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /SyncStoreSkusFromYb [put]
func (c *SyncController) SyncStoreSkusFromYb() {
c.callSyncStoreSkusFromYb(func(params *tSyncSyncStoreSkusFromYbParams) (retVal interface{}, errCode string, err error) {
var storeIDs []int
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs); err == nil {
cms.CurVendorSync.SyncStoreSkusFromYb(params.Ctx, storeIDs, params.IsAsync, params.IsContinueWhenError)
}
return retVal, "", err
})
}