This commit is contained in:
laodaming 2023-09-26 14:56:32 +08:00
parent 03cbe2894e
commit a1d78b7a0c

View File

@ -3,7 +3,6 @@ package logic
import ( import (
"context" "context"
"encoding/json" "encoding/json"
"fmt"
"fusenapi/model/gmodel" "fusenapi/model/gmodel"
"fusenapi/server/product-template-tag/internal/svc" "fusenapi/server/product-template-tag/internal/svc"
"fusenapi/server/product-template-tag/internal/types" "fusenapi/server/product-template-tag/internal/types"
@ -107,7 +106,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu
for templateTag, _ := range mapMaterialTemplateTagColors { for templateTag, _ := range mapMaterialTemplateTagColors {
templateTagNameList = append(templateTagNameList, templateTag) 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 { if err != nil {
logx.Error(err) logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get template tags") 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 mapResourceMetadata[*v.ResourceUrl] = metadata
} }
fmt.Println(simpleTemplateTags)
fmt.Println("****************************************")
fmt.Println(templateTagNameList)
//排序 //排序
for index, templateTagStr := range simpleTemplateTags { for index, templateTagStr := range simpleTemplateTags {
for k, v := range productTemplateTags { for k, v := range productTemplateTags {