commit 449ac7c20f27adc86bab6c3577c2612d91598c34 Author: editor <@51Aspx.com> Date: Wed Jun 5 17:38:20 2024 +0800 初始化 diff --git a/51Aspx源码必读.txt b/51Aspx源码必读.txt new file mode 100644 index 0000000..e02d7ee --- /dev/null +++ b/51Aspx源码必读.txt @@ -0,0 +1,87 @@ +OL.FRAMECORE简单通用后台框架 + + + 一、源码描述 + + + OL.FrameCore简单通用后台框架 + + + 环境:VS2022 sql2019 .netcore3.1 + + + + + + 二、功能介绍 + + + 1、前台内容 + + + 新闻公告 + + + 产品列表 + + + 2、系统 + + + 用户管理 + + + 部门管理 + + + 角色管理 + + + 菜单模块 + + + 3、日志 + + + 4、个人中心 + + + 个人资料 + + + + + + 三、注意事项 + + + 1、在项目OL.FrameCore.WebUI的appsettings.json修改数据库连接字符串,附加数据库。 + + + 2、管理员账号与密码:admin 51aspx 。 + + + 3、ctrl+F5运行即可。 + + + +作者: coderbest + +如需获得该源码的视频、更新等更多资料请访问: https://www.51aspx.com/Code/GeneralBackgroundFramework +------------------------------------------------------------------------------------------------ + + 源码服务专家 + 官网: https://www.51aspx.com + 讨论圈: https://club.51aspx.com/ + +平台声明: + +1.51Aspx平台上提供下载的资源为免费、共享、商业三类源码,其中免费和共享源码仅供个人学习和研究使用,商业源码请在相应的授权许可条件下使用; +2.51Aspx平台对提供下载的软件及其它资源不拥有任何权利,其版权归属源码合法拥有者所有; +3.著作权人发现本网站载有侵害其合法权益的内容或作品,请与我们联系( 登录官网与客服反馈或发送邮件到support@51Aspx.com ); +4.51Aspx平台不保证提供的下载资源的准确性、安全性和完整性; + +友情提示: + 一般数据库文件默认在 DB_51Aspx 文件夹下 + 默认账号密码一般均为51Aspx + 关于源码使用常见问题及解决方案,请参阅: https://www.51aspx.com/Help diff --git a/OL.FrameCore.Application/Article/ArticleService.cs b/OL.FrameCore.Application/Article/ArticleService.cs new file mode 100644 index 0000000..6d8c944 --- /dev/null +++ b/OL.FrameCore.Application/Article/ArticleService.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.Article.Dto; +using OL.FrameCore.Domain.Entity; +using OL.FrameCore.Infrastructure.UnitOfWork; +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using OL.FrameCore.Infrastructure.Utility; + +namespace OL.FrameCore.Application.Article +{ + public class ArticleService: IArticleService + { + IUnitOfWork _unitOfwork; diff --git a/OL.FrameCore.Application/Article/Dto/AddArticleRequest.cs b/OL.FrameCore.Application/Article/Dto/AddArticleRequest.cs new file mode 100644 index 0000000..80a68b9 --- /dev/null +++ b/OL.FrameCore.Application/Article/Dto/AddArticleRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Article.Dto +{ + public class AddArticleRequest + { + public int Id { get; set; } + public string Title { get; set; } + public string Content { get; set; } + public string Tags { get; set; } + public string Summary { get; set; } + public int ArticleType { get; set; } + public int CreateId { get; set; } diff --git a/OL.FrameCore.Application/Article/Dto/GetArticleListRequest.cs b/OL.FrameCore.Application/Article/Dto/GetArticleListRequest.cs new file mode 100644 index 0000000..6a18585 --- /dev/null +++ b/OL.FrameCore.Application/Article/Dto/GetArticleListRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Article.Dto +{ + public class GetArticleListRequest : GetListRequestBase + { + public int Id { get; set; } + public string Title { get; set; } + public string Tag { get; set; } + public int Status { get; set; } + + public DateTime BeginTime { get; set; } + public DateTime EndTime { get; set; } diff --git a/OL.FrameCore.Application/Article/Dto/GetArticleListResponse.cs b/OL.FrameCore.Application/Article/Dto/GetArticleListResponse.cs new file mode 100644 index 0000000..aa66fac --- /dev/null +++ b/OL.FrameCore.Application/Article/Dto/GetArticleListResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Article.Dto +{ + public class GetArticleListResponse + { + public int Id { get; set; } + public string Title { get; set; } + public string Tags { get; set; } + public DateTime ReleaseTime { get; set; } + public int Status { get; set; } + public string StatusText + { diff --git a/OL.FrameCore.Application/Article/Dto/GetArticleResponse.cs b/OL.FrameCore.Application/Article/Dto/GetArticleResponse.cs new file mode 100644 index 0000000..4da1fe6 --- /dev/null +++ b/OL.FrameCore.Application/Article/Dto/GetArticleResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Article.Dto +{ + public class GetArticleResponse + { + public int Id { get; set; } + public string Title { get; set; } + public string Content { get; set; } + public string Tags { get; set; } + public string Summary { get; set; } + public int Type { get; set; } + public DateTime CreateTime { get; set; } diff --git a/OL.FrameCore.Application/Article/Dto/GetArticleViewListRequest.cs b/OL.FrameCore.Application/Article/Dto/GetArticleViewListRequest.cs new file mode 100644 index 0000000..fdf6182 --- /dev/null +++ b/OL.FrameCore.Application/Article/Dto/GetArticleViewListRequest.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Article.Dto +{ + public class GetArticleViewListRequest + { + } +} diff --git a/OL.FrameCore.Application/Article/Dto/GetArticleViewListResponse.cs b/OL.FrameCore.Application/Article/Dto/GetArticleViewListResponse.cs new file mode 100644 index 0000000..61f9400 --- /dev/null +++ b/OL.FrameCore.Application/Article/Dto/GetArticleViewListResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Article.Dto +{ + public class GetArticleViewListResponse + { + public long Id { get; set; } + public string Title { get; set; } + public int Type { get; set; } + public string TypeText + { + get + { diff --git a/OL.FrameCore.Application/Article/Dto/UpdateArticleRequest.cs b/OL.FrameCore.Application/Article/Dto/UpdateArticleRequest.cs new file mode 100644 index 0000000..d6e9b07 --- /dev/null +++ b/OL.FrameCore.Application/Article/Dto/UpdateArticleRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Article.Dto +{ + public class UpdateArticleRequest + { + public int Id { get; set; } + public string Title { get; set; } + public string Content { get; set; } + public string Tags { get; set; } + public string Summary { get; set; } + public int ArticleType { get; set; } + public int UpdateId { get; set; } diff --git a/OL.FrameCore.Application/Article/IArticleService.cs b/OL.FrameCore.Application/Article/IArticleService.cs new file mode 100644 index 0000000..76b69d3 --- /dev/null +++ b/OL.FrameCore.Application/Article/IArticleService.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.Article.Dto; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Article +{ + public interface IArticleService + { + /// + /// 获取文章列表 + /// + /// + /// diff --git a/OL.FrameCore.Application/CacheKey.cs b/OL.FrameCore.Application/CacheKey.cs new file mode 100644 index 0000000..58fb1b1 --- /dev/null +++ b/OL.FrameCore.Application/CacheKey.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application +{ + public class CacheKey + { + const string CacheHead = "Cache"; + public static string Menu(int userId) => $"{CacheHead}.{nameof(Menu)}:User{userId}"; + public static string Permission(int userId) => $"{CacheHead}.{nameof(Permission)}:User{userId}"; + public static string LoginStatistics(int userId) => $"{CacheHead}.{nameof(LoginStatistics)}:User{userId}"; + + + public static string ImportUser(string tag) => $"{CacheHead}.{nameof(ImportUser)}:{tag}"; diff --git a/OL.FrameCore.Application/CacheManage/CacheManageService.cs b/OL.FrameCore.Application/CacheManage/CacheManageService.cs new file mode 100644 index 0000000..b8636d1 --- /dev/null +++ b/OL.FrameCore.Application/CacheManage/CacheManageService.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.CacheManage.Dto; +using OL.FrameCore.Infrastructure.Cache; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace OL.FrameCore.Application.CacheManage +{ + public class CacheManageService : ICacheManageService + { + /// + /// 获取缓存列表 + /// diff --git a/OL.FrameCore.Application/CacheManage/Dto/GetCacheContentResponse.cs b/OL.FrameCore.Application/CacheManage/Dto/GetCacheContentResponse.cs new file mode 100644 index 0000000..3c036b3 --- /dev/null +++ b/OL.FrameCore.Application/CacheManage/Dto/GetCacheContentResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.CacheManage.Dto +{ + public class GetCacheContentResponse + { + public string Key { get; set; } + public string Content { get; set; } + } +} diff --git a/OL.FrameCore.Application/CacheManage/Dto/GetCacheListRequest.cs b/OL.FrameCore.Application/CacheManage/Dto/GetCacheListRequest.cs new file mode 100644 index 0000000..f0e1a79 --- /dev/null +++ b/OL.FrameCore.Application/CacheManage/Dto/GetCacheListRequest.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.CacheManage.Dto +{ + public class GetCacheListRequest : GetListRequestBase + { + public string Key { get; set; } + } +} diff --git a/OL.FrameCore.Application/CacheManage/Dto/GetCacheListResponse.cs b/OL.FrameCore.Application/CacheManage/Dto/GetCacheListResponse.cs new file mode 100644 index 0000000..999943a --- /dev/null +++ b/OL.FrameCore.Application/CacheManage/Dto/GetCacheListResponse.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.CacheManage.Dto +{ + public class GetCacheListResponse + { + public string CacheKey { get; set; } + public DateTime CreateTime { get; set; } + public DateTime ExpireTime { get; set; } + } +} diff --git a/OL.FrameCore.Application/CacheManage/ICacheManageService.cs b/OL.FrameCore.Application/CacheManage/ICacheManageService.cs new file mode 100644 index 0000000..d855c83 --- /dev/null +++ b/OL.FrameCore.Application/CacheManage/ICacheManageService.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.CacheManage.Dto; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.CacheManage +{ + public interface ICacheManageService + { + /// + /// 获取缓存列表 + /// + /// + /// diff --git a/OL.FrameCore.Application/CommonData/CommonDataService.cs b/OL.FrameCore.Application/CommonData/CommonDataService.cs new file mode 100644 index 0000000..a0ed0a4 --- /dev/null +++ b/OL.FrameCore.Application/CommonData/CommonDataService.cs @@ -0,0 +1,15 @@ +using OL.FrameCore.Application.CommonData.Dto; +using OL.FrameCore.Application.Dept; +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using OL.FrameCore.Application.Module; + +namespace OL.FrameCore.Application.CommonData +{ + public class CommonDataService: ICommonDataService + { + IDeptService _deptService; + IModuleService _moduleService; + public CommonDataService(IDeptService deptService, IModuleService moduleService) diff --git a/OL.FrameCore.Application/CommonData/Dto/DeptModel.cs b/OL.FrameCore.Application/CommonData/Dto/DeptModel.cs new file mode 100644 index 0000000..2a363f6 --- /dev/null +++ b/OL.FrameCore.Application/CommonData/Dto/DeptModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.CommonData.Dto +{ + public class DropDownModel + { + public int Id { get; set; } + public string Name { get; set; } + public int ParentId { get; set; } + public int Level { get; set; } + } +} diff --git a/OL.FrameCore.Application/CommonData/ICommonDataService.cs b/OL.FrameCore.Application/CommonData/ICommonDataService.cs new file mode 100644 index 0000000..d960833 --- /dev/null +++ b/OL.FrameCore.Application/CommonData/ICommonDataService.cs @@ -0,0 +1,14 @@ +using OL.FrameCore.Application.CommonData.Dto; +using OL.FrameCore.Infrastructure.Code; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.CommonData +{ + public interface ICommonDataService : IAutoInject + { + IList GetDeptDropDownList(); + IList GetModuleDropDownList(); + } +} diff --git a/OL.FrameCore.Application/Dept/DeptService.cs b/OL.FrameCore.Application/Dept/DeptService.cs new file mode 100644 index 0000000..a52bd9c --- /dev/null +++ b/OL.FrameCore.Application/Dept/DeptService.cs @@ -0,0 +1,15 @@ +using OL.FrameCore.Application.Dept.Dto; +using OL.FrameCore.Domain.Entity; +using OL.FrameCore.Infrastructure.UnitOfWork; +//using OL.FrameCore.Domain.IRepository; +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Repository.EF; + +namespace OL.FrameCore.Application.Dept +{ + public class DeptService : IDeptService + { diff --git a/OL.FrameCore.Application/Dept/Dto/AddDeptRequest.cs b/OL.FrameCore.Application/Dept/Dto/AddDeptRequest.cs new file mode 100644 index 0000000..eba44ce --- /dev/null +++ b/OL.FrameCore.Application/Dept/Dto/AddDeptRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Dept.Dto +{ + public class AddDeptRequest + { + public string DeptName { get; set; } + public string DeptCode { get; set; } + public int ParentId { get; set; } + public int DeptLevel { get; set; } + public int SortIndex { get; set; } + public string Remark { get; set; } + public int OpeatorId { get; set; } diff --git a/OL.FrameCore.Application/Dept/Dto/GetDeptListModel.cs b/OL.FrameCore.Application/Dept/Dto/GetDeptListModel.cs new file mode 100644 index 0000000..7bfe71e --- /dev/null +++ b/OL.FrameCore.Application/Dept/Dto/GetDeptListModel.cs @@ -0,0 +1,15 @@ +using System; + +namespace OL.FrameCore.Application.Dept.Dto +{ + public class GetDeptListModel + { + public int Id { get; set; } + public string DeptName { get; set; } + public string DeptCode { get; set; } + public int ParentId { get; set; } + public string ParentName { get; set; } + public int DeptLevel { get; set; } + public int SortIndex { get; set; } + public DateTime CreateTime { get; set; } + } diff --git a/OL.FrameCore.Application/Dept/Dto/GetDeptListRequest.cs b/OL.FrameCore.Application/Dept/Dto/GetDeptListRequest.cs new file mode 100644 index 0000000..c12bd53 --- /dev/null +++ b/OL.FrameCore.Application/Dept/Dto/GetDeptListRequest.cs @@ -0,0 +1,10 @@ +namespace OL.FrameCore.Application.Dept.Dto +{ + public class GetDeptListRequest: GetListRequestBase + { + public int? DeptId { get; set; } + public string DeptName { get; set; } + public string DeptCode { get; set; } + public int? ParentId { get; set; } + } +} diff --git a/OL.FrameCore.Application/Dept/Dto/GetDeptResponse.cs b/OL.FrameCore.Application/Dept/Dto/GetDeptResponse.cs new file mode 100644 index 0000000..1d7ac64 --- /dev/null +++ b/OL.FrameCore.Application/Dept/Dto/GetDeptResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Dept.Dto +{ + public class GetDeptResponse + { + public int Id { get; set; } + public string DeptName { get; set; } + public string DeptCode { get; set; } + public int ParentId { get; set; } + //public int DeptLevel { get; set; } + public int SortIndex { get; set; } + //public DateTime CreateTime { get; set; } diff --git a/OL.FrameCore.Application/Dept/Dto/UpdateDeptRequest.cs b/OL.FrameCore.Application/Dept/Dto/UpdateDeptRequest.cs new file mode 100644 index 0000000..6557a87 --- /dev/null +++ b/OL.FrameCore.Application/Dept/Dto/UpdateDeptRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Dept.Dto +{ + public class UpdateDeptRequest + { + public int Id { get; set; } + public string DeptName { get; set; } + public string DeptCode { get; set; } + public int ParentId { get; set; } + //public int DeptLevel { get; set; } + public int SortIndex { get; set; } + public string Remark { get; set; } diff --git a/OL.FrameCore.Application/Dept/IDeptService.cs b/OL.FrameCore.Application/Dept/IDeptService.cs new file mode 100644 index 0000000..639c339 --- /dev/null +++ b/OL.FrameCore.Application/Dept/IDeptService.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.Dept.Dto; +using OL.FrameCore.Infrastructure.Code; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Dept +{ + public interface IDeptService : IAutoInject + { + /// + /// 获取所有部门列表 + /// + /// diff --git a/OL.FrameCore.Application/GetListRequestBase.cs b/OL.FrameCore.Application/GetListRequestBase.cs new file mode 100644 index 0000000..746c035 --- /dev/null +++ b/OL.FrameCore.Application/GetListRequestBase.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application +{ + public class GetListRequestBase + { + /// + /// 从0开始 + /// + public int PageIndex { get; set; } = 0; + public int PageSize { get; set; } = 10; + } +} diff --git a/OL.FrameCore.Application/Home/Dto/GetCurrentDataResponse.cs b/OL.FrameCore.Application/Home/Dto/GetCurrentDataResponse.cs new file mode 100644 index 0000000..8ffd583 --- /dev/null +++ b/OL.FrameCore.Application/Home/Dto/GetCurrentDataResponse.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Home.Dto +{ + public class GetCurrentDataResponse + { + public int NewNum { get; set; } + public int NoticeNum { get; set; } + public int UserNum { get; set; } + } +} diff --git a/OL.FrameCore.Application/Home/Dto/GetLoginStatisticsModel.cs b/OL.FrameCore.Application/Home/Dto/GetLoginStatisticsModel.cs new file mode 100644 index 0000000..8d7aad6 --- /dev/null +++ b/OL.FrameCore.Application/Home/Dto/GetLoginStatisticsModel.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Home.Dto +{ + public class GetLoginStatisticsModel + { + public string Date { get; set; } + public int LoginNum { get; set; } + } +} diff --git a/OL.FrameCore.Application/Home/Dto/GetMyLoginDataResponse.cs b/OL.FrameCore.Application/Home/Dto/GetMyLoginDataResponse.cs new file mode 100644 index 0000000..bfec36f --- /dev/null +++ b/OL.FrameCore.Application/Home/Dto/GetMyLoginDataResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Home.Dto +{ + public class GetMyLoginDataResponse + { + + public int UseId { get; set; } + public string UserName { get; set; } + public int LoginTime { get; set; } + public List LoginList { get; set; } + } +} diff --git a/OL.FrameCore.Application/Home/Dto/GetUserDistributionResponse.cs b/OL.FrameCore.Application/Home/Dto/GetUserDistributionResponse.cs new file mode 100644 index 0000000..6529583 --- /dev/null +++ b/OL.FrameCore.Application/Home/Dto/GetUserDistributionResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Home.Dto +{ + public class GetUserDistributionResponse + { + public int ManNum { get; set; } + public int WomanNum { get; set; } + } +} diff --git a/OL.FrameCore.Application/Home/HomeService.cs b/OL.FrameCore.Application/Home/HomeService.cs new file mode 100644 index 0000000..ef7f5ce --- /dev/null +++ b/OL.FrameCore.Application/Home/HomeService.cs @@ -0,0 +1,15 @@ +using OL.FrameCore.Application.Home.Dto; +using OL.FrameCore.Domain.Entity; +using OL.FrameCore.Infrastructure.UnitOfWork; +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; + +namespace OL.FrameCore.Application.Home +{ + public class HomeService: IHomeService + { + IUnitOfWork _unitOfwork; + public HomeService(IUnitOfWork unitOfwork) + { diff --git a/OL.FrameCore.Application/Home/IHomeService.cs b/OL.FrameCore.Application/Home/IHomeService.cs new file mode 100644 index 0000000..0fc0867 --- /dev/null +++ b/OL.FrameCore.Application/Home/IHomeService.cs @@ -0,0 +1,15 @@ +using OL.FrameCore.Application.Home.Dto; +using OL.FrameCore.Infrastructure.Code; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Home +{ + public interface IHomeService : IAutoInject + { + /// + /// 获取当前数据 + /// + /// + GetCurrentDataResponse GetCurrentData(); diff --git a/OL.FrameCore.Application/IServiceBase.cs b/OL.FrameCore.Application/IServiceBase.cs new file mode 100644 index 0000000..ffe1761 --- /dev/null +++ b/OL.FrameCore.Application/IServiceBase.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application +{ + public interface IServiceBase where Dto :class + { + List GetList(); + + Dto GetModel(long id); + + bool Insert(Dto dto); + + bool Update(Dto dto); diff --git a/OL.FrameCore.Application/Module/Dto/AddModuleRequest.cs b/OL.FrameCore.Application/Module/Dto/AddModuleRequest.cs new file mode 100644 index 0000000..f6857ce --- /dev/null +++ b/OL.FrameCore.Application/Module/Dto/AddModuleRequest.cs @@ -0,0 +1,15 @@ +namespace OL.FrameCore.Application.Module.Dto +{ + public class AddModuleRequest + { + public string ModuleName { get; set; } + public string ModuleCode { get; set; } + public int ParentId { get; set; } + public bool IsMenu { get; set; } + public string MenuPath { get; set; } + public string Icon { get; set; } + public int SortIndex { get; set; } + public string Remark { get; set; } + public int OpeatorId { get; set; } + } +} diff --git a/OL.FrameCore.Application/Module/Dto/GetModuleListModel.cs b/OL.FrameCore.Application/Module/Dto/GetModuleListModel.cs new file mode 100644 index 0000000..02c1b65 --- /dev/null +++ b/OL.FrameCore.Application/Module/Dto/GetModuleListModel.cs @@ -0,0 +1,15 @@ +using System; + +namespace OL.FrameCore.Application.Module.Dto +{ + public class GetModuleListModel + { + public int Id { get; set; } + public string ModuleName { get; set; } + public string ModuleCode { get; set; } + public int ParentId { get; set; } + public string ParentName { get; set; } + public bool IsMenu { get; set; } + public string MenuPath { get; set; } + public string Icon { get; set; } + //public int DeptLevel { get; set; } diff --git a/OL.FrameCore.Application/Module/Dto/GetModuleListRequest.cs b/OL.FrameCore.Application/Module/Dto/GetModuleListRequest.cs new file mode 100644 index 0000000..1aeda63 --- /dev/null +++ b/OL.FrameCore.Application/Module/Dto/GetModuleListRequest.cs @@ -0,0 +1,9 @@ +namespace OL.FrameCore.Application.Module.Dto +{ + public class GetModuleListRequest : GetListRequestBase + { + public int? Id { get; set; } + public string ModuleName { get; set; } + public string ModuleCode { get; set; } + } +} diff --git a/OL.FrameCore.Application/Module/Dto/GetModuleResponse.cs b/OL.FrameCore.Application/Module/Dto/GetModuleResponse.cs new file mode 100644 index 0000000..1d774ca --- /dev/null +++ b/OL.FrameCore.Application/Module/Dto/GetModuleResponse.cs @@ -0,0 +1,15 @@ +using System; + +namespace OL.FrameCore.Application.Module.Dto +{ + public class GetModuleResponse + { + public int Id { get; set; } + public string ModuleName { get; set; } + public string ModuleCode { get; set; } + public int ParentId { get; set; } + public bool IsMenu { get; set; } = true; + public string MenuPath { get; set; } + public string Icon { get; set; } + //public int DeptLevel { get; set; } + public int SortIndex { get; set; } diff --git a/OL.FrameCore.Application/Module/Dto/UpdateModuleRequest.cs b/OL.FrameCore.Application/Module/Dto/UpdateModuleRequest.cs new file mode 100644 index 0000000..4f425d9 --- /dev/null +++ b/OL.FrameCore.Application/Module/Dto/UpdateModuleRequest.cs @@ -0,0 +1,15 @@ +namespace OL.FrameCore.Application.Module.Dto +{ + public class UpdateModuleRequest + { + public int Id { get; set; } + public string ModuleName { get; set; } + public string ModuleCode { get; set; } + public int ParentId { get; set; } + public bool IsMenu { get; set; } + public string MenuPath { get; set; } + public string Icon { get; set; } + public int SortIndex { get; set; } + public string Remark { get; set; } + public int OpeatorId { get; set; } + } diff --git a/OL.FrameCore.Application/Module/Enum/ModuleStatusEnum.cs b/OL.FrameCore.Application/Module/Enum/ModuleStatusEnum.cs new file mode 100644 index 0000000..e6339a7 --- /dev/null +++ b/OL.FrameCore.Application/Module/Enum/ModuleStatusEnum.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Module.Enum +{ + public enum ModuleStatusEnum + { + Enable = 0, + Disable = 1 + } +} diff --git a/OL.FrameCore.Application/Module/IModuleService.cs b/OL.FrameCore.Application/Module/IModuleService.cs new file mode 100644 index 0000000..7a32029 --- /dev/null +++ b/OL.FrameCore.Application/Module/IModuleService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.Module.Dto; +using OL.FrameCore.Application.Module.Enum; +using OL.FrameCore.Infrastructure.Code; + +namespace OL.FrameCore.Application.Module +{ + public interface IModuleService : IAutoInject + { + /// + /// 获取所有模块列表 + /// diff --git a/OL.FrameCore.Application/Module/ModuleService.cs b/OL.FrameCore.Application/Module/ModuleService.cs new file mode 100644 index 0000000..126797e --- /dev/null +++ b/OL.FrameCore.Application/Module/ModuleService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OL.FrameCore.Application.Module.Dto; +using OL.FrameCore.Domain.Entity; +//using OL.FrameCore.Domain.IRepository; +using OL.FrameCore.Infrastructure.UnitOfWork; +using System.Linq; +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.Module.Enum; + +namespace OL.FrameCore.Application.Module +{ + public class ModuleService : IModuleService + { diff --git a/OL.FrameCore.Application/OL.FrameCore.Application.csproj b/OL.FrameCore.Application/OL.FrameCore.Application.csproj new file mode 100644 index 0000000..e165674 --- /dev/null +++ b/OL.FrameCore.Application/OL.FrameCore.Application.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp3.1 + + + + + + + + + + + diff --git a/OL.FrameCore.Application/Person/Dto/GetLoginRecordListRequest.cs b/OL.FrameCore.Application/Person/Dto/GetLoginRecordListRequest.cs new file mode 100644 index 0000000..cc69931 --- /dev/null +++ b/OL.FrameCore.Application/Person/Dto/GetLoginRecordListRequest.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Person.Dto +{ + public class GetLoginRecordListRequest : GetListRequestBase + { + public int UserId { get; set; } + } +} diff --git a/OL.FrameCore.Application/Person/Dto/GetLoginRecordListResponse.cs b/OL.FrameCore.Application/Person/Dto/GetLoginRecordListResponse.cs new file mode 100644 index 0000000..3c21e0d --- /dev/null +++ b/OL.FrameCore.Application/Person/Dto/GetLoginRecordListResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Person.Dto +{ + public class GetLoginRecordListResponse + { + public int Id { get; set; } + public string UserName { get; set; } + public int UserId { get; set; } + public string IP { get; set; } + public string UserAgent { get; set; } + public DateTime LoginTime { get; set; } + //public string LoginTimeText { get { return LoginTime.ToString("yyyy-MM-dd HH:mm:ss"); } } diff --git a/OL.FrameCore.Application/Person/Dto/UpdatePasswordRequest.cs b/OL.FrameCore.Application/Person/Dto/UpdatePasswordRequest.cs new file mode 100644 index 0000000..668e28c --- /dev/null +++ b/OL.FrameCore.Application/Person/Dto/UpdatePasswordRequest.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Person.Dto +{ + public class UpdatePasswordRequest + { + public int UserId { get; set; } + public string OldPassword { get; set; } + public string NewPassword { get; set; } + public string RepeatPassword { get; set; } + } +} diff --git a/OL.FrameCore.Application/Person/Dto/UpdatePersonInfoRequest.cs b/OL.FrameCore.Application/Person/Dto/UpdatePersonInfoRequest.cs new file mode 100644 index 0000000..876bfe4 --- /dev/null +++ b/OL.FrameCore.Application/Person/Dto/UpdatePersonInfoRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Person.Dto +{ + public class UpdatePersonInfoRequest + { + public int UserId { get; set; } + //public string UserName { get; set; } + public string TrueName { get; set; } + public int Sex { get; set; } + public string Phone { get; set; } + public string Email { get; set; } + //public int DeptId { get; set; } diff --git a/OL.FrameCore.Application/Person/IPersonService.cs b/OL.FrameCore.Application/Person/IPersonService.cs new file mode 100644 index 0000000..d5e8c68 --- /dev/null +++ b/OL.FrameCore.Application/Person/IPersonService.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.Person.Dto; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Person +{ + public interface IPersonService + { + /// + /// 更新用户资料 + /// + /// + /// diff --git a/OL.FrameCore.Application/Person/PersonService.cs b/OL.FrameCore.Application/Person/PersonService.cs new file mode 100644 index 0000000..cbef90f --- /dev/null +++ b/OL.FrameCore.Application/Person/PersonService.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.Person.Dto; +using OL.FrameCore.Domain.Entity; +using OL.FrameCore.Infrastructure.UnitOfWork; +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using OL.FrameCore.Infrastructure.Security; + +namespace OL.FrameCore.Application.Person +{ + public class PersonService: IPersonService + { + IUnitOfWork _unitOfwork; diff --git a/OL.FrameCore.Application/Result.cs b/OL.FrameCore.Application/Result.cs new file mode 100644 index 0000000..4242cf2 --- /dev/null +++ b/OL.FrameCore.Application/Result.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application +{ + public class Result + { + /// + /// 结果状态 1操作正常 0操作失败 -1异常 + /// + public int State { get; set; } + /// + /// 结果信息 + /// diff --git a/OL.FrameCore.Application/Role/Dto/AddRoleRequest.cs b/OL.FrameCore.Application/Role/Dto/AddRoleRequest.cs new file mode 100644 index 0000000..234488e --- /dev/null +++ b/OL.FrameCore.Application/Role/Dto/AddRoleRequest.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Role.Dto +{ + public class AddRoleRequest + { + public string RoleName { get; set; } + public string Remark { get; set; } + public int[] AssignModules { get; set; } + public int OpeatorId { get; set; } + } +} diff --git a/OL.FrameCore.Application/Role/Dto/GeRoleListResponse.cs b/OL.FrameCore.Application/Role/Dto/GeRoleListResponse.cs new file mode 100644 index 0000000..7a3b1fc --- /dev/null +++ b/OL.FrameCore.Application/Role/Dto/GeRoleListResponse.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Role.Dto +{ + public class GeRoleListResponse + { + public int Id { get; set; } + public string RoleName { get; set; } + public string Remark { get; set; } + public DateTime CreateTime { get; set; } + } +} diff --git a/OL.FrameCore.Application/Role/Dto/GetRoleListRequest.cs b/OL.FrameCore.Application/Role/Dto/GetRoleListRequest.cs new file mode 100644 index 0000000..f305d7c --- /dev/null +++ b/OL.FrameCore.Application/Role/Dto/GetRoleListRequest.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Role.Dto +{ + public class GetRoleListRequest + { + public int? RoleId { get; set; } + public string RoleName { get; set; } + public int PageIndex { get; set; } + public int PageSize { get; set; } + } +} diff --git a/OL.FrameCore.Application/Role/Dto/GetRoleResponse.cs b/OL.FrameCore.Application/Role/Dto/GetRoleResponse.cs new file mode 100644 index 0000000..ecdd92b --- /dev/null +++ b/OL.FrameCore.Application/Role/Dto/GetRoleResponse.cs @@ -0,0 +1,15 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Role.Dto +{ + public class GetRoleResponse + { + public int Id { get; set; } + public string RoleName { get; set; } + public string Remark { get; set; } + public List RoleModules { get; set; } + public string RoleModulesJsonText + { diff --git a/OL.FrameCore.Application/Role/Dto/RoleModuleModel.cs b/OL.FrameCore.Application/Role/Dto/RoleModuleModel.cs new file mode 100644 index 0000000..d226cad --- /dev/null +++ b/OL.FrameCore.Application/Role/Dto/RoleModuleModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Role.Dto +{ + public class RoleModuleModel + { + public int Id { get; set; } + public string ModuleName { get; set; } + public string ModuleCode { get; set; } + public int ParentId { get; set; } + public int SortIndex { get; set; } + /// + /// 是否分配 diff --git a/OL.FrameCore.Application/Role/Dto/UpdateRoleRequest.cs b/OL.FrameCore.Application/Role/Dto/UpdateRoleRequest.cs new file mode 100644 index 0000000..be859d4 --- /dev/null +++ b/OL.FrameCore.Application/Role/Dto/UpdateRoleRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.Role.Dto +{ + public class UpdateRoleRequest + { + + public int Id { get; set; } + public string RoleName { get; set; } + public string Remark { get; set; } + public int[] AssignModules { get; set; } + public int OpeatorId { get; set; } + } diff --git a/OL.FrameCore.Application/Role/IRoleService.cs b/OL.FrameCore.Application/Role/IRoleService.cs new file mode 100644 index 0000000..61d77f6 --- /dev/null +++ b/OL.FrameCore.Application/Role/IRoleService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.Role.Dto; +using OL.FrameCore.Infrastructure.Code; + +namespace OL.FrameCore.Application.Role +{ + public interface IRoleService : IAutoInject + { + //List GetRoleList(int roleId, string roleName); + PageData GetRoleList(GetRoleListRequest request); + GetRoleResponse GetEmptyRole(); + GetRoleResponse GetRole(int id); diff --git a/OL.FrameCore.Application/Role/RoleService.cs b/OL.FrameCore.Application/Role/RoleService.cs new file mode 100644 index 0000000..8fe883f --- /dev/null +++ b/OL.FrameCore.Application/Role/RoleService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Transactions; +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.Module; +using OL.FrameCore.Application.Module.Enum; +using OL.FrameCore.Application.Role.Dto; +using OL.FrameCore.Domain.Entity; +//using OL.FrameCore.Domain.IRepository; +using OL.FrameCore.Infrastructure.UnitOfWork; +using OL.FrameCore.Infrastructure.Utility; +using OL.FrameCore.Repository.EF; diff --git a/OL.FrameCore.Application/ServiceBase.cs b/OL.FrameCore.Application/ServiceBase.cs new file mode 100644 index 0000000..9472ece --- /dev/null +++ b/OL.FrameCore.Application/ServiceBase.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text; +//using OL.FrameCore.Domain.IRepository; +using OL.FrameCore.Infrastructure.Utility; +using Microsoft.EntityFrameworkCore; + +namespace OL.FrameCore.Application +{ + public class ServiceBase : IServiceBase where TDto : class where TEntity : class + { + IRepositoryBase _repository; + public ServiceBase(IRepositoryBase repository) + { diff --git a/OL.FrameCore.Application/SysLog/Dto/GetErrorLogListRequest.cs b/OL.FrameCore.Application/SysLog/Dto/GetErrorLogListRequest.cs new file mode 100644 index 0000000..f2c8c75 --- /dev/null +++ b/OL.FrameCore.Application/SysLog/Dto/GetErrorLogListRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.SysLog.Dto +{ + public class GetErrorLogListRequest: GetListRequestBase + { + public string ErrorInfo { get; set; } + public string IP { get; set; } + public string UserId { get; set; } + public DateTime BeginTime { get; set; } + public DateTime EndTime { get; set; } + } +} diff --git a/OL.FrameCore.Application/SysLog/Dto/GetErrorLogListResponse.cs b/OL.FrameCore.Application/SysLog/Dto/GetErrorLogListResponse.cs new file mode 100644 index 0000000..1a9840d --- /dev/null +++ b/OL.FrameCore.Application/SysLog/Dto/GetErrorLogListResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.SysLog.Dto +{ + public class GetErrorLogListResponse + { + public int Id { get; set; } + public string IP { get; set; } + public string ErrorInfo { get; set; } + public string UserId { get; set; } + public DateTime CreateTime { get; set; } + } +} diff --git a/OL.FrameCore.Application/SysLog/Dto/GetUserLoginLogListRequest.cs b/OL.FrameCore.Application/SysLog/Dto/GetUserLoginLogListRequest.cs new file mode 100644 index 0000000..ea1085a --- /dev/null +++ b/OL.FrameCore.Application/SysLog/Dto/GetUserLoginLogListRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.SysLog.Dto +{ + public class GetUserLoginLogListRequest : GetListRequestBase + { + public string UserName { get; set; } + public int? UserId { get; set; } + public int? LoginStatus { get; set; } + public string IP { get; set; } + public DateTime BeginTime { get; set; } + public DateTime EndTime { get; set; } + } diff --git a/OL.FrameCore.Application/SysLog/Dto/GetUserLoginLogListResponse.cs b/OL.FrameCore.Application/SysLog/Dto/GetUserLoginLogListResponse.cs new file mode 100644 index 0000000..3792887 --- /dev/null +++ b/OL.FrameCore.Application/SysLog/Dto/GetUserLoginLogListResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.SysLog.Dto +{ + public class GetUserLoginLogListResponse + { + public int Id { get; set; } + public string UserName { get; set; } + public int UserId { get; set; } + public string IP { get; set; } + public string UserAgent { get; set; } + public DateTime LoginTime { get; set; } + //public string LoginTimeText { get { return LoginTime.ToString("yyyy-MM-dd HH:mm:ss"); } } diff --git a/OL.FrameCore.Application/SysLog/Dto/GetUserOperateLogListRequest.cs b/OL.FrameCore.Application/SysLog/Dto/GetUserOperateLogListRequest.cs new file mode 100644 index 0000000..8dfaf5b --- /dev/null +++ b/OL.FrameCore.Application/SysLog/Dto/GetUserOperateLogListRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.SysLog.Dto +{ + public class GetUserOperateLogListRequest: GetListRequestBase + { + public int? OperateId { get; set; } + public int? OperateType { get; set; } + public int? UserId { get; set; } + public DateTime BeginTime { get; set; } + public DateTime EndTime { get; set; } + } +} diff --git a/OL.FrameCore.Application/SysLog/Dto/GetUserOperateLogListResponse.cs b/OL.FrameCore.Application/SysLog/Dto/GetUserOperateLogListResponse.cs new file mode 100644 index 0000000..7784ae0 --- /dev/null +++ b/OL.FrameCore.Application/SysLog/Dto/GetUserOperateLogListResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.SysLog.Dto +{ + public class GetUserOperateLogListResponse + { + public int Id { get; set; } + /// + /// 0新增 1修改 2删除 3启用 4禁用 5重置密码 + /// + public int OperateType { get; set; } + public string OperateTypeText + { diff --git a/OL.FrameCore.Application/SysLog/Dto/LogErrorRequest.cs b/OL.FrameCore.Application/SysLog/Dto/LogErrorRequest.cs new file mode 100644 index 0000000..508499f --- /dev/null +++ b/OL.FrameCore.Application/SysLog/Dto/LogErrorRequest.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.SysLog.Dto +{ + public class LogErrorRequest + { + public string ErrorInfo { get; set; } + public string IP { get; set; } + public string UserId { get; set; } + public DateTime CreateTime { get; set; } + } +} diff --git a/OL.FrameCore.Application/SysLog/ISysLogService.cs b/OL.FrameCore.Application/SysLog/ISysLogService.cs new file mode 100644 index 0000000..083eac0 --- /dev/null +++ b/OL.FrameCore.Application/SysLog/ISysLogService.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.SysLog.Dto; +using OL.FrameCore.Infrastructure.Code; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.SysLog +{ + public interface ISysLogService : IAutoInject + { + /// + /// 获取用户操作日志列表 + /// + /// diff --git a/OL.FrameCore.Application/SysLog/SysLogService.cs b/OL.FrameCore.Application/SysLog/SysLogService.cs new file mode 100644 index 0000000..fd96245 --- /dev/null +++ b/OL.FrameCore.Application/SysLog/SysLogService.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.SysLog.Dto; +using OL.FrameCore.Domain.Entity; +using OL.FrameCore.Infrastructure.UnitOfWork; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; + +namespace OL.FrameCore.Application.SysLog +{ + public class SysLogService: ISysLogService + { + IUnitOfWork _unitOfwork; diff --git a/OL.FrameCore.Application/User/Dto/AddUserRequest.cs b/OL.FrameCore.Application/User/Dto/AddUserRequest.cs new file mode 100644 index 0000000..4b75487 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/AddUserRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class AddUserRequest + { + public string UserName { get; set; } + public string Password { get; set; } + public string TrueName { get; set; } + public int Sex { get; set; } + public string Phone { get; set; } + public string Email { get; set; } + public int DeptId { get; set; } diff --git a/OL.FrameCore.Application/User/Dto/AssignUserModuleRequest.cs b/OL.FrameCore.Application/User/Dto/AssignUserModuleRequest.cs new file mode 100644 index 0000000..b2c5c5c --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/AssignUserModuleRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class AssignUserModuleRequest + { + public int Id { get; set; } + public int[] AssignModules { get; set; } + public int OpeatorId { get; set; } + } +} diff --git a/OL.FrameCore.Application/User/Dto/AssignUserRoleRequest.cs b/OL.FrameCore.Application/User/Dto/AssignUserRoleRequest.cs new file mode 100644 index 0000000..f33998e --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/AssignUserRoleRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class AssignUserRoleRequest + { + public int Id { get; set; } + public int[] AssignRoles { get; set; } + public int OpeatorId { get; set; } + } +} diff --git a/OL.FrameCore.Application/User/Dto/CheckImportUserResponse.cs b/OL.FrameCore.Application/User/Dto/CheckImportUserResponse.cs new file mode 100644 index 0000000..4be211f --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/CheckImportUserResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class CheckImportUserResponse: ImportUserRequest + { + public bool IsPass { get; set; } + public string ErrorInfo { get; set; } + } +} diff --git a/OL.FrameCore.Application/User/Dto/ExportUserResponse.cs b/OL.FrameCore.Application/User/Dto/ExportUserResponse.cs new file mode 100644 index 0000000..99d2342 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/ExportUserResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Runtime.Serialization; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class ExportUserResponse + { + public int Id { get; set; } + + [DisplayName("用户名")] + public string UserName { get; set; } + [DisplayName("姓名")] diff --git a/OL.FrameCore.Application/User/Dto/GetLoginUserInfoResponse.cs b/OL.FrameCore.Application/User/Dto/GetLoginUserInfoResponse.cs new file mode 100644 index 0000000..85b9f10 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/GetLoginUserInfoResponse.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class GetLoginUserInfoResponse + { + public int UserId { get; set; } + public string UserName { get; set; } + public string TrueName { get; set; } + public string Role { get; set; } + } +} diff --git a/OL.FrameCore.Application/User/Dto/GetUserListRequest.cs b/OL.FrameCore.Application/User/Dto/GetUserListRequest.cs new file mode 100644 index 0000000..8ac7ae0 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/GetUserListRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class GetUserListRequest: GetListRequestBase + { + public int UserId { get; set; } + public string UserName { get; set; } + public string TrueName { get; set; } + public int? DeptId { get; set; } + public int? Status { get; set; } + } +} diff --git a/OL.FrameCore.Application/User/Dto/GetUserListResponse.cs b/OL.FrameCore.Application/User/Dto/GetUserListResponse.cs new file mode 100644 index 0000000..4b26e29 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/GetUserListResponse.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class GetUserListResponse + { + public int Id { get; set; } + public string UserName { get; set; } + public string TrueName { get; set; } + public string DeptName { get; set; } + public string Phone { get; set; } + public string Email { get; set; } + public int Status { get; set; } diff --git a/OL.FrameCore.Application/User/Dto/GetUserModuleResponse.cs b/OL.FrameCore.Application/User/Dto/GetUserModuleResponse.cs new file mode 100644 index 0000000..0c0a06b --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/GetUserModuleResponse.cs @@ -0,0 +1,15 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class GetUserModuleResponse + { + public int Id { get; set; } + public List UserModules { get; set; } + public string UserModulesJsonText + { + get + { diff --git a/OL.FrameCore.Application/User/Dto/GetUserResponse.cs b/OL.FrameCore.Application/User/Dto/GetUserResponse.cs new file mode 100644 index 0000000..bc1529a --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/GetUserResponse.cs @@ -0,0 +1,14 @@ +namespace OL.FrameCore.Application.User.Dto +{ + public class GetUserResponse + { + public int Id { get; set; } + public string UserName { get; set; } + public string TrueName { get; set; } + public int Sex { get; set; } + public int? DeptId { get; set; } + public string DeptName { get; set; } + public string Phone { get; set; } + public string Email { get; set; } + } +} diff --git a/OL.FrameCore.Application/User/Dto/GetUserRoleResponse.cs b/OL.FrameCore.Application/User/Dto/GetUserRoleResponse.cs new file mode 100644 index 0000000..4799ab4 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/GetUserRoleResponse.cs @@ -0,0 +1,15 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class GetUserRoleResponse + { + public int Id { get; set; } + public List UserRoles { get; set; } + public string UserRolesJsonText + { + get + { diff --git a/OL.FrameCore.Application/User/Dto/ImportUserRequest.cs b/OL.FrameCore.Application/User/Dto/ImportUserRequest.cs new file mode 100644 index 0000000..e205a85 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/ImportUserRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class ImportUserRequest + { + public string UserName { get; set; } + public string TrueName { get; set; } + public string DeptName { get; set; } + public string Phone { get; set; } + public string Email { get; set; } + } +} diff --git a/OL.FrameCore.Application/User/Dto/LogLoginRequest.cs b/OL.FrameCore.Application/User/Dto/LogLoginRequest.cs new file mode 100644 index 0000000..8df78ef --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/LogLoginRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class LogLoginRequest + { + public string UserName { get; set; } + public int UserId { get; set; } = 0; + public string IP { get; set; } + public string UserAgent { get; set; } + /// + /// 1登录成功 2登录失败 + /// diff --git a/OL.FrameCore.Application/User/Dto/LoginRequest.cs b/OL.FrameCore.Application/User/Dto/LoginRequest.cs new file mode 100644 index 0000000..57fe592 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/LoginRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class LoginRequest + { + public string UserName { get; set; } + public string Password { get; set; } + } +} diff --git a/OL.FrameCore.Application/User/Dto/LoginResponse.cs b/OL.FrameCore.Application/User/Dto/LoginResponse.cs new file mode 100644 index 0000000..c4b8648 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/LoginResponse.cs @@ -0,0 +1,15 @@ +using OL.FrameCore.Domain.Enum; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class LoginResponse + { + /// + /// 0密码错误 1登录成功 -1登录异常 2没有账号 + /// + public LoginEnum Code { get; set; } + public int UserId { get; set; } + } diff --git a/OL.FrameCore.Application/User/Dto/RetsetPasswordRequest.cs b/OL.FrameCore.Application/User/Dto/RetsetPasswordRequest.cs new file mode 100644 index 0000000..79d4869 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/RetsetPasswordRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class RetsetPasswordRequest + { + public int UserId { get; set; } + public string Password { get; set; } + public int OpeatorId { get; set; } + } +} diff --git a/OL.FrameCore.Application/User/Dto/UpdateUserRequest.cs b/OL.FrameCore.Application/User/Dto/UpdateUserRequest.cs new file mode 100644 index 0000000..aef157e --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/UpdateUserRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class UpdateUserRequest + { + public int Id { get; set; } + public string UserName { get; set; } + public string TrueName { get; set; } + public int Sex { get; set; } + public string Phone { get; set; } + public string Email { get; set; } + public int DeptId { get; set; } diff --git a/OL.FrameCore.Application/User/Dto/UserModuleModel.cs b/OL.FrameCore.Application/User/Dto/UserModuleModel.cs new file mode 100644 index 0000000..9701de3 --- /dev/null +++ b/OL.FrameCore.Application/User/Dto/UserModuleModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Application.User.Dto +{ + public class UserModuleModel + { + public int Id { get; set; } + public string ModuleName { get; set; } + public string ModuleCode { get; set; } + public int ParentId { get; set; } + public int SortIndex { get; set; } + /// + /// 是否分配 diff --git a/OL.FrameCore.Application/User/IUserService.cs b/OL.FrameCore.Application/User/IUserService.cs new file mode 100644 index 0000000..fe841f9 --- /dev/null +++ b/OL.FrameCore.Application/User/IUserService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OL.FrameCore.Application.User.Dto; +using OL.FrameCore.Infrastructure.Code; +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Application.Module.Dto; + +namespace OL.FrameCore.Application.User +{ + public interface IUserService : IAutoInject + { + /// + /// 登录 + /// diff --git a/OL.FrameCore.Application/User/UserService.cs b/OL.FrameCore.Application/User/UserService.cs new file mode 100644 index 0000000..8a8812a --- /dev/null +++ b/OL.FrameCore.Application/User/UserService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OL.FrameCore.Application.User.Dto; +using OL.FrameCore.Infrastructure.Utility; +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Infrastructure.UnitOfWork; +using OL.FrameCore.Domain.Entity; +using System.Linq; +using OL.FrameCore.Domain.Enum; +using System.Linq.Expressions; +using System.Transactions; +using OL.FrameCore.Application.Module.Dto; +using System.Security.Cryptography; +using OL.FrameCore.Application.Module; diff --git a/OL.FrameCore.Application/bin/Debug/netcoreapp3.1/OL.FrameCore.Application.deps.json b/OL.FrameCore.Application/bin/Debug/netcoreapp3.1/OL.FrameCore.Application.deps.json new file mode 100644 index 0000000..6b417e0 --- /dev/null +++ b/OL.FrameCore.Application/bin/Debug/netcoreapp3.1/OL.FrameCore.Application.deps.json @@ -0,0 +1,15 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.1", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.1": { + "OL.FrameCore.Application/1.0.0": { + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "2.1.1", + "Newtonsoft.Json": "13.0.1", + "OL.FrameCore.Domain": "1.0.0", + "OL.FrameCore.Infrastructure": "1.0.0", + "OL.FrameCore.Repository.EF": "1.0.0" diff --git a/OL.FrameCore.Application/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs b/OL.FrameCore.Application/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs new file mode 100644 index 0000000..1b9b2f8 --- /dev/null +++ b/OL.FrameCore.Application/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = ".NET Core 3.1")] diff --git a/OL.FrameCore.Application/obj/Debug/netcoreapp3.1/OL.FrameCore.Application.AssemblyInfo.cs b/OL.FrameCore.Application/obj/Debug/netcoreapp3.1/OL.FrameCore.Application.AssemblyInfo.cs new file mode 100644 index 0000000..f07a240 --- /dev/null +++ b/OL.FrameCore.Application/obj/Debug/netcoreapp3.1/OL.FrameCore.Application.AssemblyInfo.cs @@ -0,0 +1,15 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("OL.FrameCore.Application")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] diff --git a/OL.FrameCore.Application/obj/Debug/netcoreapp3.1/OL.FrameCore.Application.csproj.FileListAbsolute.txt b/OL.FrameCore.Application/obj/Debug/netcoreapp3.1/OL.FrameCore.Application.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..9caaff1 --- /dev/null +++ b/OL.FrameCore.Application/obj/Debug/netcoreapp3.1/OL.FrameCore.Application.csproj.FileListAbsolute.txt @@ -0,0 +1,15 @@ +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\bin\Debug\netcoreapp3.1\OL.FrameCore.Application.deps.json +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\bin\Debug\netcoreapp3.1\OL.FrameCore.Application.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\bin\Debug\netcoreapp3.1\OL.FrameCore.Application.pdb +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\bin\Debug\netcoreapp3.1\OL.FrameCore.Domain.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\bin\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\bin\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\bin\Debug\netcoreapp3.1\OL.FrameCore.Domain.pdb +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\bin\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.pdb +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\bin\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.pdb +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\obj\Debug\netcoreapp3.1\OL.FrameCore.Application.csproj.AssemblyReference.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\obj\Debug\netcoreapp3.1\OL.FrameCore.Application.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\obj\Debug\netcoreapp3.1\OL.FrameCore.Application.AssemblyInfoInputs.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\obj\Debug\netcoreapp3.1\OL.FrameCore.Application.AssemblyInfo.cs +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\obj\Debug\netcoreapp3.1\OL.FrameCore.Application.csproj.CoreCompileInputs.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Application\obj\Debug\netcoreapp3.1\OL.FrameCore.Application.csproj.CopyComplete diff --git a/OL.FrameCore.Application/obj/OL.FrameCore.Application.csproj.nuget.dgspec.json b/OL.FrameCore.Application/obj/OL.FrameCore.Application.csproj.nuget.dgspec.json new file mode 100644 index 0000000..da46621 --- /dev/null +++ b/OL.FrameCore.Application/obj/OL.FrameCore.Application.csproj.nuget.dgspec.json @@ -0,0 +1,15 @@ +{ + "format": 1, + "restore": { + "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Application\\OL.FrameCore.Application.csproj": {} + }, + "projects": { + "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Application\\OL.FrameCore.Application.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Application\\OL.FrameCore.Application.csproj", + "projectName": "OL.FrameCore.Application", + "projectPath": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Application\\OL.FrameCore.Application.csproj", + "packagesPath": "C:\\Users\\coder\\.nuget\\packages\\", + "outputPath": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Application\\obj\\", + "projectStyle": "PackageReference", diff --git a/OL.FrameCore.Application/obj/project.assets.json b/OL.FrameCore.Application/obj/project.assets.json new file mode 100644 index 0000000..1618ba1 --- /dev/null +++ b/OL.FrameCore.Application/obj/project.assets.json @@ -0,0 +1,15 @@ +{ + "version": 3, + "targets": { + ".NETCoreApp,Version=v3.1": { + "AutoMapper/10.0.0": { + "type": "package", + "dependencies": { + "Microsoft.CSharp": "4.7.0", + "System.Reflection.Emit": "4.7.0" + }, + "compile": { + "lib/netstandard2.0/AutoMapper.dll": { + "related": ".xml" + } + }, diff --git a/OL.FrameCore.Domain/Entity/AppArticle.cs b/OL.FrameCore.Domain/Entity/AppArticle.cs new file mode 100644 index 0000000..6bad8d3 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/AppArticle.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + [Table("App_Article")] + public class AppArticle + { + [Key] + public int Id { get; set; } + public string Title { get; set; } + public string Content { get; set; } diff --git a/OL.FrameCore.Domain/Entity/IEntity.cs b/OL.FrameCore.Domain/Entity/IEntity.cs new file mode 100644 index 0000000..fd33e48 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/IEntity.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +//namespace OL.FrameCore.Domain.Entity +//{ +// /// +// /// 实体对象基类,表中必须包含下列字段 +// /// +// public class IEntity +// { +// public int Id { get; set; } + +// public int CreateId { get; set; } +// public DateTime CreateTime { get; set; } diff --git a/OL.FrameCore.Domain/Entity/Info.cs b/OL.FrameCore.Domain/Entity/Info.cs new file mode 100644 index 0000000..a62e44b --- /dev/null +++ b/OL.FrameCore.Domain/Entity/Info.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + /// + /// 公告/新闻/文章 + /// + public class Info + { + [Key] + public int Id { get; set; } + diff --git a/OL.FrameCore.Domain/Entity/InfoFile.cs b/OL.FrameCore.Domain/Entity/InfoFile.cs new file mode 100644 index 0000000..9d200e8 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/InfoFile.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + class InfoFile + { + [Key] + public int Id { get; set; } + } +} diff --git a/OL.FrameCore.Domain/Entity/InfoType.cs b/OL.FrameCore.Domain/Entity/InfoType.cs new file mode 100644 index 0000000..b66410a --- /dev/null +++ b/OL.FrameCore.Domain/Entity/InfoType.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + class InfoType + { + [Key] + public int Id { get; set; } + } +} diff --git a/OL.FrameCore.Domain/Entity/SysDept.cs b/OL.FrameCore.Domain/Entity/SysDept.cs new file mode 100644 index 0000000..5b28462 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysDept.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + [Table("Sys_Dept")] + public class SysDept + { + [Key] + public int Id { get; set; } + public string DeptName { get; set; } + public string DeptCode { get; set; } diff --git a/OL.FrameCore.Domain/Entity/SysDictData.cs b/OL.FrameCore.Domain/Entity/SysDictData.cs new file mode 100644 index 0000000..72c2767 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysDictData.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + public class SysDictData + { + [Key] + public int Id { get; set; } + + + public int CreateId { get; set; } + public DateTime CreateTime { get; set; } diff --git a/OL.FrameCore.Domain/Entity/SysDictType.cs b/OL.FrameCore.Domain/Entity/SysDictType.cs new file mode 100644 index 0000000..5e24f97 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysDictType.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + public class SysDictType + { + [Key] + public int Id { get; set; } + + public int CreateId { get; set; } + public DateTime CreateTime { get; set; } + public int UpdateId { get; set; } diff --git a/OL.FrameCore.Domain/Entity/SysLog.cs b/OL.FrameCore.Domain/Entity/SysLog.cs new file mode 100644 index 0000000..83bb08b --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysLog.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + /// + /// 错误日志 + /// + [Table("Sys_ErrorLog")] + public class SysErrorLog + { + [Key] diff --git a/OL.FrameCore.Domain/Entity/SysModule.cs b/OL.FrameCore.Domain/Entity/SysModule.cs new file mode 100644 index 0000000..0ff83c7 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysModule.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + /// + /// 模块 + /// + [Table("Sys_Module")] + public class SysModule + { + [Key] diff --git a/OL.FrameCore.Domain/Entity/SysRole.cs b/OL.FrameCore.Domain/Entity/SysRole.cs new file mode 100644 index 0000000..a5b3718 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysRole.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + /// + /// 角色 + /// + [Table("Sys_Role")] + public class SysRole + { + [Key] diff --git a/OL.FrameCore.Domain/Entity/SysRoleModuleMap.cs b/OL.FrameCore.Domain/Entity/SysRoleModuleMap.cs new file mode 100644 index 0000000..cd52e6a --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysRoleModuleMap.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + /// + /// 角色模块关联 + /// + [Table("Sys_RoleModuleMap")] + public class SysRoleModuleMap + { + [Key] diff --git a/OL.FrameCore.Domain/Entity/SysUser.cs b/OL.FrameCore.Domain/Entity/SysUser.cs new file mode 100644 index 0000000..7215895 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysUser.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + /// + /// 用户 + /// + [Table("Sys_User")] + public class SysUser + { + [Key] diff --git a/OL.FrameCore.Domain/Entity/SysUserExtend.cs b/OL.FrameCore.Domain/Entity/SysUserExtend.cs new file mode 100644 index 0000000..0f69d32 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysUserExtend.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + public class SysUserExtend + { + [Key] + public int Id { get; set; } + + + public int CreateId { get; set; } + public DateTime CreateTime { get; set; } diff --git a/OL.FrameCore.Domain/Entity/SysUserLoginLog.cs b/OL.FrameCore.Domain/Entity/SysUserLoginLog.cs new file mode 100644 index 0000000..e2679d8 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysUserLoginLog.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + [Table("Sys_UserLoginLog")] + public class SysUserLoginLog + { + [Key] + public int Id { get; set; } + public string UserName { get; set; } + public int UserId { get; set; } diff --git a/OL.FrameCore.Domain/Entity/SysUserModuleMap.cs b/OL.FrameCore.Domain/Entity/SysUserModuleMap.cs new file mode 100644 index 0000000..5acdc79 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysUserModuleMap.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + /// + /// 用户模块关联 + /// + [Table("Sys_UserModuleMap")] + public class SysUserModuleMap + { + [Key] diff --git a/OL.FrameCore.Domain/Entity/SysUserOperateLog.cs b/OL.FrameCore.Domain/Entity/SysUserOperateLog.cs new file mode 100644 index 0000000..d7cd752 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysUserOperateLog.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + [Table("Sys_UserOperateLog")] + public class SysUserOperateLog + { + [Key] + public int Id { get; set; } + public int OperateId { get; set; } + /// diff --git a/OL.FrameCore.Domain/Entity/SysUserRoleMap.cs b/OL.FrameCore.Domain/Entity/SysUserRoleMap.cs new file mode 100644 index 0000000..644ac62 --- /dev/null +++ b/OL.FrameCore.Domain/Entity/SysUserRoleMap.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace OL.FrameCore.Domain.Entity +{ + /// + /// 用户角色关联 + /// + [Table("Sys_UserRoleMap")] + public class SysUserRoleMap + { + [Key] diff --git a/OL.FrameCore.Domain/Enum/DictTypeEnum.cs b/OL.FrameCore.Domain/Enum/DictTypeEnum.cs new file mode 100644 index 0000000..ab2f6c1 --- /dev/null +++ b/OL.FrameCore.Domain/Enum/DictTypeEnum.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Domain.Enum +{ + public enum DictTypeEnum + { + + } +} diff --git a/OL.FrameCore.Domain/Enum/LoginEnum.cs b/OL.FrameCore.Domain/Enum/LoginEnum.cs new file mode 100644 index 0000000..e7749a8 --- /dev/null +++ b/OL.FrameCore.Domain/Enum/LoginEnum.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Domain.Enum +{ + public enum LoginEnum + { + /// + /// 异常 + /// + Error = -1, + /// + /// 密码错误 + /// diff --git a/OL.FrameCore.Domain/OL.FrameCore.Domain.csproj b/OL.FrameCore.Domain/OL.FrameCore.Domain.csproj new file mode 100644 index 0000000..9be2569 --- /dev/null +++ b/OL.FrameCore.Domain/OL.FrameCore.Domain.csproj @@ -0,0 +1,13 @@ + + + + netcoreapp3.1 + + + + + + + + + diff --git a/OL.FrameCore.Domain/bin/Debug/netcoreapp3.1/OL.FrameCore.Domain.deps.json b/OL.FrameCore.Domain/bin/Debug/netcoreapp3.1/OL.FrameCore.Domain.deps.json new file mode 100644 index 0000000..decf16d --- /dev/null +++ b/OL.FrameCore.Domain/bin/Debug/netcoreapp3.1/OL.FrameCore.Domain.deps.json @@ -0,0 +1,15 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.1", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.1": { + "OL.FrameCore.Domain/1.0.0": { + "runtime": { + "OL.FrameCore.Domain.dll": {} + } + } + } + }, diff --git a/OL.FrameCore.Domain/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs b/OL.FrameCore.Domain/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs new file mode 100644 index 0000000..1b9b2f8 --- /dev/null +++ b/OL.FrameCore.Domain/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = ".NET Core 3.1")] diff --git a/OL.FrameCore.Domain/obj/Debug/netcoreapp3.1/OL.FrameCore.Domain.AssemblyInfo.cs b/OL.FrameCore.Domain/obj/Debug/netcoreapp3.1/OL.FrameCore.Domain.AssemblyInfo.cs new file mode 100644 index 0000000..b8ff0f6 --- /dev/null +++ b/OL.FrameCore.Domain/obj/Debug/netcoreapp3.1/OL.FrameCore.Domain.AssemblyInfo.cs @@ -0,0 +1,15 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("OL.FrameCore.Domain")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] diff --git a/OL.FrameCore.Domain/obj/Debug/netcoreapp3.1/OL.FrameCore.Domain.csproj.FileListAbsolute.txt b/OL.FrameCore.Domain/obj/Debug/netcoreapp3.1/OL.FrameCore.Domain.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..107ac78 --- /dev/null +++ b/OL.FrameCore.Domain/obj/Debug/netcoreapp3.1/OL.FrameCore.Domain.csproj.FileListAbsolute.txt @@ -0,0 +1,9 @@ +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Domain\bin\Debug\netcoreapp3.1\OL.FrameCore.Domain.deps.json +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Domain\bin\Debug\netcoreapp3.1\OL.FrameCore.Domain.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Domain\bin\Debug\netcoreapp3.1\OL.FrameCore.Domain.pdb +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Domain\obj\Debug\netcoreapp3.1\OL.FrameCore.Domain.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Domain\obj\Debug\netcoreapp3.1\OL.FrameCore.Domain.AssemblyInfoInputs.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Domain\obj\Debug\netcoreapp3.1\OL.FrameCore.Domain.AssemblyInfo.cs +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Domain\obj\Debug\netcoreapp3.1\OL.FrameCore.Domain.csproj.CoreCompileInputs.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Domain\obj\Debug\netcoreapp3.1\OL.FrameCore.Domain.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Domain\obj\Debug\netcoreapp3.1\OL.FrameCore.Domain.pdb diff --git a/OL.FrameCore.Domain/obj/OL.FrameCore.Domain.csproj.nuget.dgspec.json b/OL.FrameCore.Domain/obj/OL.FrameCore.Domain.csproj.nuget.dgspec.json new file mode 100644 index 0000000..b005556 --- /dev/null +++ b/OL.FrameCore.Domain/obj/OL.FrameCore.Domain.csproj.nuget.dgspec.json @@ -0,0 +1,15 @@ +{ + "format": 1, + "restore": { + "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Domain\\OL.FrameCore.Domain.csproj": {} + }, + "projects": { + "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Domain\\OL.FrameCore.Domain.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Domain\\OL.FrameCore.Domain.csproj", + "projectName": "OL.FrameCore.Domain", + "projectPath": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Domain\\OL.FrameCore.Domain.csproj", + "packagesPath": "C:\\Users\\coder\\.nuget\\packages\\", + "outputPath": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Domain\\obj\\", + "projectStyle": "PackageReference", diff --git a/OL.FrameCore.Domain/obj/project.assets.json b/OL.FrameCore.Domain/obj/project.assets.json new file mode 100644 index 0000000..6b3170b --- /dev/null +++ b/OL.FrameCore.Domain/obj/project.assets.json @@ -0,0 +1,15 @@ +{ + "version": 3, + "targets": { + ".NETCoreApp,Version=v3.1": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + ".NETCoreApp,Version=v3.1": [] + }, + "packageFolders": { + "C:\\Users\\coder\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}, + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {} + }, + "project": { diff --git a/OL.FrameCore.Infrastructure/Cache/CacheManager.cs b/OL.FrameCore.Infrastructure/Cache/CacheManager.cs new file mode 100644 index 0000000..4bd96ee --- /dev/null +++ b/OL.FrameCore.Infrastructure/Cache/CacheManager.cs @@ -0,0 +1,15 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace OL.FrameCore.Infrastructure.Cache +{ + public class CacheManager + { + static object lockObj = new object(); + static Dictionary cacheDatas = new Dictionary(); + + /// + /// 获取缓存 diff --git a/OL.FrameCore.Infrastructure/Code/AutoInject.cs b/OL.FrameCore.Infrastructure/Code/AutoInject.cs new file mode 100644 index 0000000..f43af1f --- /dev/null +++ b/OL.FrameCore.Infrastructure/Code/AutoInject.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Infrastructure.Code +{ + /// + /// 该接口用于autofac标记,自动注入 + /// + public interface IAutoInject + { + + } +} diff --git a/OL.FrameCore.Infrastructure/Code/ServiceCollectionExtensions.cs b/OL.FrameCore.Infrastructure/Code/ServiceCollectionExtensions.cs new file mode 100644 index 0000000..df3d464 --- /dev/null +++ b/OL.FrameCore.Infrastructure/Code/ServiceCollectionExtensions.cs @@ -0,0 +1,15 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Runtime.Loader; +using System.Text; + +namespace OL.FrameCore.Infrastructure.Code +{ + /// + /// 服务自动注册接口 + /// diff --git a/OL.FrameCore.Infrastructure/Document/NPOIExcel.cs b/OL.FrameCore.Infrastructure/Document/NPOIExcel.cs new file mode 100644 index 0000000..28e3653 --- /dev/null +++ b/OL.FrameCore.Infrastructure/Document/NPOIExcel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using ClosedXML.Excel; +using Microsoft.AspNetCore.Http; +using NPOI.HSSF.UserModel; +using NPOI.SS.UserModel; +using OL.FrameCore.Infrastructure.Utility; +using System.ComponentModel; +using System.Runtime.Serialization; diff --git a/OL.FrameCore.Infrastructure/OL.FrameCore.Infrastructure.csproj b/OL.FrameCore.Infrastructure/OL.FrameCore.Infrastructure.csproj new file mode 100644 index 0000000..b87481e --- /dev/null +++ b/OL.FrameCore.Infrastructure/OL.FrameCore.Infrastructure.csproj @@ -0,0 +1,15 @@ + + + + Library + netcoreapp3.1 + + + + + + + + + + diff --git a/OL.FrameCore.Infrastructure/Security/DESUtility.cs b/OL.FrameCore.Infrastructure/Security/DESUtility.cs new file mode 100644 index 0000000..87505b1 --- /dev/null +++ b/OL.FrameCore.Infrastructure/Security/DESUtility.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Security.Cryptography; +using System.Text; + +namespace OL.FrameCore.Infrastructure.Security +{ + public class DESUtility + { + const string EncryptKey = "u3%s~0o!"; + + /// + /// DES加密数据 + /// diff --git a/OL.FrameCore.Infrastructure/Security/MD5Utility.cs b/OL.FrameCore.Infrastructure/Security/MD5Utility.cs new file mode 100644 index 0000000..fe59aa5 --- /dev/null +++ b/OL.FrameCore.Infrastructure/Security/MD5Utility.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Security.Cryptography; +using System.Text; + +namespace OL.FrameCore.Infrastructure.Security +{ + public class MD5Utility + { + const string EncryptKey = "u3%s~0o!"; + + /// + /// 加密 + /// + /// 要加密的文本 diff --git a/OL.FrameCore.Infrastructure/Security/RSAHelper.cs b/OL.FrameCore.Infrastructure/Security/RSAHelper.cs new file mode 100644 index 0000000..de3a302 --- /dev/null +++ b/OL.FrameCore.Infrastructure/Security/RSAHelper.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Infrastructure.Security +{ + /// + /// RSA加密解密帮助 + /// + public class RSAHelper + { + static object obj = new object(); + static RsaKeyPair CacheRsaKey; + static DateTime KeyTime; + diff --git a/OL.FrameCore.Infrastructure/Security/RSAUtility.cs b/OL.FrameCore.Infrastructure/Security/RSAUtility.cs new file mode 100644 index 0000000..670419d --- /dev/null +++ b/OL.FrameCore.Infrastructure/Security/RSAUtility.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.Crypto.Encodings; +using Org.BouncyCastle.Crypto.Engines; +using Org.BouncyCastle.Crypto.Generators; +using Org.BouncyCastle.OpenSsl; +using Org.BouncyCastle.Security; + +namespace OL.FrameCore.Infrastructure.Security +{ + /// + /// RSA非对称加密 diff --git a/OL.FrameCore.Infrastructure/UnitOfWork/EFUnitOfWork.cs b/OL.FrameCore.Infrastructure/UnitOfWork/EFUnitOfWork.cs new file mode 100644 index 0000000..1df0ac7 --- /dev/null +++ b/OL.FrameCore.Infrastructure/UnitOfWork/EFUnitOfWork.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; + +namespace OL.FrameCore.Infrastructure.UnitOfWork +{ + public class EFUnitOfWork : IUnitOfWork where TContext : DbContext + { + TContext _dbContext; + Dictionary dictRepository; + + public EFUnitOfWork(TContext dbContext) + { diff --git a/OL.FrameCore.Infrastructure/UnitOfWork/IRepositoryBase.cs b/OL.FrameCore.Infrastructure/UnitOfWork/IRepositoryBase.cs new file mode 100644 index 0000000..f4f8675 --- /dev/null +++ b/OL.FrameCore.Infrastructure/UnitOfWork/IRepositoryBase.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.EntityFrameworkCore +{ + public interface IRepositoryBase + { + IQueryable Table { get; } + IQueryable TableNoTracking { get; } + + List GetAllList(); diff --git a/OL.FrameCore.Infrastructure/UnitOfWork/IUnitOfWork.cs b/OL.FrameCore.Infrastructure/UnitOfWork/IUnitOfWork.cs new file mode 100644 index 0000000..693e212 --- /dev/null +++ b/OL.FrameCore.Infrastructure/UnitOfWork/IUnitOfWork.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Infrastructure.UnitOfWork +{ + public interface IUnitOfWork + { + IRepositoryBase GetRepository() where TEntity : class; + /// + /// 直接提交到数据库 + /// + void Save(); + IList SqlQuery(string sql, params object[] parameters) where T : new(); diff --git a/OL.FrameCore.Infrastructure/UnitOfWork/RepositoryBase.cs b/OL.FrameCore.Infrastructure/UnitOfWork/RepositoryBase.cs new file mode 100644 index 0000000..6d80bc8 --- /dev/null +++ b/OL.FrameCore.Infrastructure/UnitOfWork/RepositoryBase.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; + +namespace OL.FrameCore.Infrastructure.UnitOfWork +{ + /// + /// Repository基类 + /// + /// + public class RepositoryBase : IRepositoryBase where TEntity : class diff --git a/OL.FrameCore.Infrastructure/UnitOfWork/UnitOfWorkServiceCollectionExtensions.cs b/OL.FrameCore.Infrastructure/UnitOfWork/UnitOfWorkServiceCollectionExtensions.cs new file mode 100644 index 0000000..4ff0085 --- /dev/null +++ b/OL.FrameCore.Infrastructure/UnitOfWork/UnitOfWorkServiceCollectionExtensions.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Collections.Generic; +using System.Text; +using OL.FrameCore.Infrastructure.Code; + +namespace OL.FrameCore.Infrastructure.UnitOfWork +{ + public static class UnitOfWorkServiceCollectionExtensions + { + public static IServiceCollection AddUnitOfWork(this IServiceCollection services) where TContext : DbContext + { + //ServiceCollectionServiceExtensions.AddScoped>(services); + //ServiceCollectionServiceExtensions.AddScoped, RepositoryBase>(services); diff --git a/OL.FrameCore.Infrastructure/Utility/AutoMapperHelper.cs b/OL.FrameCore.Infrastructure/Utility/AutoMapperHelper.cs new file mode 100644 index 0000000..dac014b --- /dev/null +++ b/OL.FrameCore.Infrastructure/Utility/AutoMapperHelper.cs @@ -0,0 +1,15 @@ +using AutoMapper; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Infrastructure.Utility +{ + public class AutoMapperHelper + { + public static T2 ToMap(T1 model) + { + var config = new MapperConfiguration(cfg => cfg.CreateMap()); + var mapper = config.CreateMapper(); + T2 tModel = mapper.Map(model); + return tModel; diff --git a/OL.FrameCore.Infrastructure/Utility/DataTableHelper.cs b/OL.FrameCore.Infrastructure/Utility/DataTableHelper.cs new file mode 100644 index 0000000..dee5836 --- /dev/null +++ b/OL.FrameCore.Infrastructure/Utility/DataTableHelper.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace OL.FrameCore.Infrastructure.Utility +{ + public class DataTableHelper + { + //public static IList ConvertTo(IList rows) + //{ + // IList list = null; diff --git a/OL.FrameCore.Infrastructure/Utility/EntityMap.cs b/OL.FrameCore.Infrastructure/Utility/EntityMap.cs new file mode 100644 index 0000000..8d6c90a --- /dev/null +++ b/OL.FrameCore.Infrastructure/Utility/EntityMap.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace OL.FrameCore.Infrastructure.Utility +{ + /// + /// 对象属性映射 + /// + public class EntityMap + { + /// + /// 对象属性映射 + /// diff --git a/OL.FrameCore.Infrastructure/Utility/StringHandle.cs b/OL.FrameCore.Infrastructure/Utility/StringHandle.cs new file mode 100644 index 0000000..6a1d5cf --- /dev/null +++ b/OL.FrameCore.Infrastructure/Utility/StringHandle.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; + +namespace OL.FrameCore.Infrastructure.Utility +{ + public class StringHandle + { + public static string GetSummaryString(string content, int length) + { + content = System.Text.RegularExpressions.Regex.Replace(content, "<[^>]*>| ", ""); + if (content.Length > length) + { + content = content.Substring(0, length); diff --git a/OL.FrameCore.Infrastructure/Utility/ValidateCode.cs b/OL.FrameCore.Infrastructure/Utility/ValidateCode.cs new file mode 100644 index 0000000..355d8ec --- /dev/null +++ b/OL.FrameCore.Infrastructure/Utility/ValidateCode.cs @@ -0,0 +1,15 @@ +using System; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.IO; +using System.Text; + +namespace OL.FrameCore.Infrastructure.Utility +{ + /// + /// 生成验证码的类 + /// + public class ValidateCode + { + public ValidateCode() + { diff --git a/OL.FrameCore.Infrastructure/bin/Debug/netcoreapp3.1/OL.FrameCore.Infrastructure.deps.json b/OL.FrameCore.Infrastructure/bin/Debug/netcoreapp3.1/OL.FrameCore.Infrastructure.deps.json new file mode 100644 index 0000000..006e0fe --- /dev/null +++ b/OL.FrameCore.Infrastructure/bin/Debug/netcoreapp3.1/OL.FrameCore.Infrastructure.deps.json @@ -0,0 +1,15 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.1", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.1": { + "OL.FrameCore.Infrastructure/1.0.0": { + "dependencies": { + "AutoMapper": "10.0.0", + "BouncyCastle.NetCore": "1.8.8", + "ClosedXML": "0.95.4", + "Microsoft.AspNetCore.Http.Features": "5.0.5", + "Microsoft.EntityFrameworkCore.SqlServer": "2.1.1", diff --git a/OL.FrameCore.Infrastructure/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs b/OL.FrameCore.Infrastructure/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs new file mode 100644 index 0000000..1b9b2f8 --- /dev/null +++ b/OL.FrameCore.Infrastructure/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = ".NET Core 3.1")] diff --git a/OL.FrameCore.Infrastructure/obj/Debug/netcoreapp3.1/OL.FrameCore.Infrastructure.AssemblyInfo.cs b/OL.FrameCore.Infrastructure/obj/Debug/netcoreapp3.1/OL.FrameCore.Infrastructure.AssemblyInfo.cs new file mode 100644 index 0000000..dd436c3 --- /dev/null +++ b/OL.FrameCore.Infrastructure/obj/Debug/netcoreapp3.1/OL.FrameCore.Infrastructure.AssemblyInfo.cs @@ -0,0 +1,15 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("OL.FrameCore.Infrastructure")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] diff --git a/OL.FrameCore.Infrastructure/obj/Debug/netcoreapp3.1/OL.FrameCore.Infrastructure.csproj.FileListAbsolute.txt b/OL.FrameCore.Infrastructure/obj/Debug/netcoreapp3.1/OL.FrameCore.Infrastructure.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..2e05c8f --- /dev/null +++ b/OL.FrameCore.Infrastructure/obj/Debug/netcoreapp3.1/OL.FrameCore.Infrastructure.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Infrastructure\bin\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.deps.json +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Infrastructure\bin\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Infrastructure\bin\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.pdb +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Infrastructure\obj\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.csproj.AssemblyReference.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Infrastructure\obj\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Infrastructure\obj\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.AssemblyInfoInputs.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Infrastructure\obj\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.AssemblyInfo.cs +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Infrastructure\obj\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.csproj.CoreCompileInputs.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Infrastructure\obj\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Infrastructure\obj\Debug\netcoreapp3.1\OL.FrameCore.Infrastructure.pdb diff --git a/OL.FrameCore.Infrastructure/obj/OL.FrameCore.Infrastructure.csproj.nuget.dgspec.json b/OL.FrameCore.Infrastructure/obj/OL.FrameCore.Infrastructure.csproj.nuget.dgspec.json new file mode 100644 index 0000000..4f26607 --- /dev/null +++ b/OL.FrameCore.Infrastructure/obj/OL.FrameCore.Infrastructure.csproj.nuget.dgspec.json @@ -0,0 +1,15 @@ +{ + "format": 1, + "restore": { + "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Infrastructure\\OL.FrameCore.Infrastructure.csproj": {} + }, + "projects": { + "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Infrastructure\\OL.FrameCore.Infrastructure.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Infrastructure\\OL.FrameCore.Infrastructure.csproj", + "projectName": "OL.FrameCore.Infrastructure", + "projectPath": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Infrastructure\\OL.FrameCore.Infrastructure.csproj", + "packagesPath": "C:\\Users\\coder\\.nuget\\packages\\", + "outputPath": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Infrastructure\\obj\\", + "projectStyle": "PackageReference", diff --git a/OL.FrameCore.Infrastructure/obj/project.assets.json b/OL.FrameCore.Infrastructure/obj/project.assets.json new file mode 100644 index 0000000..1618ba1 --- /dev/null +++ b/OL.FrameCore.Infrastructure/obj/project.assets.json @@ -0,0 +1,15 @@ +{ + "version": 3, + "targets": { + ".NETCoreApp,Version=v3.1": { + "AutoMapper/10.0.0": { + "type": "package", + "dependencies": { + "Microsoft.CSharp": "4.7.0", + "System.Reflection.Emit": "4.7.0" + }, + "compile": { + "lib/netstandard2.0/AutoMapper.dll": { + "related": ".xml" + } + }, diff --git a/OL.FrameCore.Repository.EF/DataContext.cs b/OL.FrameCore.Repository.EF/DataContext.cs new file mode 100644 index 0000000..a23eec6 --- /dev/null +++ b/OL.FrameCore.Repository.EF/DataContext.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Text; +using OL.FrameCore.Domain.Entity; + +namespace OL.FrameCore.Repository.EF +{ + public class DataContext : DbContext + { + public DataContext(DbContextOptions options) + : base(options) + { + + } diff --git a/OL.FrameCore.Repository.EF/DefaultDataContext.cs b/OL.FrameCore.Repository.EF/DefaultDataContext.cs new file mode 100644 index 0000000..c443bfd --- /dev/null +++ b/OL.FrameCore.Repository.EF/DefaultDataContext.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Repository.EF +{ + public class DefaultDataContext: DataContext + { + public DefaultDataContext(DbContextOptions options) + : base(options) + { + + } + diff --git a/OL.FrameCore.Repository.EF/OL.FrameCore.Repository.EF.csproj b/OL.FrameCore.Repository.EF/OL.FrameCore.Repository.EF.csproj new file mode 100644 index 0000000..8926583 --- /dev/null +++ b/OL.FrameCore.Repository.EF/OL.FrameCore.Repository.EF.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp3.1 + + + + + + + + + + + diff --git a/OL.FrameCore.Repository.EF/ReadOnlyDataContext.cs b/OL.FrameCore.Repository.EF/ReadOnlyDataContext.cs new file mode 100644 index 0000000..3bddf4f --- /dev/null +++ b/OL.FrameCore.Repository.EF/ReadOnlyDataContext.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using OL.FrameCore.Domain.Entity; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OL.FrameCore.Repository.EF +{ + public class ReadOnlyDataContext : DataContext + { + public ReadOnlyDataContext(DbContextOptions options) + : base(options) + { + + } diff --git a/OL.FrameCore.Repository.EF/bin/Debug/netcoreapp3.1/OL.FrameCore.Repository.EF.deps.json b/OL.FrameCore.Repository.EF/bin/Debug/netcoreapp3.1/OL.FrameCore.Repository.EF.deps.json new file mode 100644 index 0000000..0ff90ef --- /dev/null +++ b/OL.FrameCore.Repository.EF/bin/Debug/netcoreapp3.1/OL.FrameCore.Repository.EF.deps.json @@ -0,0 +1,15 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.1", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.1": { + "OL.FrameCore.Repository.EF/1.0.0": { + "dependencies": { + "Microsoft.EntityFrameworkCore.SqlServer": "2.1.1", + "OL.FrameCore.Domain": "1.0.0" + }, + "runtime": { + "OL.FrameCore.Repository.EF.dll": {} diff --git a/OL.FrameCore.Repository.EF/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs b/OL.FrameCore.Repository.EF/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs new file mode 100644 index 0000000..1b9b2f8 --- /dev/null +++ b/OL.FrameCore.Repository.EF/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = ".NET Core 3.1")] diff --git a/OL.FrameCore.Repository.EF/obj/Debug/netcoreapp3.1/OL.FrameCore.Repository.EF.AssemblyInfo.cs b/OL.FrameCore.Repository.EF/obj/Debug/netcoreapp3.1/OL.FrameCore.Repository.EF.AssemblyInfo.cs new file mode 100644 index 0000000..3d17a5b --- /dev/null +++ b/OL.FrameCore.Repository.EF/obj/Debug/netcoreapp3.1/OL.FrameCore.Repository.EF.AssemblyInfo.cs @@ -0,0 +1,15 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("OL.FrameCore.Repository.EF")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] diff --git a/OL.FrameCore.Repository.EF/obj/Debug/netcoreapp3.1/OL.FrameCore.Repository.EF.csproj.FileListAbsolute.txt b/OL.FrameCore.Repository.EF/obj/Debug/netcoreapp3.1/OL.FrameCore.Repository.EF.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..7d89ddf --- /dev/null +++ b/OL.FrameCore.Repository.EF/obj/Debug/netcoreapp3.1/OL.FrameCore.Repository.EF.csproj.FileListAbsolute.txt @@ -0,0 +1,13 @@ +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\bin\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.deps.json +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\bin\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\bin\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.pdb +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\bin\Debug\netcoreapp3.1\OL.FrameCore.Domain.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\bin\Debug\netcoreapp3.1\OL.FrameCore.Domain.pdb +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\obj\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.csproj.AssemblyReference.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\obj\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\obj\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.AssemblyInfoInputs.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\obj\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.AssemblyInfo.cs +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\obj\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.csproj.CoreCompileInputs.cache +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\obj\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.csproj.CopyComplete +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\obj\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.dll +C:\Users\coder\Desktop\2024Code\6\20240604\submit\1\OL.FrameCore-master\OL.FrameCore-master\src\OL.FrameCore.Repository.EF\obj\Debug\netcoreapp3.1\OL.FrameCore.Repository.EF.pdb diff --git a/OL.FrameCore.Repository.EF/obj/OL.FrameCore.Repository.EF.csproj.nuget.dgspec.json b/OL.FrameCore.Repository.EF/obj/OL.FrameCore.Repository.EF.csproj.nuget.dgspec.json new file mode 100644 index 0000000..7a92349 --- /dev/null +++ b/OL.FrameCore.Repository.EF/obj/OL.FrameCore.Repository.EF.csproj.nuget.dgspec.json @@ -0,0 +1,15 @@ +{ + "format": 1, + "restore": { + "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Repository.EF\\OL.FrameCore.Repository.EF.csproj": {} + }, + "projects": { + "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Domain\\OL.FrameCore.Domain.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Domain\\OL.FrameCore.Domain.csproj", + "projectName": "OL.FrameCore.Domain", + "projectPath": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Domain\\OL.FrameCore.Domain.csproj", + "packagesPath": "C:\\Users\\coder\\.nuget\\packages\\", + "outputPath": "C:\\Users\\coder\\Desktop\\2024Code\\6\\20240604\\submit\\1\\OL.FrameCore-master\\OL.FrameCore-master\\src\\OL.FrameCore.Domain\\obj\\", + "projectStyle": "PackageReference", diff --git a/OL.FrameCore.Repository.EF/obj/project.assets.json b/OL.FrameCore.Repository.EF/obj/project.assets.json new file mode 100644 index 0000000..8de5b54 --- /dev/null +++ b/OL.FrameCore.Repository.EF/obj/project.assets.json @@ -0,0 +1,15 @@ +{ + "version": 3, + "targets": { + ".NETCoreApp,Version=v3.1": { + "Microsoft.EntityFrameworkCore/2.1.1": { + "type": "package", + "dependencies": { + "Microsoft.EntityFrameworkCore.Abstractions": "2.1.1", + "Microsoft.EntityFrameworkCore.Analyzers": "2.1.1", + "Microsoft.Extensions.Caching.Memory": "2.1.1", + "Microsoft.Extensions.DependencyInjection": "2.1.1", + "Microsoft.Extensions.Logging": "2.1.1", + "Remotion.Linq": "2.2.0", + "System.Collections.Immutable": "1.5.0", + "System.ComponentModel.Annotations": "4.5.0", diff --git a/OL.FrameCore.WebUI/Code/AuthAttribute.cs b/OL.FrameCore.WebUI/Code/AuthAttribute.cs new file mode 100644 index 0000000..eb107fd --- /dev/null +++ b/OL.FrameCore.WebUI/Code/AuthAttribute.cs @@ -0,0 +1,15 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; +using NLog; +using OL.FrameCore.Application; +using OL.FrameCore.Application.User; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Claims; +using System.Threading.Tasks; + + +namespace OL.FrameCore.WebUI.Code diff --git a/OL.FrameCore.WebUI/Code/GlobalExceptionFilter.cs b/OL.FrameCore.WebUI/Code/GlobalExceptionFilter.cs new file mode 100644 index 0000000..4cd688f --- /dev/null +++ b/OL.FrameCore.WebUI/Code/GlobalExceptionFilter.cs @@ -0,0 +1,15 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.Hosting; +using NLog; +using OL.FrameCore.Application; +using OL.FrameCore.Application.SysLog; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Claims; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.Code diff --git a/OL.FrameCore.WebUI/Code/VisitFilterAttribute.cs b/OL.FrameCore.WebUI/Code/VisitFilterAttribute.cs new file mode 100644 index 0000000..0307edf --- /dev/null +++ b/OL.FrameCore.WebUI/Code/VisitFilterAttribute.cs @@ -0,0 +1,15 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc.Filters; +using NLog; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.Code +{ + public class VisitFilterAttribute : Attribute, IActionFilter + { + ILogger logger = LogManager.GetCurrentClassLogger(); + private readonly IHttpContextAccessor _httpContextAccessor; + diff --git a/OL.FrameCore.WebUI/Controllers/ArticleController.cs b/OL.FrameCore.WebUI/Controllers/ArticleController.cs new file mode 100644 index 0000000..cb0a795 --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/ArticleController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using OL.FrameCore.Application.Article; +using OL.FrameCore.Application.Article.Dto; +using OL.FrameCore.WebUI.Code; +using OL.FrameCore.WebUI.ViewModels.Article; + +namespace OL.FrameCore.WebUI.Controllers +{ + public class ArticleController : ControllerBase + { + IArticleService _articleService; diff --git a/OL.FrameCore.WebUI/Controllers/ArticleViewController.cs b/OL.FrameCore.WebUI/Controllers/ArticleViewController.cs new file mode 100644 index 0000000..8dd090a --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/ArticleViewController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using OL.FrameCore.Application.Article; +using OL.FrameCore.Application.Article.Dto; +using OL.FrameCore.WebUI.ViewModels.Article; + +namespace OL.FrameCore.WebUI.Controllers +{ + public class ArticleViewController : ControllerBase + { + IArticleService _articleService; + public ArticleViewController(IArticleService articleService) diff --git a/OL.FrameCore.WebUI/Controllers/CacheManageController.cs b/OL.FrameCore.WebUI/Controllers/CacheManageController.cs new file mode 100644 index 0000000..2c56aa6 --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/CacheManageController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using OL.FrameCore.Application.CacheManage; +using OL.FrameCore.Application.CacheManage.Dto; +using OL.FrameCore.WebUI.Code; +using OL.FrameCore.WebUI.ViewModels.CacheManage; + +namespace OL.FrameCore.WebUI.Controllers +{ + public class CacheManageController : ControllerBase + { + ICacheManageService _cacheManagerService; diff --git a/OL.FrameCore.WebUI/Controllers/CommonController.cs b/OL.FrameCore.WebUI/Controllers/CommonController.cs new file mode 100644 index 0000000..c0cefcc --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/CommonController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Security.Claims; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using OL.FrameCore.Infrastructure.Security; + +namespace OL.FrameCore.WebUI.Controllers +{ + public class CommonController : ControllerBase + { diff --git a/OL.FrameCore.WebUI/Controllers/ControllerBase.cs b/OL.FrameCore.WebUI/Controllers/ControllerBase.cs new file mode 100644 index 0000000..a383b1c --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/ControllerBase.cs @@ -0,0 +1,15 @@ +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Claims; +using System.Threading.Tasks; +using OL.FrameCore.Application; +using Microsoft.AspNetCore.Authorization; +using OL.FrameCore.WebUI.Code; +using OL.FrameCore.Infrastructure.Utility; +using OL.FrameCore.Infrastructure.Security; +using Microsoft.AspNetCore.Http; + +namespace OL.FrameCore.WebUI.Controllers +{ diff --git a/OL.FrameCore.WebUI/Controllers/DemoController.cs b/OL.FrameCore.WebUI/Controllers/DemoController.cs new file mode 100644 index 0000000..2967203 --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/DemoController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace OL.FrameCore.WebUI.Controllers +{ + public class DemoController : Controller + { + public IActionResult Index() + { + return View(); + } + diff --git a/OL.FrameCore.WebUI/Controllers/DeptController.cs b/OL.FrameCore.WebUI/Controllers/DeptController.cs new file mode 100644 index 0000000..8945ab2 --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/DeptController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using OL.FrameCore.Application.CommonData; +using OL.FrameCore.Application.Dept; +using OL.FrameCore.Application.Dept.Dto; +using OL.FrameCore.WebUI.Code; +using OL.FrameCore.WebUI.ViewModels; +using OL.FrameCore.WebUI.ViewModels.Dept; + +namespace OL.FrameCore.WebUI.Controllers +{ + public class DeptController : ControllerBase diff --git a/OL.FrameCore.WebUI/Controllers/HomeController.cs b/OL.FrameCore.WebUI/Controllers/HomeController.cs new file mode 100644 index 0000000..0518373 --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/HomeController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Security.Claims; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using OL.FrameCore.Application; +using OL.FrameCore.Application.Article; +using OL.FrameCore.Application.Home; +using OL.FrameCore.Application.Module; diff --git a/OL.FrameCore.WebUI/Controllers/ModuleController.cs b/OL.FrameCore.WebUI/Controllers/ModuleController.cs new file mode 100644 index 0000000..96ed45d --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/ModuleController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using OL.FrameCore.Application; +using OL.FrameCore.Application.CommonData; +using OL.FrameCore.Application.Module; +using OL.FrameCore.Application.Module.Dto; +using OL.FrameCore.Application.Module.Enum; +using OL.FrameCore.Infrastructure.Cache; +using OL.FrameCore.WebUI.Code; +using OL.FrameCore.WebUI.ViewModels; +using OL.FrameCore.WebUI.ViewModels.Module; + diff --git a/OL.FrameCore.WebUI/Controllers/PersonController.cs b/OL.FrameCore.WebUI/Controllers/PersonController.cs new file mode 100644 index 0000000..d72b8c4 --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/PersonController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using OL.FrameCore.Application.CommonData; +using OL.FrameCore.Application.Person; +using OL.FrameCore.Application.Person.Dto; +using OL.FrameCore.Application.User; +using OL.FrameCore.WebUI.ViewModels.Person; + +namespace OL.FrameCore.WebUI.Controllers +{ + public class PersonController : ControllerBase + { diff --git a/OL.FrameCore.WebUI/Controllers/RoleController.cs b/OL.FrameCore.WebUI/Controllers/RoleController.cs new file mode 100644 index 0000000..ebf492a --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/RoleController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using OL.FrameCore.Application; +using OL.FrameCore.Application.Role; +using OL.FrameCore.Application.Role.Dto; +using OL.FrameCore.Infrastructure.Cache; +using OL.FrameCore.WebUI.Code; +using OL.FrameCore.WebUI.ViewModels.Role; + +namespace OL.FrameCore.WebUI.Controllers +{ + public class RoleController : ControllerBase diff --git a/OL.FrameCore.WebUI/Controllers/SysLogController.cs b/OL.FrameCore.WebUI/Controllers/SysLogController.cs new file mode 100644 index 0000000..ab82191 --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/SysLogController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using OL.FrameCore.Application.SysLog; +using OL.FrameCore.Application.SysLog.Dto; +using OL.FrameCore.WebUI.Code; +using OL.FrameCore.WebUI.ViewModels.SysLog; + +namespace OL.FrameCore.WebUI.Controllers +{ + public class SysLogController : ControllerBase + { + ISysLogService _sysLogService; diff --git a/OL.FrameCore.WebUI/Controllers/UEditorController.cs b/OL.FrameCore.WebUI/Controllers/UEditorController.cs new file mode 100644 index 0000000..a06d22d --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/UEditorController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using UEditorNetCore; + +namespace OL.FrameCore.WebUI.Controllers +{ + [Route("api/[controller]")] + public class UEditorController : Controller + { + private UEditorService ue; + public UEditorController(UEditorService ue) + { diff --git a/OL.FrameCore.WebUI/Controllers/UserController.cs b/OL.FrameCore.WebUI/Controllers/UserController.cs new file mode 100644 index 0000000..439bbfd --- /dev/null +++ b/OL.FrameCore.WebUI/Controllers/UserController.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.StaticFiles; +using Newtonsoft.Json; +using OL.FrameCore.Application; +using OL.FrameCore.Application.CommonData; +using OL.FrameCore.Application.Dept; +using OL.FrameCore.Application.User; +using OL.FrameCore.Application.User.Dto; +using OL.FrameCore.Infrastructure.Cache; +using OL.FrameCore.Infrastructure.Document; diff --git a/OL.FrameCore.WebUI/Models/ErrorViewModel.cs b/OL.FrameCore.WebUI/Models/ErrorViewModel.cs new file mode 100644 index 0000000..51f7ba1 --- /dev/null +++ b/OL.FrameCore.WebUI/Models/ErrorViewModel.cs @@ -0,0 +1,11 @@ +using System; + +namespace OL.FrameCore.WebUI.Models +{ + public class ErrorViewModel + { + public string RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + } +} diff --git a/OL.FrameCore.WebUI/NLog.config b/OL.FrameCore.WebUI/NLog.config new file mode 100644 index 0000000..d1d9e0d --- /dev/null +++ b/OL.FrameCore.WebUI/NLog.config @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/OL.FrameCore.WebUI/Program.cs b/OL.FrameCore.WebUI/Program.cs new file mode 100644 index 0000000..090cf95 --- /dev/null +++ b/OL.FrameCore.WebUI/Program.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Autofac.Extensions.DependencyInjection; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace OL.FrameCore.WebUI +{ + public class Program diff --git a/OL.FrameCore.WebUI/Properties/launchSettings.json b/OL.FrameCore.WebUI/Properties/launchSettings.json new file mode 100644 index 0000000..da8b423 --- /dev/null +++ b/OL.FrameCore.WebUI/Properties/launchSettings.json @@ -0,0 +1,15 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:8456", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" diff --git a/OL.FrameCore.WebUI/Startup.cs b/OL.FrameCore.WebUI/Startup.cs new file mode 100644 index 0000000..eda3ae2 --- /dev/null +++ b/OL.FrameCore.WebUI/Startup.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Reflection; +using System.Runtime.Loader; +using System.Threading.Tasks; +using Autofac; +using Autofac.Extensions.DependencyInjection; +using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; diff --git a/OL.FrameCore.WebUI/TagHelpers/AuthTagHelper.cs b/OL.FrameCore.WebUI/TagHelpers/AuthTagHelper.cs new file mode 100644 index 0000000..efd3bd7 --- /dev/null +++ b/OL.FrameCore.WebUI/TagHelpers/AuthTagHelper.cs @@ -0,0 +1,15 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Razor.TagHelpers; +using OL.FrameCore.Application.User; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Security.Claims; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.TagHelpers +{ + [HtmlTargetElement("div", Attributes = "auth-code")] + [HtmlTargetElement("a", Attributes = "auth-code")] diff --git a/OL.FrameCore.WebUI/UeditorConfig.json b/OL.FrameCore.WebUI/UeditorConfig.json new file mode 100644 index 0000000..93cb6eb --- /dev/null +++ b/OL.FrameCore.WebUI/UeditorConfig.json @@ -0,0 +1,15 @@ +/* 前后端通信相关的配置,注释只允许使用多行方式 */ +{ + /* 上传图片配置项 */ + "imageActionName": "uploadimage", /* 执行上传图片的action名称 */ + "imageFieldName": "upfile", /* 提交的图片表单名称 */ + "imageMaxSize": 2048000, /* 上传大小限制,单位B */ + "imageAllowFiles": [ ".png", ".jpg", ".jpeg", ".gif", ".bmp" ], /* 上传图片格式显示 */ + "imageCompressEnable": true, /* 是否压缩图片,默认是true */ + "imageCompressBorder": 1600, /* 图片压缩最长边限制 */ + "imageInsertAlign": "none", /* 插入的图片浮动方式 */ + "imageUrlPrefix": "/", /* 图片访问路径前缀 */ + "imagePathFormat": "upload/article/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ + /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */ + /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */ + /* {time} 会替换成时间戳 */ diff --git a/OL.FrameCore.WebUI/ViewModels/Article/AddArticleViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Article/AddArticleViewRequest.cs new file mode 100644 index 0000000..34fec41 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Article/AddArticleViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Article +{ + public class AddArticleViewRequest + { + public int Id { get; set; } + public string Title { get; set; } + public string Content { get; set; } + public string Tags { get; set; } + public string Summary { get; set; } + public int ArticleType { get; set; } diff --git a/OL.FrameCore.WebUI/ViewModels/Article/GetArticleListViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Article/GetArticleListViewRequest.cs new file mode 100644 index 0000000..e522ba2 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Article/GetArticleListViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Article +{ + public class GetArticleListViewRequest + { + public int Id { get; set; } + public string Title { get; set; } + public string Tag { get; set; } + public int Status { get; set; } + + public DateTime BeginTime { get; set; } diff --git a/OL.FrameCore.WebUI/ViewModels/Article/UpdateArticleViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Article/UpdateArticleViewRequest.cs new file mode 100644 index 0000000..64135f0 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Article/UpdateArticleViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Article +{ + public class UpdateArticleViewRequest + { + public int Id { get; set; } + public string Title { get; set; } + public string Content { get; set; } + public string Tags { get; set; } + public string Summary { get; set; } + public int ArticleType { get; set; } diff --git a/OL.FrameCore.WebUI/ViewModels/CacheManage/GetCacheListViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/CacheManage/GetCacheListViewRequest.cs new file mode 100644 index 0000000..adb60cc --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/CacheManage/GetCacheListViewRequest.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.CacheManage +{ + public class GetCacheListViewRequest + { + public string Key { get; set; } + public int page { get; set; } = 1; + public int limit { get; set; } = 10; + } +} diff --git a/OL.FrameCore.WebUI/ViewModels/CacheManage/GetCacheListViewResponse.cs b/OL.FrameCore.WebUI/ViewModels/CacheManage/GetCacheListViewResponse.cs new file mode 100644 index 0000000..ca576d9 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/CacheManage/GetCacheListViewResponse.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.CacheManage +{ + public class GetCacheListViewResponse + { + public string CacheKey { get; set; } + public DateTime CreateTime { get; set; } + public DateTime ExpireTime { get; set; } + } +} diff --git a/OL.FrameCore.WebUI/ViewModels/Dept/GetDetpListViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Dept/GetDetpListViewRequest.cs new file mode 100644 index 0000000..9436a48 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Dept/GetDetpListViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Dept +{ + public class GetDetpListViewRequest + { + public int? DeptId { get; set; } + public string DeptName { get; set; } + public string DeptCode { get; set; } + public int? ParentId { get; set; } + public int page { get; set; } = 1; + public int limit { get; set; } = 10; diff --git a/OL.FrameCore.WebUI/ViewModels/Dept/PostAddOrUpdateDeptViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Dept/PostAddOrUpdateDeptViewRequest.cs new file mode 100644 index 0000000..e3d7c55 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Dept/PostAddOrUpdateDeptViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Dept +{ + public class PostAddOrUpdateDeptViewRequest + { + public int? Id { get; set; } + + [Required(ErrorMessage = "部门名称不能为空")] + [StringLength(20, ErrorMessage = "部门名称不能超过20个字符")] + diff --git a/OL.FrameCore.WebUI/ViewModels/MenuNodeView.cs b/OL.FrameCore.WebUI/ViewModels/MenuNodeView.cs new file mode 100644 index 0000000..7e15693 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/MenuNodeView.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels +{ + public class MenuNodeView + { + public int Id { get; set; } + public string Title { get; set; } + public string Url { get; set; } + public string Icon { get; set; } + public List ChildNodes { get; set; } + } diff --git a/OL.FrameCore.WebUI/ViewModels/Module/GetModuleListViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Module/GetModuleListViewRequest.cs new file mode 100644 index 0000000..2c12cc5 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Module/GetModuleListViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Module +{ + public class GetModuleListViewRequest + { + public int? Id { get; set; } + public string ModuleName { get; set; } + public string ModuleCode { get; set; } + //public int? ParentId { get; set; } + public int page { get; set; } = 1; + public int limit { get; set; } = 10; diff --git a/OL.FrameCore.WebUI/ViewModels/Module/PostAddOrUpdateModuleViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Module/PostAddOrUpdateModuleViewRequest.cs new file mode 100644 index 0000000..a3b3120 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Module/PostAddOrUpdateModuleViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Module +{ + public class PostAddOrUpdateModuleViewRequest + { + public int? Id { get; set; } + public string ModuleName { get; set; } + public string ModuleCode { get; set; } + public int ParentId { get; set; } + public bool IsMenu { get; set; } + public string MenuPath { get; set; } diff --git a/OL.FrameCore.WebUI/ViewModels/Person/GetLoginRecordListViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Person/GetLoginRecordListViewRequest.cs new file mode 100644 index 0000000..224887f --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Person/GetLoginRecordListViewRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Person +{ + public class GetLoginRecordListViewRequest + { + public int page { get; set; } = 1; + public int limit { get; set; } = 10; + } +} diff --git a/OL.FrameCore.WebUI/ViewModels/Person/UpdatePasswordViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Person/UpdatePasswordViewRequest.cs new file mode 100644 index 0000000..c765f8b --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Person/UpdatePasswordViewRequest.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Person +{ + public class UpdatePasswordViewRequest + { + public string OldPassword { get; set; } + public string NewPassword { get; set; } + public string RepeatPassword { get; set; } + } +} diff --git a/OL.FrameCore.WebUI/ViewModels/Person/UpdatePersonInfoViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Person/UpdatePersonInfoViewRequest.cs new file mode 100644 index 0000000..7b80716 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Person/UpdatePersonInfoViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Person +{ + public class UpdatePersonInfoViewRequest + { + public int UserId { get; set; } + //public string UserName { get; set; } + public string TrueName { get; set; } + public int Sex { get; set; } + public string Phone { get; set; } + public string Email { get; set; } diff --git a/OL.FrameCore.WebUI/ViewModels/Role/GetRoleListViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Role/GetRoleListViewRequest.cs new file mode 100644 index 0000000..0b9b8b1 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Role/GetRoleListViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Role +{ + public class GetRoleListViewRequest + { + public int? RoleId { get; set; } + public string RoleName { get; set; } + public int page { get; set; } = 1; + public int limit { get; set; } = 10; + } +} diff --git a/OL.FrameCore.WebUI/ViewModels/Role/PostAddOrUpdateViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/Role/PostAddOrUpdateViewRequest.cs new file mode 100644 index 0000000..5825df9 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/Role/PostAddOrUpdateViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.Role +{ + public class PostAddOrUpdateViewRequest + { + public int? Id { get; set; } + public string RoleName { get; set; } + public string Remark { get; set; } + public int[] AssignModules { get; set; } + } +} diff --git a/OL.FrameCore.WebUI/ViewModels/SysLog/GetErrorLogListViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/SysLog/GetErrorLogListViewRequest.cs new file mode 100644 index 0000000..a388901 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/SysLog/GetErrorLogListViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.SysLog +{ + public class GetErrorLogListViewRequest + { + public string ErrorInfo { get; set; } + public string IP { get; set; } + public string UserId { get; set; } + public DateTime BeginTime { get; set; } + public DateTime EndTime { get; set; } + diff --git a/OL.FrameCore.WebUI/ViewModels/SysLog/GetUserLoginLogListViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/SysLog/GetUserLoginLogListViewRequest.cs new file mode 100644 index 0000000..8a79583 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/SysLog/GetUserLoginLogListViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.SysLog +{ + public class GetUserLoginLogListViewRequest + { + public string UserName { get; set; } + public int? UserId { get; set; } + public int? LoginStatus { get; set; } + public string IP { get; set; } + public DateTime? BeginTime { get; set; } + public DateTime? EndTime { get; set; } diff --git a/OL.FrameCore.WebUI/ViewModels/SysLog/GetUserOperateLogListViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/SysLog/GetUserOperateLogListViewRequest.cs new file mode 100644 index 0000000..21a970a --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/SysLog/GetUserOperateLogListViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.SysLog +{ + public class GetUserOperateLogListViewRequest + { + public int? OperateId { get; set; } + public int? OperateType { get; set; } + public int? UserId { get; set; } + public DateTime? BeginTime { get; set; } + public DateTime? EndTime { get; set; } + diff --git a/OL.FrameCore.WebUI/ViewModels/TreeNodeView.cs b/OL.FrameCore.WebUI/ViewModels/TreeNodeView.cs new file mode 100644 index 0000000..cf96059 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/TreeNodeView.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels +{ + public class TreeNodeView + { + public int id { get; set; } + /// + /// 节点标题 + /// + public string title { get; set; } + /// diff --git a/OL.FrameCore.WebUI/ViewModels/User/GetUserListViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/User/GetUserListViewRequest.cs new file mode 100644 index 0000000..f699c16 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/User/GetUserListViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.User +{ + public class GetUserListViewRequest + { + public string userName { get; set; } + public string trueName { get; set; } + public int? deptId { get; set; } + public int? status { get; set; } + public int page { get; set; } = 1; + public int limit { get; set; } = 10; diff --git a/OL.FrameCore.WebUI/ViewModels/User/PostAddUserViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/User/PostAddUserViewRequest.cs new file mode 100644 index 0000000..8793360 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/User/PostAddUserViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.User +{ + public class PostAddUserViewRequest + { + [Required(ErrorMessage = "用户名不能为空")] + [StringLength(20, ErrorMessage = "用户名不能超过20个字符")] + public string UserName { get; set; } + + [Required(ErrorMessage = "密码不能为空")] diff --git a/OL.FrameCore.WebUI/ViewModels/User/PostAssignUserModuleViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/User/PostAssignUserModuleViewRequest.cs new file mode 100644 index 0000000..154ec94 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/User/PostAssignUserModuleViewRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.User +{ + public class PostAssignUserModuleViewRequest + { + public int Id { get; set; } + public int[] AssignModules { get; set; } + } +} diff --git a/OL.FrameCore.WebUI/ViewModels/User/PostAssignUserRoleViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/User/PostAssignUserRoleViewRequest.cs new file mode 100644 index 0000000..b5356f6 --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/User/PostAssignUserRoleViewRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.User +{ + public class PostAssignUserRoleViewRequest + { + public int Id { get; set; } + public int[] AssignRoles { get; set; } + } +} diff --git a/OL.FrameCore.WebUI/ViewModels/User/PostUpdateUserViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/User/PostUpdateUserViewRequest.cs new file mode 100644 index 0000000..34005ec --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/User/PostUpdateUserViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.User +{ + public class PostUpdateUserViewRequest + { + public int Id { get; set; } + + [Required(ErrorMessage = "用户名不能为空")] + [StringLength(20, ErrorMessage = "用户名不能超过20个字符")] + public string UserName { get; set; } diff --git a/OL.FrameCore.WebUI/ViewModels/User/RetsetPasswordViewRequest.cs b/OL.FrameCore.WebUI/ViewModels/User/RetsetPasswordViewRequest.cs new file mode 100644 index 0000000..7f7a50c --- /dev/null +++ b/OL.FrameCore.WebUI/ViewModels/User/RetsetPasswordViewRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; + +namespace OL.FrameCore.WebUI.ViewModels.User +{ + public class RetsetPasswordViewRequest + { + [Required(ErrorMessage = "找不到UserId")] + public int UserId { get; set; } + + [Required(ErrorMessage = "密码不能为空")] + [StringLength(20, ErrorMessage = "密码长度不能操作20个字符")] diff --git a/OL.FrameCore.WebUI/Views/Article/AddOrUpdate.cshtml b/OL.FrameCore.WebUI/Views/Article/AddOrUpdate.cshtml new file mode 100644 index 0000000..d7bcc53 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Article/AddOrUpdate.cshtml @@ -0,0 +1,15 @@ + +@{ + Layout = "~/Views/Shared/_LayoutDialog.cshtml"; +} +@model OL.FrameCore.Application.Article.Dto.GetArticleResponse +@section CSS{ + +} + +
+
+
+ +
+
diff --git a/OL.FrameCore.WebUI/Views/Article/Demo.cshtml b/OL.FrameCore.WebUI/Views/Article/Demo.cshtml new file mode 100644 index 0000000..97895c9 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Article/Demo.cshtml @@ -0,0 +1,15 @@ + +
+ +
+ + + + + + + diff --git a/OL.FrameCore.WebUI/Views/Dept/AddOrUpdateDept.cshtml b/OL.FrameCore.WebUI/Views/Dept/AddOrUpdateDept.cshtml new file mode 100644 index 0000000..f277719 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Dept/AddOrUpdateDept.cshtml @@ -0,0 +1,15 @@ + +@{ + Layout = "~/Views/Shared/_LayoutDialog.cshtml"; +} +@model OL.FrameCore.Application.Dept.Dto.GetDeptResponse +@section CSS{ + +} + + +
+
+ +
+
diff --git a/OL.FrameCore.WebUI/Views/Dept/Index.cshtml b/OL.FrameCore.WebUI/Views/Dept/Index.cshtml new file mode 100644 index 0000000..7a83c31 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Dept/Index.cshtml @@ -0,0 +1,15 @@ +@{ViewBag.TitleName = "部门管理";} + + +
+
+
    +
  • 部门管理
  • +
  • 部门树视图
  • +
+
+
+ +
+
+ diff --git a/OL.FrameCore.WebUI/Views/Dept/_DeptList.cshtml b/OL.FrameCore.WebUI/Views/Dept/_DeptList.cshtml new file mode 100644 index 0000000..7558f29 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Dept/_DeptList.cshtml @@ -0,0 +1,15 @@ +@addTagHelper OL.FrameCore.WebUI.TagHelpers.AuthTagHelper,OL.FrameCore.WebUI + +@*
+
管理部门信息列表
这里可以写些注意事项
+
*@ + +
+ +
+ +
+ +
+
+
diff --git a/OL.FrameCore.WebUI/Views/Dept/_DeptTree.cshtml b/OL.FrameCore.WebUI/Views/Dept/_DeptTree.cshtml new file mode 100644 index 0000000..fe45970 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Dept/_DeptTree.cshtml @@ -0,0 +1,15 @@ + + + + +
diff --git a/OL.FrameCore.WebUI/Views/Home/Login.cshtml b/OL.FrameCore.WebUI/Views/Home/Login.cshtml new file mode 100644 index 0000000..52ed9df --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Home/Login.cshtml @@ -0,0 +1,15 @@ + +@{ + Layout = null; +} + + + + + + 登录 + + + + +
OLFrame - 简单基础后台(.netcore)
diff --git a/OL.FrameCore.WebUI/Views/Home/Overview.cshtml b/OL.FrameCore.WebUI/Views/Home/Overview.cshtml new file mode 100644 index 0000000..41e5748 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Home/Overview.cshtml @@ -0,0 +1,15 @@ +@{ViewBag.TitleName = "概览";} +@section CSS{ + +} + + +
+
+
    +
  • 个人信息
  • +
  • 修改密码
  • +
  • 登录记录
  • +
+
diff --git a/OL.FrameCore.WebUI/Views/Role/AddOrUpdate.cshtml b/OL.FrameCore.WebUI/Views/Role/AddOrUpdate.cshtml new file mode 100644 index 0000000..a82b535 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Role/AddOrUpdate.cshtml @@ -0,0 +1,15 @@ + + +@{ + Layout = "~/Views/Shared/_LayoutDialog.cshtml"; +} +@model OL.FrameCore.Application.Role.Dto.GetRoleResponse +@section CSS{ + +} diff --git a/OL.FrameCore.WebUI/Views/Role/Index.cshtml b/OL.FrameCore.WebUI/Views/Role/Index.cshtml new file mode 100644 index 0000000..634dab3 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Role/Index.cshtml @@ -0,0 +1,15 @@ +@addTagHelper OL.FrameCore.WebUI.TagHelpers.AuthTagHelper,OL.FrameCore.WebUI +@{ViewBag.TitleName = "角色管理";} +@section CSS{ + +} + + +
+

角色管理

+
+ + @*
+
管理角色信息列表
这里可以写些注意事项
+
*@ diff --git a/OL.FrameCore.WebUI/Views/Shared/401.cshtml b/OL.FrameCore.WebUI/Views/Shared/401.cshtml new file mode 100644 index 0000000..182d275 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Shared/401.cshtml @@ -0,0 +1,15 @@ +@{ + Layout = null; +} + + + + 无权限 + + + + diff --git a/OL.FrameCore.WebUI/Views/Shared/Error.cshtml b/OL.FrameCore.WebUI/Views/Shared/Error.cshtml new file mode 100644 index 0000000..2350a3f --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Shared/Error.cshtml @@ -0,0 +1,15 @@ +@model ErrorViewModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + diff --git a/OL.FrameCore.WebUI/Views/Shared/_CookieConsentPartial.cshtml b/OL.FrameCore.WebUI/Views/Shared/_CookieConsentPartial.cshtml new file mode 100644 index 0000000..5249f08 --- /dev/null +++ b/OL.FrameCore.WebUI/Views/Shared/_CookieConsentPartial.cshtml @@ -0,0 +1,15 @@ +@using Microsoft.AspNetCore.Http.Features + +@{ + var consentFeature = Context.Features.Get(); + var showBanner = !consentFeature?.CanTrack ?? false; + var cookieString = consentFeature?.CreateConsentCookie(); +} + +@if (showBanner) +{ +