This commit is contained in:
邹宗楠
2025-11-26 15:46:18 +08:00
parent 1b59ab41a0
commit 45e2368b85
4 changed files with 66838 additions and 66838 deletions

View File

@@ -814,14 +814,20 @@ func (c *SkuController) GetTiktokCategoryValue() {
// @Title 根据美团分类id获取平台扩展规则 // @Title 根据美团分类id获取平台扩展规则
// @Description 根据美团分类id获取平台扩展规则 // @Description 根据美团分类id获取平台扩展规则
// @Param token header string true "认证token" // @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 // @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult // @Failure 200 {object} controllers.CallResult
// @router /GetMTProductRule [get] // @router /GetMTProductRule [get]
func (c *SkuController) GetMTProductRule() { func (c *SkuController) GetMTProductRule() {
c.callGetMTProductRule(func(params *tSkuGetMTProductRuleParams) (retVal interface{}, errCode string, err error) { c.callGetMTProductRule(func(params *tSkuGetMTProductRuleParams) (retVal interface{}, errCode string, err error) {
data, err := mtwm.GetMTProductRule(params.MtCategoryId) switch params.VendorId {
return data, "", err 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 appOrgCode query string true "平台code"
// @Param attrId query int64 true "属性id" // @Param attrId query int64 true "属性id"
// @Param keyword query string true "属性值的关键词" // @Param keyword query string true "属性值的关键词"
// @Param vendorId query int true "所属平台[3-饿百/1-美团]"
// @Success 200 {object} controllers.CallResult // @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult // @Failure 200 {object} controllers.CallResult
// @router /GetMTCategoryAttrValueList [get] // @router /GetMTCategoryAttrValueList [get]
func (c *SkuController) GetMTCategoryAttrValueList() { func (c *SkuController) GetMTCategoryAttrValueList() {
c.callGetMTCategoryAttrValueList(func(params *tSkuGetMTCategoryAttrValueListParams) (retVal interface{}, code string, err error) { 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 return retVal, "", err
}) })
} }

File diff suppressed because it is too large Load Diff

View File

@@ -15320,14 +15320,6 @@
"description": "属性值的关键词", "description": "属性值的关键词",
"required": true, "required": true,
"type": "string" "type": "string"
},
{
"in": "query",
"name": "vendorId",
"description": "所属平台[3-饿百/1-美团]",
"required": true,
"type": "integer",
"format": "int64"
} }
], ],
"responses": { "responses": {
@@ -15354,8 +15346,16 @@
}, },
{ {
"in": "query", "in": "query",
"name": "mtCategoryId", "name": "categoryId",
"description": "美团类目id", "description": "类目id",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "vendorId",
"description": "平台分类ID",
"required": true, "required": true,
"type": "integer", "type": "integer",
"format": "int64" "format": "int64"

View File

@@ -10389,12 +10389,6 @@ paths:
description: 属性值的关键词 description: 属性值的关键词
required: true required: true
type: string type: string
- in: query
name: vendorId
description: 所属平台[3-饿百/1-美团]
required: true
type: integer
format: int64
responses: responses:
"200": "200":
description: '{object} controllers.CallResult' description: '{object} controllers.CallResult'
@@ -10411,8 +10405,14 @@ paths:
required: true required: true
type: string type: string
- in: query - in: query
name: mtCategoryId name: categoryId
description: 美团类目id description: 类目id
required: true
type: integer
format: int64
- in: query
name: vendorId
description: 平台分类ID
required: true required: true
type: integer type: integer
format: int64 format: int64