根据平台价刷新惊喜价

This commit is contained in:
suyl
2020-02-07 15:49:02 +08:00
parent 73a01664ce
commit 7c2b986fa8
3 changed files with 126 additions and 0 deletions

View File

@@ -668,3 +668,23 @@ func (c *StoreSkuController) SendSeckillSkusCountMsg() {
return retVal, "", err
})
}
// @Title 根据平台价反算京西价
// @Description 根据平台价反算京西价
// @Param token header string true "认证token"
// @Param payload formData string true "json数据JdStoreSkus对象"
// @Param isAsync formData bool true "是否异步,缺省是同步"
// @Param isContinueWhenError formData bool true "单个同步失败是否继续缺省false"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /RefreshJxPriceByVendor [put]
func (c *StoreSkuController) RefreshJxPriceByVendor() {
var skuBindInfos []*cms.JdStoreSkus
c.callRefreshJxPriceByVendor(func(params *tStoreSkuRefreshJxPriceByVendorParams) (retVal interface{}, errCode string, err error) {
if err = jxutils.Strings2Objs(params.Payload, &skuBindInfos); err != nil {
return retVal, "", err
}
retVal,err = cms.RefreshJxPriceByVendor(params.Ctx, skuBindInfos, params.IsAsync, params.IsContinueWhenError)
return retVal, "", err
})
}