- UpdateStoreSku
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
@@ -34,3 +35,21 @@ func (c *StoreSkuController) GetStoreSkus() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 修改商家商品绑定
|
||||
// @Description 修改商家商品绑定
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeID formData int true "需要修改的商品名ID,payload中的相应数据会被忽略"
|
||||
// @Param payload formData string true "json数据,StoreSkuBindInfo对象数组
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdateStoreSku [put]
|
||||
func (c *StoreSkuController) UpdateStoreSku() {
|
||||
c.callUpdateStoreSku(func(params *tStoreSkuUpdateStoreSkuParams) (retVal interface{}, errCode string, err error) {
|
||||
var skuBinds []*cms.StoreSkuBindInfo
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.Payload), &skuBinds); err == nil {
|
||||
retVal, err = cms.UpdateStoreSku(params.StoreID, skuBinds, GetUserNameFromToken(params.Token))
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user