From 8141a2c55b51bb21cae197c2caef05b33b5a46b4 Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 17 Dec 2021 18:30:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=91=8A=E5=88=A0=E9=99=A4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.OA/Notice/NoticeService.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs index f387aaaab..9eb722b87 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs @@ -27,7 +27,7 @@ namespace Learun.Application.OA try { var strSql = new StringBuilder(); - strSql.Append("SELECT * FROM LR_OA_News t WHERE t.F_TypeId = 2 "); + strSql.Append("SELECT * FROM LR_OA_News t WHERE t.F_TypeId = 2 and F_DeleteMark=0 "); if (!string.IsNullOrEmpty(keyword)) { strSql.Append(" AND F_FullHead like @keyword"); @@ -87,7 +87,9 @@ namespace Learun.Application.OA var entity = db.FindEntity(x => x.F_NewsId == item); if (entity != null) { - db.Delete(entity); + entity.F_DeleteMark = 1; + db.Update(entity); + //db.Delete(entity); } } @@ -156,7 +158,7 @@ namespace Learun.Application.OA var strSql = new StringBuilder(); strSql.Append("SELECT t.*,r.RNewsId,r.RTime FROM LR_OA_News t "); strSql.Append(" left join LR_OA_NewsRead r on t.F_NewsId = r.NewsId and r.RUserId=@userId "); - strSql.Append(" WHERE t.F_TypeId = 2 "); + strSql.Append(" WHERE t.F_TypeId = 2 and t.F_DeleteMark=0 "); if (!string.IsNullOrEmpty(categoryId)) { strSql.Append($" AND F_CategoryId = '{categoryId}'");