1
This commit is contained in:
@@ -814,14 +814,20 @@ func (c *SkuController) GetTiktokCategoryValue() {
|
||||
// @Title 根据美团分类id获取平台扩展规则
|
||||
// @Description 根据美团分类id获取平台扩展规则
|
||||
// @Param token header string true "认证token"
|
||||
// @Param mtCategoryId query int64 true "美团类目id"
|
||||
// @Param categoryId query int64 true "类目id"
|
||||
// @Param vendorId query int64 true "平台分类ID"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetMTProductRule [get]
|
||||
func (c *SkuController) GetMTProductRule() {
|
||||
c.callGetMTProductRule(func(params *tSkuGetMTProductRuleParams) (retVal interface{}, errCode string, err error) {
|
||||
data, err := mtwm.GetMTProductRule(params.MtCategoryId)
|
||||
return data, "", err
|
||||
switch params.VendorId {
|
||||
case model.VendorIDMTWM:
|
||||
retVal, err = mtwm.GetMTProductRule(params.CategoryId)
|
||||
case model.VendorIDEBAI:
|
||||
retVal, err = ebai.GetCategoryAttrValueList(int64(params.CategoryId))
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
|
||||
}
|
||||
@@ -847,18 +853,12 @@ func (c *SkuController) GetMTCategoryAttrList() {
|
||||
// @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) (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)
|
||||
}
|
||||
retVal, err = mtwm.GetCategoryAttrValueList(params.AppOrgCode, params.Keyword, params.AttrId)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user