修复问题
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.T_User_Chat.Add(userChatSession);
|
||||||
Dao.daoDbMiaoYu.context.SaveChanges();
|
Dao.daoDbMiaoYu.context.SaveChanges();
|
||||||
}
|
}
|
||||||
var notRole = new List<string>();
|
var role = new List<string>();
|
||||||
notRole.Add(ChatRole.initialization.ToString());
|
role.Add(ChatRole.assistant.ToString());
|
||||||
notRole.Add(ChatRole.tips.ToString());
|
role.Add(ChatRole.user.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 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)
|
if (chatList == null)
|
||||||
{
|
{
|
||||||
chatList = new List<T_Chat>();
|
chatList = new List<T_Chat>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user