Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
This commit is contained in:
@@ -1809,6 +1809,8 @@ namespace BeWo.Data.Access
|
||||
|
||||
.SetProjection(Projections.Property("ChatMessageOid"))));
|
||||
|
||||
var query = ToSql(c);
|
||||
|
||||
return c.List<ChatMessage>();
|
||||
}
|
||||
|
||||
@@ -1838,7 +1840,7 @@ namespace BeWo.Data.Access
|
||||
return liste.Select(s => s.MessageId);
|
||||
}
|
||||
|
||||
public IEnumerable<ChatMessage> LoadChatMessagesChunkwise(string pMessageId, long pRecipientOid, long pSenderOid, bool pForTeam, List<string> pExceptions)
|
||||
public IEnumerable<ChatMessage> LoadChatMessagesChunkwise(string pMessageId, long pRecipientOid, long pSenderOid, bool pForTeam, List<string> pExceptions, bool pIsInitialCall)
|
||||
{
|
||||
var c = CreateCriteriaIsActive<ChatMessage>()
|
||||
.Add(Restrictions.Or(
|
||||
@@ -1866,19 +1868,25 @@ namespace BeWo.Data.Access
|
||||
var list = c1.List<ChatMessage>();
|
||||
if (list.Count > 0)
|
||||
{
|
||||
var lastLoadedChatMessage = c1.List<ChatMessage>().First(); // Was ist bei einer leeren Liste?
|
||||
var lastLoadedChatMessage = c1.List<ChatMessage>().First();
|
||||
|
||||
c.Add(Restrictions.Not(Restrictions.In(ChatMessage.PropertyName_MessageId, pExceptions)));
|
||||
c.Add(Restrictions.Lt(BeWoEntityBase.PropertyName_InsTs, lastLoadedChatMessage.InsTs));
|
||||
|
||||
if (pIsInitialCall)
|
||||
{
|
||||
c.Add(Restrictions.Gt(BeWoEntityBase.PropertyName_InsTs, lastLoadedChatMessage.InsTs));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
c.AddOrder(Order.Desc(BeWoEntityBase.PropertyName_InsTs));
|
||||
c.SetMaxResults(50);
|
||||
|
||||
var sql = ToSql(c);
|
||||
var sqlQeury = ToSql(c);
|
||||
|
||||
return c.List<ChatMessage>();
|
||||
var result = c.List<ChatMessage>();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public IList<ChatMediaMessage> GetChatMediaMessagesForChatMessage(long chatMessageOid)
|
||||
@@ -1907,7 +1915,7 @@ namespace BeWo.Data.Access
|
||||
if (pIsTeam)
|
||||
{
|
||||
c.Add(Restrictions.And(Restrictions.Eq(NewestChatMessage.PropertyName_IsTeam, true),
|
||||
Restrictions.In(NewestChatMessage.PropertyName_RecipientPersonOid, teams.ToArray())));
|
||||
Restrictions.Eq(NewestChatMessage.PropertyName_RecipientPersonOid, pRecipientPersonOid)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user