Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
ab5f908300
|
@ -136,10 +136,18 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu
|
|||
Color: colorsSet,
|
||||
})
|
||||
}
|
||||
var templateTagGroups interface{}
|
||||
if templateInfo.Groups != nil && *templateInfo.Groups != "" {
|
||||
if err = json.Unmarshal([]byte(*templateInfo.Groups), &templateTagGroups); err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeJsonErr, "failed to parse groups")
|
||||
}
|
||||
}
|
||||
list = append(list, types.GetProductTemplateTagsRsp{
|
||||
Id: templateInfo.Id,
|
||||
TemplateTag: *templateInfo.TemplateTag,
|
||||
IsDefaultTemplateTag: isDefaultTemplateTag,
|
||||
TemplateTagGroups: templateTagGroups,
|
||||
Cover: *templateInfo.Cover,
|
||||
CoverMetadata: mapResourceMetadata[*templateInfo.Cover],
|
||||
Colors: colors,
|
||||
|
|
|
@ -13,6 +13,7 @@ type GetProductTemplateTagsRsp struct {
|
|||
Id int64 `json:"id"`
|
||||
TemplateTag string `json:"template_tag"`
|
||||
IsDefaultTemplateTag bool `json:"is_default_template_tag"`
|
||||
TemplateTagGroups interface{} `json:"template_tag_groups"`
|
||||
Cover string `json:"cover"`
|
||||
CoverMetadata interface{} `json:"cover_metadata"`
|
||||
Colors []ColorsItem `json:"colors"`
|
||||
|
|
|
@ -23,6 +23,7 @@ type GetProductTemplateTagsRsp {
|
|||
Id int64 `json:"id"`
|
||||
TemplateTag string `json:"template_tag"`
|
||||
IsDefaultTemplateTag bool `json:"is_default_template_tag"`
|
||||
TemplateTagGroups interface{} `json:"template_tag_groups"`
|
||||
Cover string `json:"cover"`
|
||||
CoverMetadata interface{} `json:"cover_metadata"`
|
||||
Colors []ColorsItem `json:"colors"`
|
||||
|
|
|
@ -15,18 +15,19 @@ type RenderImageReqMsg struct {
|
|||
RenderData RenderData `json:"render_data"`
|
||||
}
|
||||
type RenderData struct {
|
||||
TemplateTag string `json:"template_tag"` //模板标签(必须)
|
||||
TemplateTagColor TemplateTagColor `json:"template_tag_color"` //模板标签组合颜色
|
||||
ProductId int64 `json:"product_id"` //产品id(必须)
|
||||
Website string `json:"website"` //网站(可选)
|
||||
Slogan string `json:"slogan"` //slogan(可选)
|
||||
Address string `json:"address"` //地址(可选)
|
||||
Phone string `json:"phone"` //电话(可选)
|
||||
Qrcode string `json:"qrcode"` //二维码(可选)
|
||||
ProductSizeId int64 `json:"product_size_id"` //尺寸id(可选)
|
||||
UserId int64 `json:"user_id"` //用户id(websocket连接建立再赋值)
|
||||
GuestId int64 `json:"guest_id"` //游客id(websocket连接建立再赋值)
|
||||
Logo string `json:"logo"` //log资源地址(websocket连接建立再赋值)
|
||||
TemplateTag string `json:"template_tag"` //模板标签(必须)
|
||||
TemplateTagColor TemplateTagColor `json:"template_tag_color"` //模板标签组合颜色(必须)
|
||||
TemplateTagGroups interface{} `json:"template_tag_groups"` //模板标签分组信息(必须)
|
||||
Logo string `json:"logo"` //log资源地址(必须)
|
||||
ProductId int64 `json:"product_id"` //产品id(必须)
|
||||
Website string `json:"website"` //网站(可选)
|
||||
Slogan string `json:"slogan"` //slogan(可选)
|
||||
Address string `json:"address"` //地址(可选)
|
||||
Phone string `json:"phone"` //电话(可选)
|
||||
Qrcode string `json:"qrcode"` //二维码(可选)
|
||||
ProductSizeId int64 `json:"product_size_id"` //尺寸id(可选)
|
||||
UserId int64 `json:"user_id"` //用户id(websocket连接建立再赋值)
|
||||
GuestId int64 `json:"guest_id"` //游客id(websocket连接建立再赋值)
|
||||
}
|
||||
type TemplateTagColor struct {
|
||||
Color [][]string `json:"color"` //颜色组合
|
||||
|
|
Loading…
Reference in New Issue
Block a user