+ ForceSyncSkuNames

- refactor sync.SyncSku
This commit is contained in:
gazebo
2019-04-24 21:36:55 +08:00
parent 79542ae756
commit 7951e949c1
3 changed files with 83 additions and 9 deletions

View File

@@ -139,3 +139,22 @@ func (c *SyncController) DeleteRemoteStoreSkus() {
return retVal, "", err
})
}
// @Title 强制同步SKU多门店平台
// @Description 强制同步SKU多门店平台
// @Param token header string true "认证token"
// @Param nameIDs formData string false "name ID列表"
// @Param isAsync formData bool false "是否异步"
// @Param isContinueWhenError formData bool false "单个同步失败是否继续缺省false"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /ForceSyncSkuNames [put]
func (c *SyncController) ForceSyncSkuNames() {
c.callForceSyncSkuNames(func(params *tSyncForceSyncSkuNamesParams) (retVal interface{}, errCode string, err error) {
var nameIDs []int
if err = jxutils.Strings2Objs(params.NameIDs, &nameIDs); err == nil {
retVal, err = cms.CurVendorSync.ForceSyncSkuNames(params.Ctx, nameIDs, params.IsAsync, params.IsContinueWhenError)
}
return retVal, "", err
})
}