fix: group update issues
This commit is contained in:
@@ -155,7 +155,7 @@ func (c *DBChannel) SaveMessage(ctx context.Context, msg *ChannelMessage) error
|
||||
|
||||
// 如果找到记录,那么更新记录
|
||||
stmt := tbl.UPDATE().SET(
|
||||
tbl.Content.SET(RawString(`CONCAT(content, #var)`, RawArgs{
|
||||
tbl.Content.SET(RawString(`CONCAT(content, #var::varchar)`, RawArgs{
|
||||
"#var": *message.Content,
|
||||
})),
|
||||
tbl.Media.SET(RawString(`media || #var::jsonb`, RawArgs{
|
||||
@@ -167,7 +167,8 @@ func (c *DBChannel) SaveMessage(ctx context.Context, msg *ChannelMessage) error
|
||||
),
|
||||
)
|
||||
|
||||
_, err = db.ExecContext(ctx, stmt.DebugSql())
|
||||
_, err = stmt.ExecContext(ctx, db)
|
||||
// _, err = db.ExecContext(ctx, stmt.DebugSql())
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user