set IsMsgDestruct

This commit is contained in:
wangchuxiao
2023-07-10 11:58:04 +08:00
parent ece2498d18
commit c02f3cc8d5
6 changed files with 454 additions and 426 deletions
+1 -1
View File
@@ -93,5 +93,5 @@ func (c *ConversationGorm) GetConversationsByConversationID(ctx context.Context,
}
func (c *ConversationGorm) GetConversationIDsNeedDestruct(ctx context.Context) (conversations []*relation.ConversationModel, err error) {
return conversations, utils.Wrap(c.db(ctx).Where("UNIX_TIMESTAMP(NOW()) > (msg_destruct_time + UNIX_TIMESTAMP(latest_msg_destruct_time)) && msg_destruct_time != 0").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").Error, "")
}