소스 검색

😁调整更新表达式方法使审计字段生效

zuohuaijun 2 년 전
부모
커밋
d597b3062f

+ 4 - 4
Admin.NET/Admin.NET.Core/Extension/ConsoleLogoSetup.cs

@@ -18,11 +18,11 @@ public static class ConsoleLogoSetup
     {
         Console.ForegroundColor = ConsoleColor.Blue;
         Console.WriteLine(@"
-              _           _         _   _ ______ _______ 
+              _           _         _   _ ______ _______
      /\      | |         (_)       | \ | |  ____|__   __|
-    /  \   __| |_ __ ___  _ _ __   |  \| | |__     | |   
-   / /\ \ / _` | '_ ` _ \| | '_ \  | . ` |  __|    | |   
-  / ____ \ (_| | | | | | | | | | |_| |\  | |____   | |   
+    /  \   __| |_ __ ___  _ _ __   |  \| | |__     | |
+   / /\ \ / _` | '_ ` _ \| | '_ \  | . ` |  __|    | |
+  / ____ \ (_| | | | | | | | | | |_| |\  | |____   | |
  /_/    \_\__,_|_| |_| |_|_|_| |_(_)_| \_|______|  |_| ");
         Console.ForegroundColor = ConsoleColor.Red;
         Console.WriteLine(@"源码地址: https://gitee.com/zuohuaijun/Admin.NET");

+ 2 - 2
Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs

@@ -300,7 +300,7 @@ public class SysFileService : IDynamicApiController, ITransient
         }
 
         var res = await UploadFile(file, "Upload/Avatar");
-        await sysUserRep.UpdateAsync(u => new SysUser() { Avatar = $"{res.FilePath}/{res.Name}" }, u => u.Id == user.Id);
+        await sysUserRep.UpdateSetColumnsTrueAsync(u => new SysUser() { Avatar = $"{res.FilePath}/{res.Name}" }, u => u.Id == user.Id);
         return res;
     }
 
@@ -322,7 +322,7 @@ public class SysFileService : IDynamicApiController, ITransient
         }
 
         var res = await UploadFile(file, "Upload/Signature");
-        await sysUserRep.UpdateAsync(u => new SysUser() { Signature = $"{res.FilePath}/{res.Name}" }, u => u.Id == user.Id);
+        await sysUserRep.UpdateSetColumnsTrueAsync(u => new SysUser() { Signature = $"{res.FilePath}/{res.Name}" }, u => u.Id == user.Id);
         return res;
     }
 }

+ 2 - 2
Admin.NET/Admin.NET.Core/Service/Notice/SysNoticeService.cs

@@ -104,7 +104,7 @@ public class SysNoticeService : IDynamicApiController, ITransient
     public async Task Public(NoticeInput input)
     {
         // 更新发布状态和时间
-        await _sysNoticeRep.UpdateAsync(u => new SysNotice() { Status = NoticeStatusEnum.PUBLIC, PublicTime = DateTime.Now }, u => u.Id == input.Id);
+        await _sysNoticeRep.UpdateSetColumnsTrueAsync(u => new SysNotice() { Status = NoticeStatusEnum.PUBLIC, PublicTime = DateTime.Now }, u => u.Id == input.Id);
 
         var notice = await _sysNoticeRep.GetFirstAsync(u => u.Id == input.Id);
 
@@ -131,7 +131,7 @@ public class SysNoticeService : IDynamicApiController, ITransient
     [DisplayName("设置通知公告已读状态")]
     public async Task SetRead(NoticeInput input)
     {
-        await _sysNoticeUserRep.UpdateAsync(u => new SysNoticeUser
+        await _sysNoticeUserRep.UpdateSetColumnsTrueAsync(u => new SysNoticeUser
         {
             ReadStatus = NoticeUserStatusEnum.READ,
             ReadTime = DateTime.Now

+ 1 - 1
Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs

@@ -217,7 +217,7 @@ public class SysTenantService : IDynamicApiController, ITransient
         await _userRoleRep.InsertAsync(newUserRole);
 
         // 关联租户组织机构和管理员用户
-        await _sysTenantRep.UpdateAsync(u => new SysTenant() { UserId = newUser.Id, OrgId = newOrg.Id }, u => u.Id == tenantId);
+        await _sysTenantRep.UpdateSetColumnsTrueAsync(u => new SysTenant() { UserId = newUser.Id, OrgId = newOrg.Id }, u => u.Id == tenantId);
 
         // 默认租户管理员角色菜单集合
         var menuIdList = new List<long> { 1300000000111,1300000000121, // 工作台

+ 6 - 6
Admin.NET/Plugins/Admin.NET.Plugin.Elsa/Elsa.json

@@ -1,10 +1,10 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "Elsa": {
-        "Server": {
-            "BaseUrl": "http://localhost:5001",
-            "BasePath": "/workflows"
-        }
+  "Elsa": {
+    "Server": {
+      "BaseUrl": "http://localhost:5001",
+      "BasePath": "/workflows"
     }
+  }
 }

+ 10 - 10
Admin.NET/Plugins/Admin.NET.Plugin.GoView/GoView.json

@@ -1,14 +1,14 @@
 {
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
+  "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
 
-    "[openapi:GoView]": {
-        "Group": "GoView",
-        "Title": "GoView",
-        "Description": "GoView 是一个高效的拖拽式低代码数据可视化开发平台,将图表或页面元素封装为基础组件,无需编写代码即可制作数据大屏,减少心智负担。<br/><a href='https://www.mtruning.club/'>https://www.mtruning.club</a>",
-        "Version": "1.2.6",
-        "License": {
-            "Name": "MIT",
-            "Url": "https://gitee.com/dromara/go-view/blob/master/LICENSE"
-        }
+  "[openapi:GoView]": {
+    "Group": "GoView",
+    "Title": "GoView",
+    "Description": "GoView 是一个高效的拖拽式低代码数据可视化开发平台,将图表或页面元素封装为基础组件,无需编写代码即可制作数据大屏,减少心智负担。<br/><a href='https://www.mtruning.club/'>https://www.mtruning.club</a>",
+    "Version": "1.2.6",
+    "License": {
+      "Name": "MIT",
+      "Url": "https://gitee.com/dromara/go-view/blob/master/LICENSE"
     }
+  }
 }