Seamus Gu 4 月之前
父節點
當前提交
f88bb082c4

+ 34 - 34
.editorconfig

@@ -1,130 +1,130 @@
 
 [*.cs]
-#### 命名样式 ####
+#### 锟斤拷锟斤拷锟斤拷式 ####
 
-# 接口名必须以“I”开
+# 锟接匡拷锟斤拷锟斤拷锟斤拷锟皆★拷I锟斤拷锟斤拷
 
-# 命名规则
+# 锟斤拷锟斤拷锟斤拷锟斤拷
 dotnet_naming_rule.interface_should_be_begins_with_i.severity = error
 dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
 dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
 
-# 符号规范
+# 锟斤拷锟脚规范
 dotnet_naming_symbols.interface.applicable_kinds = interface
 dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
 dotnet_naming_symbols.interface.required_modifiers = 
 
-# 命名样
+# 锟斤拷锟斤拷锟斤拷
 dotnet_naming_style.begins_with_i.required_prefix = I
 dotnet_naming_style.begins_with_i.required_suffix = 
 dotnet_naming_style.begins_with_i.word_separator = 
 dotnet_naming_style.begins_with_i.capitalization = pascal_case
 
-# 接口名必须以“I”开
+# 锟接匡拷锟斤拷锟斤拷锟斤拷锟皆★拷I锟斤拷锟斤拷
 
 
-# 类名必须是大写字母开头,驼峰
+# 锟斤拷锟斤拷锟斤拷锟斤拷锟角达拷写锟斤拷母锟斤拷头锟斤拷锟秸凤拷
 
-# 命名规则
+# 锟斤拷锟斤拷锟斤拷锟斤拷
 dotnet_naming_rule.types_should_be_pascal_case.severity = error
 dotnet_naming_rule.types_should_be_pascal_case.symbols = types
 dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
 
-# 符号规范
+# 锟斤拷锟脚规范
 dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
 dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
 dotnet_naming_symbols.types.required_modifiers = 
 
-# 命名样
+# 锟斤拷锟斤拷锟斤拷
 dotnet_naming_style.pascal_case.required_prefix = 
 dotnet_naming_style.pascal_case.required_suffix = 
 dotnet_naming_style.pascal_case.word_separator = 
 dotnet_naming_style.pascal_case.capitalization = pascal_case
 
-# 类名必须是大写字母开头,驼峰
+# 锟斤拷锟斤拷锟斤拷锟斤拷锟角达拷写锟斤拷母锟斤拷头锟斤拷锟秸凤拷
 
 
-# 常量必须全部大
+# 锟斤拷锟斤拷锟斤拷锟斤拷全锟斤拷锟斤拷
 
-# 命名规则
+# 锟斤拷锟斤拷锟斤拷锟斤拷
 dotnet_naming_rule.const_should_be_all_upper.severity = error
 dotnet_naming_rule.const_should_be_all_upper.symbols = const
 dotnet_naming_rule.const_should_be_all_upper.style = all_upper
 
-# 符号规范
+# 锟斤拷锟脚规范
 dotnet_naming_symbols.const.applicable_kinds = field
 dotnet_naming_symbols.const.applicable_accessibilities = *
 dotnet_naming_symbols.const.required_modifiers = const
 
-# 命名样
+# 锟斤拷锟斤拷锟斤拷
 dotnet_naming_style.all_upper.required_prefix = 
 dotnet_naming_style.all_upper.required_suffix = 
 dotnet_naming_style.all_upper.word_separator = _
 dotnet_naming_style.all_upper.capitalization = all_upper
 
-# 常量必须全部大
+# 锟斤拷锟斤拷锟斤拷锟斤拷全锟斤拷锟斤拷
 
-# 私有字段必须使用“_”开
+# 私锟斤拷锟街段憋拷锟斤拷使锟矫★拷_锟斤拷锟斤拷
 
-# 命名规则
+# 锟斤拷锟斤拷锟斤拷锟斤拷
 dotnet_naming_rule.private_or_internal_field_should_be_private_field.severity = error
 dotnet_naming_rule.private_or_internal_field_should_be_private_field.symbols = private_or_internal_field
 dotnet_naming_rule.private_or_internal_field_should_be_private_field.style = private_field
 
-# 符号规范
+# 锟斤拷锟脚规范
 dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
 dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
 dotnet_naming_symbols.private_or_internal_field.required_modifiers = 
 
-# 命名样
+# 锟斤拷锟斤拷锟斤拷
 dotnet_naming_style.private_field.required_prefix = _
 dotnet_naming_style.private_field.required_suffix = 
 dotnet_naming_style.private_field.word_separator = 
 dotnet_naming_style.private_field.capitalization = camel_case
 
-# 私有字段必须使用“_”开
+# 私锟斤拷锟街段憋拷锟斤拷使锟矫★拷_锟斤拷锟斤拷
 
 
-# 静态只读字段必须使用“_”开
+# 锟斤拷态只锟斤拷锟街段憋拷锟斤拷使锟矫★拷_锟斤拷锟斤拷
 
-# 命名规则
+# 锟斤拷锟斤拷锟斤拷锟斤拷
 dotnet_naming_rule.static_readonly_field_should_be_all_upper.severity = error
 dotnet_naming_rule.static_readonly_field_should_be_all_upper.symbols = static_readonly_field
 dotnet_naming_rule.static_readonly_field_should_be_all_upper.style = private_field
 
-# 符号规范
+# 锟斤拷锟脚规范
 dotnet_naming_symbols.static_readonly_field.applicable_kinds = field
 dotnet_naming_symbols.static_readonly_field.applicable_accessibilities = internal, private, protected, protected_internal, private_protected
 dotnet_naming_symbols.static_readonly_field.required_modifiers = readonly, static
 
-# 命名样
+# 锟斤拷锟斤拷锟斤拷
 dotnet_naming_style.readonly_static_field.required_prefix = _
 dotnet_naming_style.readonly_static_field.required_suffix = 
 dotnet_naming_style.readonly_static_field.word_separator = 
 dotnet_naming_style.readonly_static_field.capitalization = camel_case
 
-# 静态只读字段必须使用“_”开
+# 锟斤拷态只锟斤拷锟街段憋拷锟斤拷使锟矫★拷_锟斤拷锟斤拷
 
 
-# 属性、事件、方法、委托必须是大写字母开头,驼峰,可以用“_”隔开
+# 锟斤拷锟皆★拷锟铰硷拷锟斤拷锟斤拷锟斤拷锟斤拷委锟叫憋拷锟斤拷锟角达拷写锟斤拷母锟斤拷头锟斤拷锟秸峰,锟斤拷锟斤拷锟矫★拷_锟斤拷锟斤拷锟斤拷
 
-# 命名规则
+# 锟斤拷锟斤拷锟斤拷锟斤拷
 dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = error
 dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
 dotnet_naming_rule.non_field_members_should_be_pascal_case.style = non_field_members_style
 
-# 符号规范
+# 锟斤拷锟脚规范
 dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method, delegate
 dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
 dotnet_naming_symbols.non_field_members.required_modifiers = 
 
-# 命名样
+# 锟斤拷锟斤拷锟斤拷
 dotnet_naming_style.non_field_members_style.required_prefix = 
 dotnet_naming_style.non_field_members_style.required_suffix = 
 dotnet_naming_style.non_field_members_style.word_separator = _
 dotnet_naming_style.non_field_members_style.capitalization = pascal_case
 
-# 属性、事件、方法、委托必须是大写字母开头,驼峰,可以用“_”隔开
+# 锟斤拷锟皆★拷锟铰硷拷锟斤拷锟斤拷锟斤拷锟斤拷委锟叫憋拷锟斤拷锟角达拷写锟斤拷母锟斤拷头锟斤拷锟秸峰,锟斤拷锟斤拷锟矫★拷_锟斤拷锟斤拷锟斤拷
 
 
 csharp_using_directive_placement = outside_namespace:silent
@@ -178,10 +178,10 @@ dotnet_style_qualification_for_property = false:silent
 dotnet_style_qualification_for_method = false:silent
 dotnet_style_qualification_for_event = false:silent
 
-dotnet_diagnostic.IDE0051.severity = error
-dotnet_diagnostic.IDE0052.severity = info
+dotnet_diagnostic.IDE0051.severity = suggestion
+dotnet_diagnostic.IDE0052.severity = suggestion
 dotnet_diagnostic.IDE1006.severity = error
-dotnet_diagnostic.CS0219.severity = error
+dotnet_diagnostic.CS0219.severity = warning
 dotnet_diagnostic.CS1998.severity = error
 
 file_header_template = <author></author>\n<date></date>\n<description></description>

+ 1 - 1
ERP.Core/Controller/AuthController.cs

@@ -25,7 +25,7 @@ namespace ERP.Core.Controller
 
         [HttpPost("/login")]
         //[SwaggerOperation(Description = "登录接口", Summary = "Login")]
-        public async Task<IActionResult> LoginAsync([FromBody] LoginBody form)
+        public IActionResult LoginAsync([FromBody] LoginBody form)
         {
             var securityConfig = _configuration.GetSection(FrameworkConstant.SecurityConfig).Get<SecurityConfig>() ?? new SecurityConfig();
 

+ 1 - 1
ERP.Core/Enum/MenuTypeEnum.cs

@@ -5,7 +5,7 @@
 using System.ComponentModel;
 
 namespace ERP.Core.Enum
-{目录
+{
     public enum MenuTypeEnum
     {
         /// <summary>

+ 1 - 1
ERP.Core/Service/AuthService.cs

@@ -53,7 +53,7 @@ namespace ERP.Core.Service
             CheckLogin(securityConfig, password, user);
 
             var roleList = _sysRoleRepository.SelectRoleListByUserId(user.Id);
-            var roleKeyList = roleList.Select(t => t.RoleKey);
+            var roleKeyList = roleList.Select(t => t.RoleKey).ToList();
             var permissions = new List<string>();
 
             if (roleList.Any(t => t.RoleKey == FrameworkConstant.Admin))

+ 2 - 30
ERP.Core/Service/SysUserService.cs

@@ -9,39 +9,11 @@ namespace ERP.Core.Service
 {
     public class SysUserService
     {
-        private SysUserRepository SysUserRepository;
+        private SysUserRepository _sysUserRepository;
 
         public SysUserService(SysUserRepository SysUserRepository)
         {
-            this.SysUserRepository = SysUserRepository;
-        }
-
-        public async Task<LoginUser> GetUserInfo(string loginName)
-        {
-            var user = SysUserRepository.FirstOrDefault(t => t.UserName == loginName);
-
-            //if (user == null)
-            //{
-            //    throw new Exception(string.Format(_localizer["User.NotExist"], loginName)));
-            //}
-
-            //CheckUserStatus(user);
-
-            //var roleList = SysRoleRepository.SelectRoleListByUserId(user.Id);
-            //var roleKeyList = roleList.Select(t => t.RoleKey).ToList();
-            //var permissions = new List<string>();
-
-            //if (roleList.Any(t => t.RoleKey == FrameworkConstant.Admin))
-            //{
-            //    permissions.Add(FrameworkConstant.AdminPermission);
-            //}
-            //else
-            //{
-            //    var roleIds = roleList.Select(t => t.Id).ToList();
-            //    permissions = SysMenuRepository.SelectPermissionsByRoleIds(roleIds);
-            //}
-
-            return new LoginUser();
+            this._sysUserRepository = SysUserRepository;
         }
 
         private void CheckUserStatus(SysUser user)