public long GetTotalUnreadMessage(Guid merchantAccountId) { var count = MessagesComponent.GetMessagesCountByStatus(merchantAccountId, UserType.Merchant, MessageStatus.Normal); var sysCount = new ArticleDAC().GetUnreadCount(ArticleAccountType.FiiiPos, merchantAccountId); return(count + sysCount); }
public GetFirstTitleAndNotReadCountOM GetFirstTitleAndNotReadCount(ArticleAccountType articleAccountType, Guid AccountId, bool isZH) { var tuple = new ArticleDAC().GetFirstTitleAndNotReadCount(articleAccountType, AccountId); var model = tuple.Item1; return(new GetFirstTitleAndNotReadCountOM { SysCount = tuple.Item2, Title = model == null ? null : model.Type == SystemMessageESType.Article ? model.Title : Resources.ResourceManager.GetString(VerifyTypeList[int.Parse(model.Attach)], new System.Globalization.CultureInfo(isZH ? "zh" : "en")), Timestamp = model?.CreateTime.ToUnixTime().ToString(), Count = MessagesComponent.GetMessagesCountByStatus(AccountId, UserType.User, MessageStatus.Normal) }); }