From d45a0eb68007835c5a1b99c125db380795a9c640 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 26 Sep 2023 14:23:09 +0800 Subject: [PATCH 1/5] fix --- server_api/product.api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_api/product.api b/server_api/product.api index 0fe9971e..687400ef 100644 --- a/server_api/product.api +++ b/server_api/product.api @@ -44,7 +44,7 @@ service product { //获取产品模型信息 @handler GetModelByPidHandler get /api/product/get_model_by_pid(GetModelByPidReq) returns (response); - //获取产品阶梯价格列表 + //获取产品阶梯价格列表(即将废弃) @handler GetPriceByPidHandler get /api/product/get_price_by_pid(GetPriceByPidReq) returns (response); //获取产品阶梯价格信息 From 2747c9ddd9ac7012272c7fef21f2b9708da7fd55 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 26 Sep 2023 14:38:34 +0800 Subject: [PATCH 2/5] fix --- .../internal/logic/getproducttemplatetagslogic.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go index 8e70d0d9..bec41fd9 100644 --- a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go +++ b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go @@ -135,6 +135,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu for k, v := range productTemplateTags { if templateTagStr == *v.TemplateTag { productTemplateTags[k], productTemplateTags[index] = productTemplateTags[index], productTemplateTags[k] + break } } } From 82fc0f2b80fe2386fa496a8ec59a58567dbc3f4d Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 26 Sep 2023 14:46:12 +0800 Subject: [PATCH 3/5] fix --- .../internal/logic/getproducttemplatetagslogic.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go index bec41fd9..f51243e6 100644 --- a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go +++ b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go @@ -3,6 +3,7 @@ package logic import ( "context" "encoding/json" + "fmt" "fusenapi/model/gmodel" "fusenapi/server/product-template-tag/internal/svc" "fusenapi/server/product-template-tag/internal/types" @@ -130,6 +131,9 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu } mapResourceMetadata[*v.ResourceUrl] = metadata } + fmt.Println(simpleTemplateTags) + fmt.Println("****************************************") + fmt.Println(productTemplateTags) //排序 for index, templateTagStr := range simpleTemplateTags { for k, v := range productTemplateTags { From 03cbe2894ea82292f7695b95bf6d33a8c3e9114c Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 26 Sep 2023 14:48:49 +0800 Subject: [PATCH 4/5] fix --- .../internal/logic/getproducttemplatetagslogic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go index f51243e6..8a0f7f87 100644 --- a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go +++ b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go @@ -133,7 +133,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu } fmt.Println(simpleTemplateTags) fmt.Println("****************************************") - fmt.Println(productTemplateTags) + fmt.Println(templateTagNameList) //排序 for index, templateTagStr := range simpleTemplateTags { for k, v := range productTemplateTags { From a1d78b7a0ca00d017eaf62117796b6f835d2cdfa Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 26 Sep 2023 14:56:32 +0800 Subject: [PATCH 5/5] fix --- .../internal/logic/getproducttemplatetagslogic.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go index 8a0f7f87..d97c768a 100644 --- a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go +++ b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go @@ -3,7 +3,6 @@ package logic import ( "context" "encoding/json" - "fmt" "fusenapi/model/gmodel" "fusenapi/server/product-template-tag/internal/svc" "fusenapi/server/product-template-tag/internal/types" @@ -107,7 +106,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu for templateTag, _ := range mapMaterialTemplateTagColors { templateTagNameList = append(templateTagNameList, templateTag) } - productTemplateTags, err = l.svcCtx.AllModels.FsProductTemplateTags.GetListByTagNames(l.ctx, templateTagNameList, req.Limit, 1, "id DESC") + productTemplateTags, err = l.svcCtx.AllModels.FsProductTemplateTags.GetListByTagNames(l.ctx, templateTagNameList, len(templateTagNameList), 1, "id DESC") if err != nil { logx.Error(err) return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get template tags") @@ -131,9 +130,6 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu } mapResourceMetadata[*v.ResourceUrl] = metadata } - fmt.Println(simpleTemplateTags) - fmt.Println("****************************************") - fmt.Println(templateTagNameList) //排序 for index, templateTagStr := range simpleTemplateTags { for k, v := range productTemplateTags {