Seamus 8 months ago
parent
commit
1594d6deb5

+ 0 - 10
ERP.Application/appsettings.Development.json

@@ -6,15 +6,5 @@
     "Host": "localhost",
     "Port": "6379",
     "Password": "PSSRND20190710"
-  },
-  "Security": {
-    "WhiteList": [
-      "/swagger/*",
-      "/auth/login",
-      "/auth/logout"
-    ]
-  },
-  "Log": {
-    "LogType": 0
   }
 }

+ 9 - 6
ERP.Application/appsettings.json

@@ -1,9 +1,12 @@
 {
-  "Logging": {
-    "LogLevel": {
-      "Default": "Information",
-      "Microsoft.AspNetCore": "Warning"
-    }
+  "Security": {
+    "WhiteList": [
+      "/swagger/*",
+      "/auth/login/",
+      "/auth/logout/"
+    ]
   },
-  "AllowedHosts": "*"
+  "Log": {
+    "LogType": 0
+  }
 }

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

@@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Mvc;
 using Microsoft.Extensions.Configuration;
 using Swashbuckle.AspNetCore.Annotations;
 
-namespace ERP.Core.Controller
+namespace ERP.Core.Controllers
 {
 
     [Route("auth")]

+ 1 - 1
ERP.Core/Controller/SysMenuController.cs → ERP.Core/Controllers/SysMenuController.cs

@@ -8,7 +8,7 @@ using ERP.Framework.WebApi;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.Extensions.Configuration;
 
-namespace ERP.Core.Controller
+namespace ERP.Core.Controllers
 {
     [Route("system/menu")]
     public class SysMenuController : BaseController

+ 2 - 2
ERP.Core/Controller/SysUserController.cs → ERP.Core/Controllers/SysUserController.cs

@@ -1,10 +1,10 @@
-using ERP.Core.Service;
+using ERP.Core.Services;
 using ERP.Framework.Security;
 using ERP.Framework.WebApi;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.Extensions.Configuration;
 
-namespace ERP.Core.Controller
+namespace ERP.Core.Controllers
 {
     [Route("system/user")]
     public class SysUserController : BaseController

+ 1 - 1
ERP.Core/CoreDbContext.cs

@@ -1,4 +1,4 @@
-using ERP.Core.Entity;
+using ERP.Core.Entities;
 using ERP.Framework.WebApi;
 using Microsoft.EntityFrameworkCore;
 using Microsoft.Extensions.Configuration;

+ 2 - 2
ERP.Core/Entity/SysMenu.cs → ERP.Core/Entities/SysMenu.cs

@@ -1,9 +1,9 @@
-using ERP.Core.Enum;
+using ERP.Core.Enums;
 using ERP.Framework.Enum;
 using ERP.Framework.WebApi;
 using System.ComponentModel.DataAnnotations.Schema;
 
-namespace ERP.Core.Entity
+namespace ERP.Core.Entities
 {
     [Table("sys_menu")]
     public class SysMenu : TreeEntity<SysMenu>

+ 1 - 1
ERP.Core/Entity/SysRole.cs → ERP.Core/Entities/SysRole.cs

@@ -2,7 +2,7 @@
 using ERP.Framework.WebApi;
 using System.ComponentModel.DataAnnotations.Schema;
 
-namespace ERP.Core.Entity
+namespace ERP.Core.Entities
 {
     [Table("sys_role")]
     public class SysRole : BaseEntity

+ 1 - 1
ERP.Core/Entity/SysRoleMenu.cs → ERP.Core/Entities/SysRoleMenu.cs

@@ -1,6 +1,6 @@
 using System.ComponentModel.DataAnnotations.Schema;
 
-namespace ERP.Core.Entity
+namespace ERP.Core.Entities
 {
     [Table("sys_role_menu")]
     public class SysRoleMenu

+ 2 - 2
ERP.Core/Entity/SysUser.cs → ERP.Core/Entities/SysUser.cs

@@ -1,9 +1,9 @@
-using ERP.Core.Enum;
+using ERP.Core.Enums;
 using ERP.Framework.Enum;
 using ERP.Framework.WebApi;
 using System.ComponentModel.DataAnnotations.Schema;
 
-namespace ERP.Core.Entity
+namespace ERP.Core.Entities
 {
     [Table("sys_user")]
     public class SysUser : BaseEntity

+ 1 - 1
ERP.Core/Entity/SysUserRole.cs → ERP.Core/Entities/SysUserRole.cs

@@ -1,6 +1,6 @@
 using System.ComponentModel.DataAnnotations.Schema;
 
-namespace ERP.Core.Entity
+namespace ERP.Core.Entities
 {
     [Table("sys_user_role")]
     public class SysUserRole

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

@@ -4,7 +4,7 @@
 
 using System.ComponentModel;
 
-namespace ERP.Core.Enum
+namespace ERP.Core.Enums
 {
     public enum MenuTypeEnum
     {

+ 1 - 1
ERP.Core/Enum/SexEnum.cs → ERP.Core/Enums/SexEnum.cs

@@ -1,6 +1,6 @@
 using System.ComponentModel;
 
-namespace ERP.Core.Enum
+namespace ERP.Core.Enums
 {
     public enum SexEnum
     {

+ 1 - 1
ERP.Core/Interface/ISysMenuService.cs

@@ -3,7 +3,7 @@
 // <description></description>
 
 using ERP.Core.Dto;
-using ERP.Core.Entity;
+using ERP.Core.Entities;
 
 namespace ERP.Core.Interface
 {

+ 2 - 2
ERP.Core/Repository/SysMenuRepository.cs → ERP.Core/Repositorys/SysMenuRepository.cs

@@ -1,7 +1,7 @@
-using ERP.Core.Entity;
+using ERP.Core.Entities;
 using ERP.Framework.WebApi;
 
-namespace ERP.Core.Repository
+namespace ERP.Core.Repositorys
 {
     public class SysMenuRepository : BaseRepository<SysMenu, CoreDbContext>
     {

+ 2 - 2
ERP.Core/Repository/SysRoleRepository.cs → ERP.Core/Repositorys/SysRoleRepository.cs

@@ -1,7 +1,7 @@
-using ERP.Core.Entity;
+using ERP.Core.Entities;
 using ERP.Framework.WebApi;
 
-namespace ERP.Core.Repository
+namespace ERP.Core.Repositorys
 {
     public class SysRoleRepository : BaseRepository<SysRole, CoreDbContext>
     {

+ 2 - 2
ERP.Core/Repository/SysUserRepository.cs → ERP.Core/Repositorys/SysUserRepository.cs

@@ -1,7 +1,7 @@
-using ERP.Core.Entity;
+using ERP.Core.Entities;
 using ERP.Framework.WebApi;
 
-namespace ERP.Core.Repository
+namespace ERP.Core.Repositorys
 {
     public class SysUserRepository : BaseRepository<SysUser, CoreDbContext>
     {

+ 1 - 1
ERP.Core/Resource/Core18N.cs → ERP.Core/Resources/Core18N.cs

@@ -1,6 +1,6 @@
 using System.Resources;
 
-namespace ERP.Core.Resource
+namespace ERP.Core.Resources
 {
     public class Core18N
     {

+ 0 - 0
ERP.Core/Resource/Core18N.en-US.resx → ERP.Core/Resources/Core18N.en-US.resx


+ 4 - 4
ERP.Core/Service/AuthService.cs → ERP.Core/Services/AuthService.cs

@@ -1,7 +1,7 @@
-using ERP.Core.Entity;
+using ERP.Core.Entities;
 using ERP.Core.Interface;
-using ERP.Core.Repository;
-using ERP.Core.Resource;
+using ERP.Core.Repositorys;
+using ERP.Core.Resources;
 using ERP.Framework.Cache;
 using ERP.Framework.Config;
 using ERP.Framework.Constants;
@@ -11,7 +11,7 @@ using ERP.Framework.Security.Core;
 using ERP.Framework.Utils;
 using Microsoft.Extensions.Localization;
 
-namespace ERP.Core.Service
+namespace ERP.Core.Services
 {
     public class AuthService : IAuthService
     {

+ 7 - 7
ERP.Core/Service/SysMenuService.cs → ERP.Core/Services/SysMenuService.cs

@@ -4,13 +4,13 @@
 
 using ERP.Core.Constant;
 using ERP.Core.Dto;
-using ERP.Core.Entity;
+using ERP.Core.Entities;
 using ERP.Core.Interface;
-using ERP.Core.Repository;
+using ERP.Core.Repositorys;
 using ERP.Framework.Security;
 using ERP.Framework.Utils;
 
-namespace ERP.Core.Service
+namespace ERP.Core.Services
 {
     public class SysMenuService : ISysMenuService
     {
@@ -66,7 +66,7 @@ namespace ERP.Core.Service
                 };
 
                 var cMenus = menu.Children;
-                if (cMenus != null && menu.MenuType == Enum.MenuTypeEnum.Catalog)
+                if (cMenus != null && menu.MenuType == Enums.MenuTypeEnum.Catalog)
                 {
                     router.Children = BuildMenuTree(cMenus, router.Path);
                 }
@@ -98,7 +98,7 @@ namespace ERP.Core.Service
         {
             string routerPath;
 
-            if (menu.ParentId == 0 && menu.MenuType == Enum.MenuTypeEnum.Catalog)
+            if (menu.ParentId == 0 && menu.MenuType == Enums.MenuTypeEnum.Catalog)
             {
                 routerPath = "/" + menu.Path;
             }
@@ -121,7 +121,7 @@ namespace ERP.Core.Service
         /// <returns></returns>
         private bool IsMenuFrame(SysMenu menu)
         {
-            return menu.ParentId == 0 && menu.MenuType == Enum.MenuTypeEnum.Menu;
+            return menu.ParentId == 0 && menu.MenuType == Enums.MenuTypeEnum.Menu;
         }
 
         /// <summary>
@@ -131,7 +131,7 @@ namespace ERP.Core.Service
         /// <returns></returns>
         private bool IsParentView(SysMenu menu)
         {
-            return menu.ParentId != 0 && menu.MenuType == Enum.MenuTypeEnum.Catalog;
+            return menu.ParentId != 0 && menu.MenuType == Enums.MenuTypeEnum.Catalog;
         }
 
         /// <summary>

+ 3 - 3
ERP.Core/Service/SysUserService.cs → ERP.Core/Services/SysUserService.cs

@@ -1,7 +1,7 @@
-using ERP.Core.Entity;
-using ERP.Core.Repository;
+using ERP.Core.Entities;
+using ERP.Core.Repositorys;
 
-namespace ERP.Core.Service
+namespace ERP.Core.Services
 {
     public class SysUserService
     {