Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
		
						commit
						9f412fe108
					
				@ -104,7 +104,7 @@ func (l *LogoCombineLogic) LogoCombine(req *types.LogoCombineReq, userinfo *auth
 | 
			
		||||
		GuestId:     guestId,
 | 
			
		||||
		TemplateTag: req.TemplateTag,
 | 
			
		||||
		Website:     req.Website,
 | 
			
		||||
		Slogan:      req.Slogan,
 | 
			
		||||
		Slogan:      &req.Slogan,
 | 
			
		||||
		Phone:       req.Phone,
 | 
			
		||||
		Address:     req.Address,
 | 
			
		||||
		Qrcode:      req.Qrcode,
 | 
			
		||||
 | 
			
		||||
@ -38,11 +38,11 @@ type LogoCombineReq struct {
 | 
			
		||||
	TemplateTagGroups []TemplateTagGroups `json:"template_tag_groups"`
 | 
			
		||||
	TemplateId        int64               `json:"template_id"`      // 合图参数
 | 
			
		||||
	TemplateTag       string              `json:"template_tag"`     // 合图参数
 | 
			
		||||
	Website           string              `json:"website,optional"` // 合图参数
 | 
			
		||||
	Slogan            string              `json:"slogan,optional"`  // 合图参数
 | 
			
		||||
	Address           string              `json:"address,optional"` // 合图参数
 | 
			
		||||
	Phone             string              `json:"phone,optional"`   // 合图参数
 | 
			
		||||
	Qrcode            string              `json:"qrcode,optional"`  // 合图参数
 | 
			
		||||
	Website           *string             `json:"website,optional"` // 合图参数
 | 
			
		||||
	Address           *string             `json:"address,optional"` // 合图参数
 | 
			
		||||
	Phone             *string             `json:"phone,optional"`   // 合图参数
 | 
			
		||||
	Qrcode            *string             `json:"qrcode,optional"`  // 合图参数
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type TemplateTagColor struct {
 | 
			
		||||
 | 
			
		||||
@ -12,10 +12,11 @@ import (
 | 
			
		||||
	"fusenapi/utils/curl"
 | 
			
		||||
	"fusenapi/utils/hash"
 | 
			
		||||
	"fusenapi/utils/websocket_data"
 | 
			
		||||
	"github.com/zeromicro/go-zero/core/logx"
 | 
			
		||||
	"gorm.io/gorm"
 | 
			
		||||
	"strconv"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/zeromicro/go-zero/core/logx"
 | 
			
		||||
	"gorm.io/gorm"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
@ -214,11 +215,11 @@ func (w *wsConnectItem) renderImage(renderImageData websocket_data.RenderImageRe
 | 
			
		||||
		ProductTemplateV2Info:    productTemplate,
 | 
			
		||||
		ProductTemplateTagGroups: renderImageData.RenderData.TemplateTagGroups,
 | 
			
		||||
		TemplateTag:              renderImageData.RenderData.TemplateTag,
 | 
			
		||||
		Website:                  renderImageData.RenderData.Website,
 | 
			
		||||
		Slogan:                   renderImageData.RenderData.Slogan,
 | 
			
		||||
		Address:                  renderImageData.RenderData.Address,
 | 
			
		||||
		Phone:                    renderImageData.RenderData.Phone,
 | 
			
		||||
		Qrcode:                   renderImageData.RenderData.Qrcode,
 | 
			
		||||
		Slogan:                   &renderImageData.RenderData.Slogan,
 | 
			
		||||
		// Website:                  &renderImageData.RenderData.Website,
 | 
			
		||||
		// Address:                  &renderImageData.RenderData.Address,
 | 
			
		||||
		// Phone:                    &renderImageData.RenderData.Phone,
 | 
			
		||||
		// Qrcode:                   &renderImageData.RenderData.Qrcode,
 | 
			
		||||
		LogoUrl: renderImageData.RenderData.Logo,
 | 
			
		||||
		TemplateTagColor: repositories.TemplateTagColor{
 | 
			
		||||
			Color: renderImageData.RenderData.TemplateTagColor.Colors,
 | 
			
		||||
 | 
			
		||||
@ -70,11 +70,11 @@ type (
 | 
			
		||||
		TemplateTagGroups []TemplateTagGroups `json:"template_tag_groups"`
 | 
			
		||||
		TemplateId        int64               `json:"template_id"`      // 合图参数
 | 
			
		||||
		TemplateTag       string              `json:"template_tag"`     // 合图参数
 | 
			
		||||
		Website           string              `json:"website,optional"` // 合图参数
 | 
			
		||||
		Slogan            string              `json:"slogan,optional"`  // 合图参数
 | 
			
		||||
		Address           string              `json:"address,optional"` // 合图参数
 | 
			
		||||
		Phone             string              `json:"phone,optional"`   // 合图参数
 | 
			
		||||
		Qrcode            string              `json:"qrcode,optional"`  // 合图参数
 | 
			
		||||
		Website           *string             `json:"website,optional"` // 合图参数
 | 
			
		||||
		Address           *string             `json:"address,optional"` // 合图参数
 | 
			
		||||
		Phone             *string             `json:"phone,optional"`   // 合图参数
 | 
			
		||||
		Qrcode            *string             `json:"qrcode,optional"`  // 合图参数
 | 
			
		||||
	}
 | 
			
		||||
	TemplateTagColor {
 | 
			
		||||
		Colors             [][]string `json:"colors"`               // 颜色组合
 | 
			
		||||
 | 
			
		||||
@ -127,15 +127,16 @@ type (
 | 
			
		||||
		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"`           // 合图参数
 | 
			
		||||
		Resolution               string                      `json:"resolution"`         // 合图参数
 | 
			
		||||
		TemplateTagColor         TemplateTagColor            `json:"template_tag_color"` // 合图颜色
 | 
			
		||||
		Debug                    *auth.Debug                 `json:"debug"`
 | 
			
		||||
 | 
			
		||||
		Website *string `json:"website"` // 合图参数
 | 
			
		||||
		Slogan  *string `json:"slogan"`  // 合图参数
 | 
			
		||||
		Address *string `json:"address"` // 合图参数
 | 
			
		||||
		Phone   *string `json:"phone"`   // 合图参数
 | 
			
		||||
		Qrcode  *string `json:"qrcode"`  // 合图参数
 | 
			
		||||
	}
 | 
			
		||||
	LogoCombineRes struct {
 | 
			
		||||
		ResourceId  string          `json:"resource_id"`
 | 
			
		||||
@ -226,11 +227,22 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
 | 
			
		||||
	json.Unmarshal(*resLogoInfo.Metadata, &combineParam)
 | 
			
		||||
	combineParam["resolution"] = in.Resolution
 | 
			
		||||
	combineParam["template_tagid"] = in.TemplateTag
 | 
			
		||||
	combineParam["website"] = in.Website
 | 
			
		||||
	combineParam["slogan"] = in.Slogan
 | 
			
		||||
	combineParam["phone"] = in.Phone
 | 
			
		||||
	combineParam["address"] = in.Address
 | 
			
		||||
	combineParam["qrcode"] = in.Qrcode
 | 
			
		||||
	if in.Website != nil {
 | 
			
		||||
		combineParam["website"] = *in.Website
 | 
			
		||||
	}
 | 
			
		||||
	if in.Slogan != nil {
 | 
			
		||||
		combineParam["slogan"] = *in.Slogan
 | 
			
		||||
	}
 | 
			
		||||
	if in.Phone != nil {
 | 
			
		||||
		combineParam["phone"] = *in.Phone
 | 
			
		||||
	}
 | 
			
		||||
	if in.Address != nil {
 | 
			
		||||
		combineParam["address"] = *in.Address
 | 
			
		||||
	}
 | 
			
		||||
	if in.Qrcode != nil {
 | 
			
		||||
		combineParam["qrcode"] = *in.Qrcode
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	combineParam["template_tag_selected"] = map[string]interface{}{
 | 
			
		||||
		"template_tag": in.TemplateTag,
 | 
			
		||||
		"color":        in.TemplateTagColor.Color,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user