From eb72ad7c5ec8f4f0cd8b291d16534a10e9eb113c Mon Sep 17 00:00:00 2001
From: Zhang-Hong-Lin <a3219986988@163.com>
Date: 星期一, 10 三月 2025 14:50:01 +0800
Subject: [PATCH] 后端

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_errormsginfoService.cs |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_errormsginfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_errormsginfoService.cs"
index b654cb7..2264c38 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_errormsginfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_errormsginfoService.cs"
@@ -4,6 +4,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseRepository;
 using WIDESEAWCS_Core.BaseServices;
 using WIDESEAWCS_ISystemServices;
@@ -11,16 +12,35 @@
 
 namespace WIDESEAWCS_SystemServices
 {
-    public class dt_errormsginfoService : ServiceBase<dt_errorInfo, IRepository<dt_errorInfo>>, Idt_ErrormsginfoService
+    public class dt_errormsginfoService : ServiceBase<dt_errormsgInfo, IRepository<dt_errormsgInfo>>, Idt_ErrormsginfoService
     {
         private readonly IMapper _mapper;
         /// <summary>
         /// 浠撳偍灞�(鏁版嵁搴撹闂�)
         /// </summary>
-        public IRepository<dt_errorInfo> Repository => BaseDal;
-        public dt_errormsginfoService(IRepository<dt_errorInfo> BaseDal, IMapper mapper) : base(BaseDal)
+        public IRepository<dt_errormsgInfo> Repository => BaseDal;
+        public dt_errormsginfoService(IRepository<dt_errormsgInfo> BaseDal, IMapper mapper) : base(BaseDal)
         {
             _mapper = mapper;
         }
+
+        /// <summary>
+        /// 鏇存柊鍝嶅簲鐨勯敊璇俊鎭埌鏁版嵁搴擄紝鍓嶇鐣岄潰鏄剧ず
+        /// </summary>
+        /// <param name="message"></param>
+        /// <returns></returns>
+        public WebResponseContent UpdateErrorMsg(string message,int id)
+        {
+            WebResponseContent webResponse = new WebResponseContent();
+            var error = BaseDal.QueryFirst(v=>v.Id==id);
+            DateTime dTime = (DateTime)error.ModifyDate;
+            if (!error.mesg.Equals(message) && (DateTime.Now - dTime).TotalSeconds > 10) 
+            {
+                error.errormsg = message;
+                error.ModifyDate = DateTime.Now;
+                BaseDal.UpdateData(error);
+            }
+            return webResponse.OK();
+        }
     }
 }

--
Gitblit v1.9.3