修复问题
This commit is contained in:
parent
19f8ff16ca
commit
056b3144c5
|
|
@ -196,10 +196,11 @@ namespace HuanMeng.MiaoYu.Code.Chat
|
|||
Dao.daoDbMiaoYu.context.T_User_Chat.Add(userChatSession);
|
||||
Dao.daoDbMiaoYu.context.SaveChanges();
|
||||
}
|
||||
var notRole = new List<string>();
|
||||
notRole.Add(ChatRole.initialization.ToString());
|
||||
notRole.Add(ChatRole.tips.ToString());
|
||||
var chatList = await Dao.daoDbMiaoYu.context.T_Chat.Where(it => it.SessionId == userChatSession.SessionId && it.UserId == _UserId && it.Type == (int)ChatType.正常 && !notRole.Contains(it.Role)).OrderBy(it => it.SendMessageDay).ToListAsync();
|
||||
var role = new List<string>();
|
||||
role.Add(ChatRole.assistant.ToString());
|
||||
role.Add(ChatRole.user.ToString());
|
||||
|
||||
var chatList = await Dao.daoDbMiaoYu.context.T_Chat.Where(it => it.SessionId == userChatSession.SessionId && it.UserId == _UserId && role.Contains(it.Role)).OrderBy(it => it.SendMessageDay).ToListAsync();
|
||||
if (chatList == null)
|
||||
{
|
||||
chatList = new List<T_Chat>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user