From f3f575a72bea49739cfc0538f0189108a96230bc Mon Sep 17 00:00:00 2001 From: wintel Date: Sun, 27 Aug 2023 20:02:51 +0800 Subject: [PATCH] =?UTF-8?q?fix=20issue=20#I7A7XF=20=E5=85=A8=E9=9D=A2?= =?UTF-8?q?=E6=94=AF=E6=8C=81SqlSugar=20Orm=E3=80=82=E8=AF=A6=E6=83=85?= =?UTF-8?q?=EF=BC=9Ahttp://doc.openauth.net.cn/core/sqlsugar.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenAuth.WebApi/Startup.cs | 20 ++++++++++++++++++++ docs/.vuepress/config.js | 12 ++++++++++-- docs/README.md | 2 +- docs/core/deploy.md | 2 +- docs/core/deployapi.md | 2 +- docs/core/faq.md | 2 +- docs/core/start.md | 6 +----- docs/core/unitwork.md | 2 +- 8 files changed, 36 insertions(+), 12 deletions(-) diff --git a/OpenAuth.WebApi/Startup.cs b/OpenAuth.WebApi/Startup.cs index 081b0a34..f0e07609 100644 --- a/OpenAuth.WebApi/Startup.cs +++ b/OpenAuth.WebApi/Startup.cs @@ -185,6 +185,11 @@ namespace OpenAuth.WebApi DbType = SqlSugar.DbType.SqlServer, ConnectionString = connectionString, IsAutoCloseConnection = true, + },db=>{ + db.Aop.OnLogExecuting = (sql, pars) => + { + logger.LogInformation(sql); + }; }); } else if(dbtypes.ContainsValue(Define.DBTYPE_MYSQL)) //mysql @@ -194,6 +199,11 @@ namespace OpenAuth.WebApi DbType = SqlSugar.DbType.MySql, ConnectionString = connectionString, IsAutoCloseConnection = true, + },db=>{ + db.Aop.OnLogExecuting = (sql, pars) => + { + logger.LogInformation(sql); + }; }); } else if(dbtypes.ContainsValue(Define.DBTYPE_PostgreSQL)) //PostgreSQL @@ -203,6 +213,11 @@ namespace OpenAuth.WebApi DbType = SqlSugar.DbType.PostgreSQL, ConnectionString = connectionString, IsAutoCloseConnection = true, + },db=>{ + db.Aop.OnLogExecuting = (sql, pars) => + { + logger.LogInformation(sql); + }; }); } else @@ -212,6 +227,11 @@ namespace OpenAuth.WebApi DbType = SqlSugar.DbType.Oracle, ConnectionString = connectionString, IsAutoCloseConnection = true, + },db=>{ + db.Aop.OnLogExecuting = (sql, pars) => + { + logger.LogInformation(sql); + }; }); } diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 5ed3f31f..c48366c2 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,3 +1,11 @@ +/* + * @Author: yubaolee | ahfu~ <954478625@qq.com> + * @Date: 2023-08-12 10:48:24 + * @LastEditTime: 2023-08-27 19:45:48 + * @Description: + * @ + * @Copyright (c) 2023 by yubaolee | ahfu~ , All Rights Reserved. +*/ module.exports = { title: 'OpenAuth.Net', description: '最好用的.net权限工作流框架,最好用的.net vue前后分离框架', @@ -45,7 +53,7 @@ module.exports = { ariaLabel: 'Proj Menu', items: [{ text: 'gitee', - link: 'https://gitee.com/yubaolee/OpenAuth.Core', + link: 'https://gitee.com/dotnetchina/OpenAuth.Net', target: '_blank' }, { @@ -74,7 +82,7 @@ module.exports = { path: 'start', // 可选的, 标题的跳转链接,应为绝对路径且必须存在 sidebarDepth: 1, // 可选的, 默认值是 1 collapsable: false, - children: ['start', 'specialist', 'deploy', 'deployapi', 'devnew', 'multidbs', 'multitenant', 'unitwork', 'entity', 'datavalidation', 'log', 'identity', 'job', 'cache', 'unittest'], + children: ['start', 'specialist', 'deploy', 'deployapi', 'devnew', 'multidbs', 'multitenant', 'unitwork','sqlsugar', 'entity', 'datavalidation', 'log', 'identity', 'job', 'cache', 'unittest'], }, { title: '权限控制', // 必要的 diff --git a/docs/README.md b/docs/README.md index 136671a7..11bc1042 100644 --- a/docs/README.md +++ b/docs/README.md @@ -17,7 +17,7 @@ features: - title: 功能强大 details: 组织机构、角色用户、数据权限、拖拽表单、工作流引擎、定时任务。 - title: 主流技术 - details: IdentityServer、EF core、Quartz、AutoFac、WebAPI、Swagger、Mock、NUnit、VUE、Element-ui。 + details: IdentityServer、EF、SqlSugar、Quartz、AutoFac、WebAPI、Swagger、Mock、NUnit、VUE2、VUE3、Element-ui、Element-plus。 footer: Copyright © 2023- yubaolee --- diff --git a/docs/core/deploy.md b/docs/core/deploy.md index 6b881cba..a9f21fc0 100644 --- a/docs/core/deploy.md +++ b/docs/core/deploy.md @@ -47,7 +47,7 @@ source /etc/profile ## jenkins部署OpenAuth.Mvc -OpenAuth.Core采用的是gitee托管源码,只需使用Gitee WebHook构建触发器。配置如下: +OpenAuth.Net采用的是gitee托管源码,只需使用Gitee WebHook构建触发器。配置如下: ![说明](/giteesource.png "说明") diff --git a/docs/core/deployapi.md b/docs/core/deployapi.md index 57fa6123..04b16738 100644 --- a/docs/core/deployapi.md +++ b/docs/core/deployapi.md @@ -46,7 +46,7 @@ source /etc/profile ## jenkins部署OpenAuth.WebApi -OpenAuth.Core采用的是gitee托管源码,只需使用Gitee WebHook构建触发器。配置如下: +OpenAuth.Net采用的是gitee托管源码,只需使用Gitee WebHook构建触发器。配置如下: ![说明](/giteesource.png "说明") diff --git a/docs/core/faq.md b/docs/core/faq.md index 1b36404a..27973156 100644 --- a/docs/core/faq.md +++ b/docs/core/faq.md @@ -43,7 +43,7 @@ b => b.UseRowNumberForPaging()); 即使用rownumber的分页方式。 当然最好的解决方式是升级SQL SERVER到2012或以上版本。 ::: warning 注意 -OpenAuth.Core 2.0及以后版本因为使用了.net core 3.1,该SDK已经放弃了这种方式,因此只能通过升级Sql Server的方式解决该问题 +目前.Net的SDK已经放弃了这种方式,因此只能通过升级Sql Server的方式解决该问题 ::: diff --git a/docs/core/start.md b/docs/core/start.md index d2711578..8e89878c 100644 --- a/docs/core/start.md +++ b/docs/core/start.md @@ -82,12 +82,8 @@ OpenAuth.Repository -> OpenAuthDB : 仓储层进行数据库操作 ## 打开项目 -使用Visual Studio 2019或Rider打开 `OpenAuth.Core.sln` +使用Visual Studio或Rider打开 `OpenAuth.Net.sln` ::: tip 提示 -v2.0及以后版本因使用.net core 3.1,必须使用visual Studio 2019及以上版本打开 - -v2.0以前的版本可以使用visual Studio 2017 - 如果开发使用的电脑安装有多个版本的SDK(如同时有.net core 3.1 和.Net 5/6/7..),可以在根目录新建一个`global.json`文件来指定.net版本,文件内容如下: ``` diff --git a/docs/core/unitwork.md b/docs/core/unitwork.md index 90980ff8..fe56da94 100644 --- a/docs/core/unitwork.md +++ b/docs/core/unitwork.md @@ -1,6 +1,6 @@ # 数据库读写及事务处理 -OpenAuth.Core使用Repository和Unitwork两种方式访问数据库。 +OpenAuth.Net使用Repository和Unitwork两种方式访问数据库。 ## 使用场景