mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-19 12:47:06 +08:00
fix bug: msg destruct sql
This commit is contained in:
parent
1e1d871461
commit
541f8f1a64
@ -207,7 +207,7 @@ func (c *ConversationGorm) GetConversationIDsNeedDestruct(
|
||||
) (conversations []*relation.ConversationModel, err error) {
|
||||
return conversations, utils.Wrap(
|
||||
c.db(ctx).
|
||||
Where("is_msg_destruct = 1 && UNIX_TIMESTAMP(NOW()) > (msg_destruct_time + UNIX_TIMESTAMP(latest_msg_destruct_time)) && msg_destruct_time != 0").
|
||||
Where("is_msg_destruct = 1 && msg_destruct_time != 0 && (UNIX_TIMESTAMP(NOW()) > (msg_destruct_time + UNIX_TIMESTAMP(latest_msg_destruct_time)) || latest_msg_destruct_time is NULL)").
|
||||
Find(&conversations).
|
||||
Error,
|
||||
"",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user