- PruneMissingStoreSkus

This commit is contained in:
gazebo
2019-07-01 14:30:16 +08:00
parent b881e6d242
commit bf8d3a4aa1
8 changed files with 147 additions and 0 deletions

View File

@@ -161,3 +161,23 @@ func (c *SyncController) SyncSkuNames() {
return retVal, "", err
})
}
// @Title 删除本地没有的平台门店商品信息
// @Description 删除本地没有的平台门店商品信息
// @Param token header string true "认证token"
// @Param storeIDs query string true "门店ID列表"
// @Param vendorIDs query string true "厂商ID列表"
// @Param isAsync query bool false "是否异步操作"
// @Param isContinueWhenError query bool false "单个同步失败是否继续缺省false"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /PruneMissingStoreSkus [delete]
func (c *SyncController) PruneMissingStoreSkus() {
c.callPruneMissingStoreSkus(func(params *tSyncPruneMissingStoreSkusParams) (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.PruneMissingStoreSkus(params.Ctx, vendorIDs, storeIDs, params.IsAsync, params.IsContinueWhenError)
}
return retVal, "", err
})
}