fix:合图调整
This commit is contained in:
@@ -195,17 +195,18 @@ func (l *defaultImageHandle) LogoInfoSet(ctx context.Context, in *LogoInfoSetReq
|
||||
/* logo合图 */
|
||||
type (
|
||||
LogoCombineReq struct {
|
||||
UserId int64 `json:"user_id"`
|
||||
GuestId int64 `json:"guest_id"`
|
||||
ProductTemplateV2Info *gmodel.FsProductTemplateV2 `json:"product_template_v2_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"` //合图颜色
|
||||
UserId int64 `json:"user_id"`
|
||||
GuestId int64 `json:"guest_id"`
|
||||
ProductTemplateV2Info *gmodel.FsProductTemplateV2 `json:"product_template_v2_info"`
|
||||
ProductTemplateTagGroups interface{} `json:"product_template_tag_groups"`
|
||||
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,13 +258,6 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
|
||||
}
|
||||
}
|
||||
|
||||
productTemplateTagInfo, err := gmodel.NewFsProductTemplateTagsModel(l.MysqlConn).FindOneByTagName(ctx, in.TemplateTag, "groups")
|
||||
|
||||
if err != nil {
|
||||
logc.Errorf(ctx, "NewFsProductTemplateTagsModel.FindOneByTagName:%v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var groupOptions map[string]interface{}
|
||||
var materialList []interface{}
|
||||
if in.ProductTemplateV2Info.TemplateInfo != nil {
|
||||
@@ -297,13 +291,6 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
|
||||
moduleDataMap["groupOptions"] = groupOptions
|
||||
moduleDataMap["materialList"] = materialList
|
||||
|
||||
var tagDataMap []interface{}
|
||||
err = json.Unmarshal([]byte(*productTemplateTagInfo.Groups), &tagDataMap)
|
||||
if err != nil {
|
||||
logc.Errorf(ctx, "Unmarshal tagDataMap:%v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var combineParam map[string]interface{}
|
||||
json.Unmarshal([]byte(*resLogoInfo.Metadata), &combineParam)
|
||||
combineParam["template_tagid"] = in.TemplateTag
|
||||
@@ -319,7 +306,7 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
|
||||
}
|
||||
var postMap = make(map[string]interface{}, 2)
|
||||
postMap["module_data"] = moduleDataMap
|
||||
postMap["tag_data"] = tagDataMap
|
||||
postMap["tag_data"] = in.ProductTemplateTagGroups
|
||||
postMap["param_data"] = combineParam
|
||||
|
||||
logc.Infof(ctx, "合图--算法请求--合图--开始时间:%v", time.Now().UTC())
|
||||
|
||||
Reference in New Issue
Block a user