根据平台价刷新京西价

This commit is contained in:
苏尹岚
2020-02-28 17:21:30 +08:00
parent 44457506ff
commit 3827d1c1eb
4 changed files with 135 additions and 1 deletions

View File

@@ -690,3 +690,24 @@ func (c *StoreSkuController) RefreshJxPriceByVendor() {
return retVal, "", err
})
}
// @Title 根据平台价反算京西价2
// @Description 根据平台价反算京西价2
// @Param token header string true "认证token"
// @Param storeIDs formData string true "门店列表"
// @Param vendorID formData int true "厂商ID"
// @Param isAsync formData bool true "是否异步,缺省是同步"
// @Param isContinueWhenError formData bool true "单个同步失败是否继续缺省false"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /RefreshJxPriceByVendor2 [put]
func (c *StoreSkuController) RefreshJxPriceByVendor2() {
var storeIDs []int
c.callRefreshJxPriceByVendor2(func(params *tStoreSkuRefreshJxPriceByVendor2Params) (retVal interface{}, errCode string, err error) {
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs); err != nil {
return retVal, "", err
}
retVal, err = cms.RefreshJxPriceByVendor2(params.Ctx, storeIDs, params.VendorID, params.IsAsync, params.IsContinueWhenError)
return retVal, "", err
})
}