From 21f90f3dd11a4fce7aa440e0dc68c726ba11c908 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Mon, 11 Sep 2023 15:18:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E5=90=88=E5=9B=BE,=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/resource/internal/logic/logocombinelogic.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/resource/internal/logic/logocombinelogic.go b/server/resource/internal/logic/logocombinelogic.go index 8cfbef28..3aa07fac 100644 --- a/server/resource/internal/logic/logocombinelogic.go +++ b/server/resource/internal/logic/logocombinelogic.go @@ -61,7 +61,7 @@ func (l *LogoCombineLogic) LogoCombine(req *types.LogoCombineReq, userinfo *auth userId = userinfo.UserId } // 获取默认 - if req.Address == "" || req.Phone == "" || req.Website == "" || req.Qrcode == "" { + if req.Address == "" || req.Phone == "" || req.Website == "" || req.Qrcode == "" || req.Slogan == "" { // 没有查到,先根据模版id 查询模版数据 请求算法数据 productTemplateV2Model := gmodel.NewFsProductTemplateV2Model(l.svcCtx.MysqlConn) productTemplateV2Info, err := productTemplateV2Model.FindOne(l.ctx, req.TemplateId) @@ -87,6 +87,9 @@ func (l *LogoCombineLogic) LogoCombine(req *types.LogoCombineReq, userinfo *auth if req.Qrcode == "" && templateSwitchInfo.MaterialData.QRcode.IfShow { req.Qrcode = templateSwitchInfo.MaterialData.QRcode.DefaultValue } + if req.Slogan == "" && templateSwitchInfo.MaterialData.Slogan.IfShow { + req.Slogan = templateSwitchInfo.MaterialData.Slogan.DefaultValue + } } res, err := l.svcCtx.Repositories.ImageHandle.LogoCombine(l.ctx, &repositories.LogoCombineReq{ From 90c95fce5192c3ebf1015e3c936cb79978fe50c3 Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Mon, 11 Sep 2023 15:30:14 +0800 Subject: [PATCH 2/2] fix --- utils/fssql/metadata.go | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/fssql/metadata.go b/utils/fssql/metadata.go index 143354c0..5e671a81 100644 --- a/utils/fssql/metadata.go +++ b/utils/fssql/metadata.go @@ -115,7 +115,6 @@ func MetadataResourcePATCH(tx *gorm.DB, rid string, updateMetadata any, values . WHEN metadata IS NULL THEN ? ELSE JSON_MERGE_PATCH(metadata, ?) END - cond, ok := values[0].(string) WHERE resource_id = '%s'` + " and " + cond + `;` }