From 2161234501be944896f2ceca983252e4e574bf96 Mon Sep 17 00:00:00 2001 From: zpc Date: Wed, 4 Sep 2024 00:18:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs b/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs index 48b198a..b8a0375 100644 --- a/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs +++ b/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs @@ -52,7 +52,7 @@ public class ChatBLL : MiaoYuBase list.Add(chat); return new BaseResponse>(ResonseCode.Success, "", list); } - var userChatSession = await Dao.daoDbMiaoYu.context.T_User_Chat.Where(it => it.CharacterId == characterId && it.UserId == _UserId && !it.IsDelete && it.TotalCount > 0).FirstOrDefaultAsync(); + var userChatSession = await Dao.daoDbMiaoYu.context.T_User_Chat.Where(it => it.CharacterId == characterId && it.UserId == _UserId && !it.IsDelete).FirstOrDefaultAsync(); if (userChatSession == null) { userChatSession = new T_User_Chat() @@ -543,7 +543,7 @@ public class ChatBLL : MiaoYuBase /// public async Task>> GetChatHistoryList() { - var userChatSessions = await Dao.daoDbMiaoYu.context.T_User_Chat.Where(it => it.UserId == _UserId && !it.IsDelete).ToListAsync(); + var userChatSessions = await Dao.daoDbMiaoYu.context.T_User_Chat.Where(it => it.UserId == _UserId && !it.IsDelete && it.TotalCount > 0).ToListAsync(); List chatHistoryInfos = new List(); var charactersIds = MiaoYuCache.CharacterList.ToList(); var memoryCard = Dao.daoDbMiaoYu.context.T_User_MemoryCard.AsNoTracking().Where(it => it.UserId == _UserId && it.RemainingCount > 0 && it.CharacterId > 0).Select(it => it.CharacterId).ToList();