- UpdateStoresSkus
This commit is contained in:
@@ -101,3 +101,24 @@ func (c *StoreSkuController) SyncStoreSkus() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 批量修改多商家商品绑定
|
||||
// @Description 批量修改多商家商品绑定
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeIDs formData string true "门店ID列表"
|
||||
// @Param payload formData string true "json数据,StoreSkuBindInfo对象数组"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdateStoresSkus [put]
|
||||
func (c *StoreSkuController) UpdateStoresSkus() {
|
||||
c.callUpdateStoresSkus(func(params *tStoreSkuUpdateStoresSkusParams) (retVal interface{}, errCode string, err error) {
|
||||
var storeIDs []int
|
||||
var skuBindInfos []*cms.StoreSkuBindInfo
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.StoreIDs), &storeIDs); err == nil {
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.Payload), &skuBindInfos); err == nil {
|
||||
retVal, err = cms.UpdateStoresSkus(storeIDs, skuBindInfos, GetUserNameFromToken(params.Token))
|
||||
}
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user