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{ 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 + `;` }