11
This commit is contained in:
@@ -195,17 +195,17 @@ func (l *defaultImageHandle) LogoInfoSet(ctx context.Context, in *LogoInfoSetReq
|
||||
/* logo合图 */
|
||||
type (
|
||||
LogoCombineReq struct {
|
||||
UserId int64 `json:"user_id"`
|
||||
GuestId int64 `json:"guest_id"`
|
||||
TemplateId int64 `json:"template_id"`
|
||||
TemplateTag string `json:"template_tag"`
|
||||
Website string `json:"website"` // 合图参数
|
||||
Slogan string `json:"slogan"` // 合图参数
|
||||
Address string `json:"address"` // 合图参数
|
||||
Phone string `json:"phone"` // 合图参数
|
||||
Qrcode string `json:"qrcode"` // 合图参数
|
||||
LogoUrl string `json:"logo_url"` // 合图参数
|
||||
TemplateTagColor TemplateTagColor `json:"template_tag_color"`
|
||||
UserId int64 `json:"user_id"`
|
||||
GuestId int64 `json:"guest_id"`
|
||||
ProductTemplateV2Info *gmodel.FsProductTemplateV2 `json:"product_template_v_2_info"`
|
||||
TemplateTag string `json:"template_tag"`
|
||||
Website string `json:"website"` // 合图参数
|
||||
Slogan string `json:"slogan"` // 合图参数
|
||||
Address string `json:"address"` // 合图参数
|
||||
Phone string `json:"phone"` // 合图参数
|
||||
Qrcode string `json:"qrcode"` // 合图参数
|
||||
LogoUrl string `json:"logo_url"` // 合图参数
|
||||
TemplateTagColor TemplateTagColor `json:"template_tag_color"` //合图颜色
|
||||
}
|
||||
LogoCombineRes struct {
|
||||
ResourceId string
|
||||
@@ -257,15 +257,6 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
|
||||
}
|
||||
}
|
||||
|
||||
// 没有查到,先根据模版id 查询模版数据 请求算法数据
|
||||
productTemplateV2Model := gmodel.NewFsProductTemplateV2Model(l.MysqlConn)
|
||||
productTemplateV2Info, err := productTemplateV2Model.FindOne(ctx, in.TemplateId)
|
||||
|
||||
if err != nil {
|
||||
logc.Errorf(ctx, "productTemplateV2Model.FindOne:%v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
productTemplateTagInfo, err := gmodel.NewFsProductTemplateTagsModel(l.MysqlConn).FindOneByTagName(ctx, in.TemplateTag, "groups")
|
||||
|
||||
if err != nil {
|
||||
@@ -275,9 +266,9 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
|
||||
|
||||
var groupOptions map[string]interface{}
|
||||
var materialList []interface{}
|
||||
if productTemplateV2Info.TemplateInfo != nil {
|
||||
if in.ProductTemplateV2Info.TemplateInfo != nil {
|
||||
var templateInfo map[string]interface{}
|
||||
err = json.Unmarshal([]byte(*productTemplateV2Info.TemplateInfo), &templateInfo)
|
||||
err = json.Unmarshal([]byte(*in.ProductTemplateV2Info.TemplateInfo), &templateInfo)
|
||||
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
@@ -301,8 +292,8 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
|
||||
}
|
||||
|
||||
var moduleDataMap = make(map[string]interface{}, 4)
|
||||
moduleDataMap["id"] = productTemplateV2Info.Id
|
||||
moduleDataMap["material"] = productTemplateV2Info.MaterialImg
|
||||
moduleDataMap["id"] = in.ProductTemplateV2Info.Id
|
||||
moduleDataMap["material"] = in.ProductTemplateV2Info.MaterialImg
|
||||
moduleDataMap["groupOptions"] = groupOptions
|
||||
moduleDataMap["materialList"] = materialList
|
||||
|
||||
|
||||
Reference in New Issue
Block a user