根据skuid批量关注
This commit is contained in:
@@ -610,18 +610,19 @@ func (c *StoreSkuController) GetVendorStoreSkuPrice() {
|
||||
// @Title 根据skuID关注商品,价格为中位价,部分可售
|
||||
// @Description 根据skuID关注商品,价格为中位价,部分可售
|
||||
// @Param token header string true "认证token"
|
||||
// @Param skuIDs formData string true "商品ID列表"
|
||||
// @Param payload formData string true "json数据,StoreSkuBindInfo对象数组"
|
||||
// @Param isAsync formData bool true "是否异步,缺省是同步"
|
||||
// @Param isContinueWhenError formData bool true "单个同步失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /FocusStoreSkusBySku [post]
|
||||
func (c *StoreSkuController) FocusStoreSkusBySku() {
|
||||
var skuIDList []int
|
||||
var skuBindInfos []*cms.StoreSkuBindInfo
|
||||
c.callFocusStoreSkusBySku(func(params *tStoreSkuFocusStoreSkusBySkuParams) (retVal interface{}, errCode string, err error) {
|
||||
if jxutils.Strings2Objs(params.SkuIDs, &skuIDList); err == nil {
|
||||
retVal, err = cms.FocusStoreSkusBySku(params.Ctx, skuIDList, params.IsAsync, params.IsContinueWhenError)
|
||||
if err = jxutils.Strings2Objs(params.Payload, &skuBindInfos); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
retVal, err = cms.FocusStoreSkusBySku(params.Ctx, skuBindInfos, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user