diff --git a/model/gmodel/fs_order_gen.go b/model/gmodel/fs_order_gen.go index a8448ebf..aa54f279 100644 --- a/model/gmodel/fs_order_gen.go +++ b/model/gmodel/fs_order_gen.go @@ -1,8 +1,9 @@ package gmodel import ( - "gorm.io/gorm" "time" + + "gorm.io/gorm" ) // fs_order 订单表 diff --git a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go index 4a24ce61..c0384d90 100644 --- a/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go +++ b/server/product-template-tag/internal/logic/getproducttemplatetagslogic.go @@ -54,6 +54,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu logx.Error(err) return } + var colors interface{} if logoInfo.Metadata == nil || *logoInfo.Metadata == "" { // 返回固定模板A1a productTemplateTags, err = l.svcCtx.AllModels.FsProductTemplateTags.GetListByTagNames(l.ctx, []string{"A1"}, req.Limit, 1, "`id` DESC") @@ -68,6 +69,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu logx.Error(err) return resp.SetStatusWithMessage(basic.CodeJsonErr, "failed to parse user metadata") } + colors = metaData["colors"] var templateTagNameList []string b, _ := json.Marshal(metaData["template_tagid"]) if err = json.Unmarshal(b, &templateTagNameList); err != nil { @@ -106,6 +108,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu TemplateTag: *v.TemplateTag, Cover: *v.Cover, CoverMetadata: mapResourceMetadata[*v.Cover], + Colors: colors, }) } return resp.SetStatusWithMessage(basic.CodeOK, "success", list) diff --git a/server/product-template-tag/internal/types/types.go b/server/product-template-tag/internal/types/types.go index 6c7f6950..e81cb040 100644 --- a/server/product-template-tag/internal/types/types.go +++ b/server/product-template-tag/internal/types/types.go @@ -14,6 +14,7 @@ type GetProductTemplateTagsRsp struct { TemplateTag string `json:"template_tag"` Cover string `json:"cover"` CoverMetadata interface{} `json:"cover_metadata"` + Colors interface{} `json:"colors"` } type Request struct { @@ -39,10 +40,10 @@ type File struct { } type Meta struct { - TotalCount int64 `json:"totalCount"` - PageCount int64 `json:"pageCount"` - CurrentPage int `json:"currentPage"` - PerPage int `json:"perPage"` + TotalCount int64 `json:"total_count"` + PageCount int64 `json:"page_count"` + CurrentPage int `json:"current_page"` + PerPage int `json:"per_page"` } // Set 设置Response的Code和Message值 diff --git a/server_api/product-template-tag.api b/server_api/product-template-tag.api index bdc513b7..d663e109 100644 --- a/server_api/product-template-tag.api +++ b/server_api/product-template-tag.api @@ -24,4 +24,5 @@ type GetProductTemplateTagsRsp { TemplateTag string `json:"template_tag"` Cover string `json:"cover"` CoverMetadata interface{} `json:"cover_metadata"` + Colors interface{} `json:"colors"` } \ No newline at end of file