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 (
"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 {