Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
cfc1468307
@ -29,7 +29,7 @@ type FsProductModel3d struct {
|
|||||||
IsCloudRender *int64 `gorm:"default:0;" json:"is_cloud_render"` // 是否设置为云渲染模型
|
IsCloudRender *int64 `gorm:"default:0;" json:"is_cloud_render"` // 是否设置为云渲染模型
|
||||||
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
||||||
StepPrice *[]byte `gorm:"default:'';" json:"step_price"` //
|
StepPrice *[]byte `gorm:"default:'';" json:"step_price"` //
|
||||||
PackedUnit *int64 `gorm:"default:0;" json:"packed_unit"` // 被打包的数量单位
|
PackedUnit *int64 `gorm:"default:1;" json:"packed_unit"` // 被打包的数量单位
|
||||||
}
|
}
|
||||||
type FsProductModel3dModel struct {
|
type FsProductModel3dModel struct {
|
||||||
db *gorm.DB
|
db *gorm.DB
|
||||||
|
@ -223,14 +223,18 @@ func (w *wsConnectItem) renderImage(renderImageData websocket_data.RenderImageRe
|
|||||||
}
|
}
|
||||||
//qrcode不需要依赖合图组开关
|
//qrcode不需要依赖合图组开关
|
||||||
if switchInfo.SwitchInfo.QRcode.IfShow && switchInfo.SwitchInfo.QRcode.UserDisabled {
|
if switchInfo.SwitchInfo.QRcode.IfShow && switchInfo.SwitchInfo.QRcode.UserDisabled {
|
||||||
combineReq.Qrcode = &switchInfo.SwitchInfo.QRcode.DefaultValue
|
if renderImageData.RenderData.Qrcode == "" {
|
||||||
|
combineReq.Qrcode = &switchInfo.SwitchInfo.QRcode.Text
|
||||||
|
} else {
|
||||||
|
combineReq.Qrcode = &renderImageData.RenderData.Qrcode
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//合图组开关开启
|
//合图组开关开启
|
||||||
if switchInfo.CombineIsVisible {
|
if switchInfo.CombineIsVisible {
|
||||||
//开启slogan
|
//开启slogan
|
||||||
if switchInfo.SwitchInfo.Slogan.IfShow && switchInfo.SwitchInfo.Slogan.UserDisabled {
|
if switchInfo.SwitchInfo.Slogan.IfShow && switchInfo.SwitchInfo.Slogan.UserDisabled {
|
||||||
if renderImageData.RenderData.Slogan == "" {
|
if renderImageData.RenderData.Slogan == "" {
|
||||||
combineReq.Slogan = &switchInfo.SwitchInfo.Slogan.DefaultValue
|
combineReq.Slogan = &switchInfo.SwitchInfo.Slogan.Text
|
||||||
} else {
|
} else {
|
||||||
combineReq.Slogan = &renderImageData.RenderData.Slogan
|
combineReq.Slogan = &renderImageData.RenderData.Slogan
|
||||||
}
|
}
|
||||||
@ -238,7 +242,7 @@ func (w *wsConnectItem) renderImage(renderImageData websocket_data.RenderImageRe
|
|||||||
//开启website
|
//开启website
|
||||||
if switchInfo.SwitchInfo.Website.IfShow && switchInfo.SwitchInfo.Website.UserDisabled {
|
if switchInfo.SwitchInfo.Website.IfShow && switchInfo.SwitchInfo.Website.UserDisabled {
|
||||||
if renderImageData.RenderData.Website == "" {
|
if renderImageData.RenderData.Website == "" {
|
||||||
combineReq.Website = &switchInfo.SwitchInfo.Website.DefaultValue
|
combineReq.Website = &switchInfo.SwitchInfo.Website.Text
|
||||||
} else {
|
} else {
|
||||||
combineReq.Website = &renderImageData.RenderData.Website
|
combineReq.Website = &renderImageData.RenderData.Website
|
||||||
}
|
}
|
||||||
@ -246,7 +250,7 @@ func (w *wsConnectItem) renderImage(renderImageData websocket_data.RenderImageRe
|
|||||||
//开启address
|
//开启address
|
||||||
if switchInfo.SwitchInfo.Address.IfShow && switchInfo.SwitchInfo.Address.UserDisabled {
|
if switchInfo.SwitchInfo.Address.IfShow && switchInfo.SwitchInfo.Address.UserDisabled {
|
||||||
if renderImageData.RenderData.Address == "" {
|
if renderImageData.RenderData.Address == "" {
|
||||||
combineReq.Address = &switchInfo.SwitchInfo.Address.DefaultValue
|
combineReq.Address = &switchInfo.SwitchInfo.Address.Text
|
||||||
} else {
|
} else {
|
||||||
combineReq.Address = &renderImageData.RenderData.Address
|
combineReq.Address = &renderImageData.RenderData.Address
|
||||||
}
|
}
|
||||||
@ -254,7 +258,7 @@ func (w *wsConnectItem) renderImage(renderImageData websocket_data.RenderImageRe
|
|||||||
//开启Phone
|
//开启Phone
|
||||||
if switchInfo.SwitchInfo.Phone.IfShow && switchInfo.SwitchInfo.Phone.UserDisabled {
|
if switchInfo.SwitchInfo.Phone.IfShow && switchInfo.SwitchInfo.Phone.UserDisabled {
|
||||||
if renderImageData.RenderData.Phone == "" {
|
if renderImageData.RenderData.Phone == "" {
|
||||||
combineReq.Phone = &switchInfo.SwitchInfo.Phone.DefaultValue
|
combineReq.Phone = &switchInfo.SwitchInfo.Phone.Text
|
||||||
} else {
|
} else {
|
||||||
combineReq.Phone = &renderImageData.RenderData.Phone
|
combineReq.Phone = &renderImageData.RenderData.Phone
|
||||||
}
|
}
|
||||||
|
@ -23,31 +23,26 @@ type QRcode struct {
|
|||||||
IfShow bool `json:"if_show"`
|
IfShow bool `json:"if_show"`
|
||||||
UserDisabled bool `json:"user_disabled"`
|
UserDisabled bool `json:"user_disabled"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
DefaultValue string `json:"default_value"`
|
|
||||||
}
|
}
|
||||||
type Website struct {
|
type Website struct {
|
||||||
IfShow bool `json:"if_show"`
|
IfShow bool `json:"if_show"`
|
||||||
UserDisabled bool `json:"user_disabled"`
|
UserDisabled bool `json:"user_disabled"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
DefaultValue string `json:"default_value"`
|
|
||||||
}
|
}
|
||||||
type Address struct {
|
type Address struct {
|
||||||
IfShow bool `json:"if_show"`
|
IfShow bool `json:"if_show"`
|
||||||
UserDisabled bool `json:"user_disabled"`
|
UserDisabled bool `json:"user_disabled"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
DefaultValue string `json:"default_value"`
|
|
||||||
}
|
}
|
||||||
type Slogan struct {
|
type Slogan struct {
|
||||||
IfShow bool `json:"if_show"`
|
IfShow bool `json:"if_show"`
|
||||||
UserDisabled bool `json:"user_disabled"`
|
UserDisabled bool `json:"user_disabled"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
DefaultValue string `json:"default_value"`
|
|
||||||
}
|
}
|
||||||
type Phone struct {
|
type Phone struct {
|
||||||
IfShow bool `json:"if_show"`
|
IfShow bool `json:"if_show"`
|
||||||
UserDisabled bool `json:"user_disabled"`
|
UserDisabled bool `json:"user_disabled"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
DefaultValue string `json:"default_value"`
|
|
||||||
}
|
}
|
||||||
type Logo struct {
|
type Logo struct {
|
||||||
Material string `json:"material"`
|
Material string `json:"material"`
|
||||||
@ -64,7 +59,7 @@ type MaterialItem struct {
|
|||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取模板开关信息(目前写死,以后后台做好了功能再更新变动)
|
// 获取模板开关信息
|
||||||
func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMaterialImg string) GetTemplateSwitchInfoRsp {
|
func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMaterialImg string) GetTemplateSwitchInfoRsp {
|
||||||
returnData := GetTemplateSwitchInfoRsp{
|
returnData := GetTemplateSwitchInfoRsp{
|
||||||
Id: templateId,
|
Id: templateId,
|
||||||
@ -72,23 +67,18 @@ func GetTemplateSwitchInfo(templateId int64, templateJsonStr *string, templateMa
|
|||||||
SwitchInfo: SwitchInfo{
|
SwitchInfo: SwitchInfo{
|
||||||
QRcode: QRcode{
|
QRcode: QRcode{
|
||||||
UserDisabled: true,
|
UserDisabled: true,
|
||||||
DefaultValue: "your qrcode",
|
|
||||||
},
|
},
|
||||||
Website: Website{
|
Website: Website{
|
||||||
UserDisabled: true,
|
UserDisabled: true,
|
||||||
DefaultValue: "your website",
|
|
||||||
},
|
},
|
||||||
Address: Address{
|
Address: Address{
|
||||||
UserDisabled: true,
|
UserDisabled: true,
|
||||||
DefaultValue: "your address",
|
|
||||||
},
|
},
|
||||||
Phone: Phone{
|
Phone: Phone{
|
||||||
UserDisabled: true,
|
UserDisabled: true,
|
||||||
DefaultValue: "your phone",
|
|
||||||
},
|
},
|
||||||
Slogan: Slogan{
|
Slogan: Slogan{
|
||||||
UserDisabled: true,
|
UserDisabled: true,
|
||||||
DefaultValue: "your slogan",
|
|
||||||
},
|
},
|
||||||
Logo: Logo{
|
Logo: Logo{
|
||||||
Material: "/image/logo/aHnT1_rzubdwax_scale.png",
|
Material: "/image/logo/aHnT1_rzubdwax_scale.png",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user