38 lines
1.3 KiB
Go
38 lines
1.3 KiB
Go
package controllers
|
||
|
||
import (
|
||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||
"github.com/astaxie/beego"
|
||
)
|
||
|
||
type SkuController struct {
|
||
beego.Controller
|
||
}
|
||
|
||
// @Title 得到厂商商品类别
|
||
// @Description 得到厂商商品类别(区别于商家SKU类别)
|
||
// @Param token header string true "认证toke"
|
||
// @Param vendorID query int true "厂商ID"
|
||
// @Success 200 {object} controllers.CallResult
|
||
// @Failure 200 {object} controllers.CallResult
|
||
// @router /GetVendorCategories [get]
|
||
func (c *SkuController) GetVendorCategories() {
|
||
c.callGetVendorCategories(func(params *tSkuGetVendorCategoriesParams) (retVal interface{}, errCode string, err error) {
|
||
retVal, err = cms.GetVendorCategories(params.VendorID)
|
||
return retVal, "", err
|
||
})
|
||
}
|
||
|
||
// @Title 得到商品相关的一些基础信息
|
||
// @Description 得到商品相关的一些基础信息,包括unit列表,specUnit列表
|
||
// @Param token header string true "认证toke"
|
||
// @Success 200 {object} controllers.CallResult
|
||
// @Failure 200 {object} controllers.CallResult
|
||
// @router /GetSkuMetaInfo [get]
|
||
func (c *SkuController) GetSkuMetaInfo() {
|
||
c.callGetSkuMetaInfo(func(params *tSkuGetSkuMetaInfoParams) (retVal interface{}, errCode string, err error) {
|
||
retVal, err = cms.GetSkuMetaInfo()
|
||
return retVal, "", err
|
||
})
|
||
}
|