From 0c3e93bba60e4d84613569921800485e1ef1dcaa Mon Sep 17 00:00:00 2001
From: laodaming <11058467+laudamine@user.noreply.gitee.com>
Date: Mon, 30 Oct 2023 16:30:01 +0800
Subject: [PATCH] fix

---
 server/product/internal/logic/gettagproductlistlogic.go | 6 +++---
 server/product/internal/types/types.go                  | 2 +-
 server_api/product.api                                  | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/server/product/internal/logic/gettagproductlistlogic.go b/server/product/internal/logic/gettagproductlistlogic.go
index c2447d0a..f8a0b31f 100644
--- a/server/product/internal/logic/gettagproductlistlogic.go
+++ b/server/product/internal/logic/gettagproductlistlogic.go
@@ -51,12 +51,12 @@ func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListR
 		Level:     2,    //等级是2的
 	}
 	//传入分类id
-	if req.Cid > 0 {
+	if req.BasicTagId > 0 {
 		//获取该类行的levelprefix
-		tagData, err := l.svcCtx.AllModels.FsTags.FindOne(l.ctx, req.Cid)
+		tagData, err := l.svcCtx.AllModels.FsTags.FindOne(l.ctx, req.BasicTagId)
 		if err != nil {
 			if errors.Is(err, gorm.ErrRecordNotFound) {
-				return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "param cid is invalid:record not found")
+				return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "param BasicTagId is invalid:record not found")
 			}
 			logx.Error(err)
 			return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get tag info")
diff --git a/server/product/internal/types/types.go b/server/product/internal/types/types.go
index a8180123..410abd5c 100644
--- a/server/product/internal/types/types.go
+++ b/server/product/internal/types/types.go
@@ -29,7 +29,7 @@ type GetRecommandProductListRsp struct {
 }
 
 type GetTagProductListReq struct {
-	Cid          int64  `form:"cid,optional"`           //分类id
+	BasicTagId   int64  `form:"basic_tag_id,optional"`  //传入则以该分类为最高层分类查询
 	MerchantType int64  `form:"merchant_type,optional"` //商户类型
 	TemplateTag  string `form:"template_tag,optional"`  //模板标签
 	WithProduct  bool   `form:"with_product,optional"`  //是否携带分类下的产品
diff --git a/server_api/product.api b/server_api/product.api
index 4d787558..e7e8e061 100644
--- a/server_api/product.api
+++ b/server_api/product.api
@@ -72,7 +72,7 @@ type GetRecommandProductListRsp {
 }
 //获取分类产品列表
 type GetTagProductListReq {
-	Cid          int64  `form:"cid,optional"`           //分类id
+	BasicTagId   int64  `form:"basic_tag_id,optional"`  //传入则以该分类为最高层分类查询
 	MerchantType int64  `form:"merchant_type,optional"` //商户类型
 	TemplateTag  string `form:"template_tag,optional"`  //模板标签
 	WithProduct  bool   `form:"with_product,optional"`  //是否携带分类下的产品