public object GetNoReadMessageCount() { CheckUserLogin(); long sbid = CurrentUser.ShopBranchId; int count = AppMessageApplication.GetBranchNoReadMessageCount(sbid); return(new { success = true, count = count }); }
/// <summary> /// 获取可管理门店列表 /// </summary> /// <returns></returns> public object GetManagerShops() { var branchs = ShopBranchApplication.GetSellerManager(CurrentUser.ShopId); var unReads = AppMessageApplication.GetBranchNoReadMessageCount(branchs.Select(p => p.Id).ToList()); var data = branchs.Select(p => new { id = p.Id, branchName = p.ShopBranchName, unRead = unReads.ContainsKey(p.Id) ? unReads[p.Id] : 0 }); return(new { success = true, data }); }