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();