From fae172ada6a8108c71d21e902740b2fe60d9a46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=C2=B7=C3=A6?= <279202647@qq.com> Date: Fri, 22 Oct 2021 18:54:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=93=81=E7=B1=BB=E8=AF=8D?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HuiYan/catsBusiness.cs | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/Coldairarrow.Business/HuiYan/catsBusiness.cs b/src/Coldairarrow.Business/HuiYan/catsBusiness.cs index 674bbb3..538ddd6 100644 --- a/src/Coldairarrow.Business/HuiYan/catsBusiness.cs +++ b/src/Coldairarrow.Business/HuiYan/catsBusiness.cs @@ -76,7 +76,10 @@ namespace Coldairarrow.Business.HuiYan CreatorId = "admin", Deleted = false, Name = model.OneCat.Text, - ParentId = null + ParentId = null, + LastShowJDTime = DateTime.MinValue, + LastShowPddTime = DateTime.MinValue, + LastShowTBTime = DateTime.MinValue }; int row = Db.Insert(oneCat); @@ -104,7 +107,10 @@ namespace Coldairarrow.Business.HuiYan CreatorId = "admin", Deleted = false, Name = model.TwoCat.Text, - ParentId = oneCat.Id + ParentId = oneCat.Id, + LastShowJDTime = DateTime.MinValue, + LastShowPddTime = DateTime.MinValue, + LastShowTBTime = DateTime.MinValue }; int row= Db.Insert(twoCat); @@ -132,7 +138,10 @@ namespace Coldairarrow.Business.HuiYan CreatorId = "admin", Deleted = false, Name = model.LastCat.Text, - ParentId = twoCat.Id + ParentId = twoCat.Id, + LastShowJDTime = DateTime.MinValue, + LastShowPddTime = DateTime.MinValue, + LastShowTBTime = DateTime.MinValue }; int row = Db.Insert(lastCat); @@ -151,7 +160,10 @@ namespace Coldairarrow.Business.HuiYan CreatorId = "admin", Deleted = false, Name = key, - ParentId = lastCat.Id + ParentId = lastCat.Id, + LastShowJDTime=DateTime.MinValue, + LastShowPddTime=DateTime.MinValue, + LastShowTBTime=DateTime.MinValue }); }); @@ -211,7 +223,7 @@ namespace Coldairarrow.Business.HuiYan public async Task> GetTreeDataListAsync() { - var where = LinqHelper.True().And(c => c.Type == 0 || c.TeamId== _operator.TeamId); + var where = LinqHelper.True().And(c => c.Type == 0 || c.TeamId == _operator.TeamId); var list = await GetIQueryable().Where(where).ToListAsync(); var treeList = list @@ -222,7 +234,7 @@ namespace Coldairarrow.Business.HuiYan Text = x.Name, Value = x.Id, Type = x.Type, - IsShowJDTime= x.LastShowJDTime==null?true:(DateTime.Now- x.LastShowJDTime.Value).TotalDays>3, + IsShowJDTime = x.LastShowJDTime == null ? true : (DateTime.Now - x.LastShowJDTime.Value).TotalDays > 3, IsShowPddTime = x.LastShowPddTime == null ? true : (DateTime.Now - x.LastShowPddTime.Value).TotalDays > 3, IsShowTBTime = x.LastShowTBTime == null ? true : (DateTime.Now - x.LastShowTBTime.Value).TotalDays > 3, }).ToList(); @@ -253,8 +265,11 @@ namespace Coldairarrow.Business.HuiYan //设置为团队库 Type = model.Type, //暂时没有登录信息 - TeamId = _operator.TeamId - + TeamId = _operator.TeamId, + LastShowJDTime = DateTime.MinValue, + LastShowPddTime = DateTime.MinValue, + LastShowTBTime = DateTime.MinValue + }; int row = Db.Insert(cat);