feat: local cache

This commit is contained in:
withchao
2024-01-16 15:13:49 +08:00
parent 1afdd0bcf7
commit 1c93f87e95
2 changed files with 6 additions and 71 deletions
+6
View File
@@ -204,7 +204,13 @@ func (m *msgServer) modifyMessageByUserMessageReceiveOpt(
return true, nil
}
// conversationID := utils.GetConversationIDBySessionType(conversationID, sessionType)
log.ZDebug(ctx, "GetSingleConversationRecvMsgOpt req", "userID", userID, "conversationID", conversationID)
singleOpt, err := m.Conversation.GetSingleConversationRecvMsgOpt(ctx, userID, conversationID) // todo local cache
if err == nil {
log.ZDebug(ctx, "GetSingleConversationRecvMsgOpt resp", "userID", userID, "conversationID", conversationID, "RecvMsgOpt", singleOpt)
} else {
log.ZError(ctx, "GetSingleConversationRecvMsgOpt resp", err, "userID", userID, "conversationID", conversationID, "RecvMsgOpt", singleOpt)
}
if errs.ErrRecordNotFound.Is(err) {
return true, nil
} else if err != nil {