1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/ebai"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -843,16 +844,22 @@ func (c *SkuController) GetMTCategoryAttrList() {
|
||||
// @Title 根据美团属性id 查询特殊属性(品牌、产地)
|
||||
// @Description 根据美团属性id 查询特殊属性(品牌、产地)
|
||||
// @Param token header string true "认证token"
|
||||
// @Param appOrgCode query string true "美团app"
|
||||
// @Param appOrgCode query string true "平台code"
|
||||
// @Param attrId query int64 true "属性id"
|
||||
// @Param keyword query string true "属性值的关键词"
|
||||
// @Param vendorId query int true "所属平台[3-饿百/1-美团]"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetMTCategoryAttrValueList [get]
|
||||
func (c *SkuController) GetMTCategoryAttrValueList() {
|
||||
c.callGetMTCategoryAttrValueList(func(params *tSkuGetMTCategoryAttrValueListParams) (interface{}, string, error) {
|
||||
data, err := mtwm.GetCategoryAttrValueList(params.AppOrgCode, params.Keyword, params.AttrId)
|
||||
return data, "", err
|
||||
c.callGetMTCategoryAttrValueList(func(params *tSkuGetMTCategoryAttrValueListParams) (retVal interface{}, code string, err error) {
|
||||
switch params.VendorId {
|
||||
case model.VendorIDEBAI:
|
||||
retVal, err = ebai.GetCategoryAttrValueList(int64(params.AttrId))
|
||||
case model.VendorIDMTWM:
|
||||
retVal, err = mtwm.GetCategoryAttrValueList(params.AppOrgCode, params.Keyword, params.AttrId)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user