72 Commits

Author SHA1 Message Date
tk
64c7f07df4 chore(release): 2.3.0 2024-12-12 18:15:30 +08:00
tk
4e4a1d0dff fix: 🐛 个性主题色冲突 2024-12-12 18:04:08 +08:00
tk
098cfc135e feat: 框架代码同步 2024-12-12 10:05:58 +08:00
tk
0285eea352 refactor: ♻️ 框架代码同步 2024-12-11 09:36:10 +08:00
tk
725662693b feat: 框架代码同步 2024-12-10 14:50:16 +08:00
tk
9504c96f40 style: 💄 code format
[skip ci]
2024-12-09 20:07:13 +08:00
tk
d1e4704adc revert: appConfig.js 2024-12-09 20:05:05 +08:00
tk
0b036e9d67 feat: 分组统计功能 2024-12-09 19:37:18 +08:00
tk
89846d9783 refactor: ♻️ enum 扩展方法 2024-12-07 15:27:07 +08:00
194eb89d31 chore: 🔨 移动端样式调整
[skip ci]
2024-12-06 21:46:07 +08:00
tk
d622111f53 refactor: ♻️ 生成前端apijs 2024-12-06 17:19:30 +08:00
tk
c2a2b27afd refactor: ♻️ curdModule 新增Edit方案
[skip ci]
2024-12-06 17:14:17 +08:00
tk
4228bd5c32 refactor: ♻️ 国家代码表重构
[skip ci]
2024-12-06 10:27:24 +08:00
tk
b24642e5c9 chore(release): 2.2.1 2024-12-04 16:36:31 +08:00
tk
4eecc0b4ce fix: 🐛 version lock
[skip ci]
2024-12-04 16:35:20 +08:00
tk
01058ba728 fix: 🐛 version 条件重复指定 2024-12-03 11:05:27 +08:00
a6f6a8f0a3 perf: nuget update 2024-11-29 22:42:47 +08:00
4f12b5064d Update README.md 2024-11-29 22:21:30 +08:00
2acf88cad1 style: 💄 code format 2024-11-29 22:13:01 +08:00
tk
180119019c chore: 🔨 sys_Menu.json
[skip ci]
2024-11-29 18:22:07 +08:00
tk
f5203782aa chore: 🔨 iSelect 扩展方法增强
[skip ci]
2024-11-29 17:44:13 +08:00
tk
4874a58eee perf: nuget update 2024-11-29 17:40:19 +08:00
tk
b4ca6d5626 style: 💄 解决方案文件段落整理
[skip ci]
2024-11-29 11:16:26 +08:00
tk
63d7a3ed4a refactor: ♻️ iSelect 扩展方法
[skip ci]
2024-11-29 11:08:37 +08:00
ef2a0c3280 fix: 🐛 editUser 2024-11-29 09:28:05 +08:00
c69655e353 build: 📦 refs update
[skip ci]
2024-11-29 00:35:42 +08:00
f0e1155ee8 build: 📦 修复项目引用路径问题
[skip ci]
2024-11-29 00:30:10 +08:00
03745ff767 build: 📦 更新子模块
[skip ci]
2024-11-28 23:24:03 +08:00
ee94d47551 refactor: ♻️ freeSql 重编译版本
[skip ci]
2024-11-28 23:18:25 +08:00
155deedd15 refactor: ♻️ 减少一些条件编译语句 (#229)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-28 15:51:09 +08:00
a0a04590c9 build: 📦 rename.csx (#228)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-28 10:27:47 +08:00
c88c8d293d fix: 🐛 按钮文字提示 (#227)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-27 18:38:52 +08:00
7501138e31 chore: 🔨 界面优化 (#226)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-27 17:58:38 +08:00
cb75d19202 Merge pull request #225 from nsnail/release
chore(release): 2.2.0
2024-11-27 16:54:46 +08:00
tk
e8a2d27c00 chore(release): 2.2.0 2024-11-27 16:54:27 +08:00
440c7ffcb9 chore: 🔨 分享文档链接按钮 (#224)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-27 16:54:15 +08:00
e8b568426b chore: 🔨 增加一个图标 (#223)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-27 16:20:17 +08:00
37b45c9f36 perf: npm update (#222)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-27 16:04:12 +08:00
7ed30406c9 feat: 文档管理 (#221)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-27 15:52:23 +08:00
71bfdaafa8 fix: 🐛 用户选择器报错 (#220)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-26 10:10:25 +08:00
cec96390a5 refactor: ♻️ 精简前端组件 (#219) 2024-11-25 22:30:45 +08:00
0e412db6ce perf: nuget update (#218)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-25 17:57:19 +08:00
4d857f1861 feat: select-filter badge icon (#217)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-25 10:53:57 +08:00
d74a7e13ef perf: npm update (#216)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-22 18:13:17 +08:00
2f16efd291 refactor: ♻️ 样式优化 (#215)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-22 18:12:03 +08:00
81d9b0b3bb feat: 菜单复制 (#214)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-22 14:04:33 +08:00
ef2f0de095 fix: 🐛 导出界面报错 (#213)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-22 13:23:32 +08:00
6d87d8e9cd chore: 🔨 用户管理-角色排序 (#212)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-22 12:11:10 +08:00
69dc407002 chore: 🔨 userbar下拉菜单弹出方式 (#211)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-22 11:52:55 +08:00
6c71c74a27 fix: 🐛 请求日志批量插入,漏写了登录日志 (#210)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-22 11:16:18 +08:00
4e9f605ea2 fix: 🐛 idd (#208) 2024-11-16 14:40:21 +08:00
d28d7e9a18 chore: 🔨 导出文件时,如勾选,只导出勾选项 (#207) 2024-11-16 12:44:32 +08:00
a6018edb87 style: 💄 code format (#206)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-15 19:22:06 +08:00
841a4195e7 fix: 🐛 导出文件的responseType (#205)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-15 18:34:45 +08:00
5e9b67bca8 refactor: ♻️ 精简框架分层 (#204)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-15 18:27:21 +08:00
76e5fdcd94 Merge pull request #203 from nsnail/release
chore(release): 2.1.0

[skip ci]
2024-11-15 16:48:47 +08:00
tk
c68f695555 chore(release): 2.1.0 2024-11-15 16:48:25 +08:00
587b22014d style: 💄 code format (#202)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-15 16:44:54 +08:00
2f300285aa feat: 首页仪表板自定义布局 (#201)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-15 15:46:15 +08:00
1743f4ff28 build: 📦 添加git子模块 (#200)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-13 19:00:15 +08:00
7fc5fca5d9 build: 📦 nuget package与 project refrence 切换脚本 (#199)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-13 18:50:24 +08:00
d8dbb28cfc fix: 🐛 404 (#198)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-12 19:01:07 +08:00
27aafacd54 Tk (#197)
* refactor: ♻️ 业务代码项目文件名与框架代码项目文件名区分

* refactor: ♻️ 业务代码项目文件名与框架代码项目文件名区分

---------

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-12 18:44:13 +08:00
e6ce5afd99 refactor: ♻️ 业务代码项目文件名与框架代码项目文件名区分 (#196)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-12 18:34:14 +08:00
d1503a859b docs: 📝 rEADME (#195)
[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-12 17:57:36 +08:00
26e3698f57 fix: 🐛 --el-color-primary 变量有闪烁现象 (#194)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-12 10:33:53 +08:00
3069b8fbc4 fix: 🐛 module name (#193)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-11 16:36:19 +08:00
4d63bd6bf5 refactor: ♻️ 主题颜色变量封装 (#192)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-11 16:14:51 +08:00
f00046265a refactor: ♻️ 取消插入种子数据后退出程序 (#191) 2024-11-08 20:43:20 +08:00
0848c8b7e5 refactor: ♻️ seedDataInsertedEventAsync (#190)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-08 14:55:35 +08:00
8479f69bdc feat: 用户选择器 (#189)
Co-authored-by: tk <fiyne1a@dingtalk.com>
2024-11-06 11:48:36 +08:00
a454f2ab2d Merge pull request #187 from nsnail/release
chore(release): 2.0.0
[skip ci]
2024-11-04 17:23:27 +08:00
817 changed files with 10913 additions and 7533 deletions

View File

@ -0,0 +1 @@
drone workflows

View File

@ -37,8 +37,8 @@ jobs:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget
- working-directory: ./src/backend/NetAdmin.AdmServer.Host
run: dotnet publish NetAdmin.AdmServer.Host.csproj -c Release
- working-directory: ./src/backend/YourSolution.AdmServer.Host
run: dotnet publish YourSolution.AdmServer.Host.csproj -c Release
- run: docker build -t nsnail/netadmin:nightly .
- uses: docker/login-action@v3
with:

View File

@ -37,8 +37,8 @@ jobs:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget
- working-directory: ./src/backend/NetAdmin.AdmServer.Host
run: dotnet publish NetAdmin.AdmServer.Host.csproj -c Release
- working-directory: ./src/backend/YourSolution.AdmServer.Host
run: dotnet publish YourSolution.AdmServer.Host.csproj -c Release
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1
.gitignore vendored
View File

@ -397,7 +397,6 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
.idea/
!src/backend/CloudCode.DataGrip/.idea
# User Define
dist/

6
.gitmodules vendored
View File

@ -4,6 +4,6 @@
[submodule "refs/ns-ext"]
path = refs/ns-ext
url = https://github.com/nsnail/ns-ext.git
[submodule "refs/FreeSql"]
path = refs/FreeSql
url = https://github.com/nsnail/FreeSql.git
[submodule "refs/NetAdmin.FreeSql"]
path = refs/NetAdmin.FreeSql
url = https://github.com/nsnail/NetAdmin.FreeSql.git

View File

@ -2,6 +2,87 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [2.3.0](https://github.com/nsnail/NetAdmin/compare/v2.1.0...v2.3.0) (2024-12-12)
### Features
* ✨ 菜单复制 ([#214](https://github.com/nsnail/NetAdmin/issues/214)) ([81d9b0b](https://github.com/nsnail/NetAdmin/commit/81d9b0b3bb280661ceffa61aa6e9d612fb7ec52c))
* ✨ 分组统计功能 ([0b036e9](https://github.com/nsnail/NetAdmin/commit/0b036e9d67ffdf7a07c772606009f02744e6a3c3))
* ✨ 框架代码同步 ([098cfc1](https://github.com/nsnail/NetAdmin/commit/098cfc135e781a0cf172cd1289e5e871c7a76419))
* ✨ 框架代码同步 ([7256626](https://github.com/nsnail/NetAdmin/commit/725662693b7b47f6fae4c1917dd8d80220c7640a))
* ✨ 文档管理 ([#221](https://github.com/nsnail/NetAdmin/issues/221)) ([7ed3040](https://github.com/nsnail/NetAdmin/commit/7ed30406c9f721a12f0b756ec8884a1882242b93))
* ✨ select-filter badge icon ([#217](https://github.com/nsnail/NetAdmin/issues/217)) ([4d857f1](https://github.com/nsnail/NetAdmin/commit/4d857f1861b1256980e7cc59e2ab6a5f7d966da2))
### Bug Fixes
* 🐛 按钮文字提示 ([#227](https://github.com/nsnail/NetAdmin/issues/227)) ([c88c8d2](https://github.com/nsnail/NetAdmin/commit/c88c8d293d44f2707f3b5232e6a40a141af9981c))
* 🐛 导出界面报错 ([#213](https://github.com/nsnail/NetAdmin/issues/213)) ([ef2f0de](https://github.com/nsnail/NetAdmin/commit/ef2f0de095e314f34bec21c0a2ccdb51423a163b))
* 🐛 导出文件的responseType ([#205](https://github.com/nsnail/NetAdmin/issues/205)) ([841a419](https://github.com/nsnail/NetAdmin/commit/841a4195e77aa96e3c6c72626c1add3f71a310aa))
* 🐛 个性主题色冲突 ([4e4a1d0](https://github.com/nsnail/NetAdmin/commit/4e4a1d0dff7f3698e9a9cfcf46368260cfd70cbd))
* 🐛 请求日志批量插入,漏写了登录日志 ([#210](https://github.com/nsnail/NetAdmin/issues/210)) ([6c71c74](https://github.com/nsnail/NetAdmin/commit/6c71c74a27617c7d0530a5f6eaff650ecfd4eaec))
* 🐛 用户选择器报错 ([#220](https://github.com/nsnail/NetAdmin/issues/220)) ([71bfdaa](https://github.com/nsnail/NetAdmin/commit/71bfdaafa8176cf686b03244ee758de058080a71))
* 🐛 editUser ([ef2a0c3](https://github.com/nsnail/NetAdmin/commit/ef2a0c3280532ac24889279e4780a1b1a2561a6b))
* 🐛 idd ([#208](https://github.com/nsnail/NetAdmin/issues/208)) ([4e9f605](https://github.com/nsnail/NetAdmin/commit/4e9f605ea2cc6fe394068cfea5638e51920b9096))
* 🐛 version 条件重复指定 ([01058ba](https://github.com/nsnail/NetAdmin/commit/01058ba7288bcc645f66de2f78e1d659d55333cf))
* 🐛 version lock ([4eecc0b](https://github.com/nsnail/NetAdmin/commit/4eecc0b4ce09f620f83109949e4c2b67b7f8ba90))
### [2.2.1](https://github.com/nsnail/NetAdmin/compare/v2.1.0...v2.2.1) (2024-12-04)
### Features
* ✨ 菜单复制 ([#214](https://github.com/nsnail/NetAdmin/issues/214)) ([81d9b0b](https://github.com/nsnail/NetAdmin/commit/81d9b0b3bb280661ceffa61aa6e9d612fb7ec52c))
* ✨ 文档管理 ([#221](https://github.com/nsnail/NetAdmin/issues/221)) ([7ed3040](https://github.com/nsnail/NetAdmin/commit/7ed30406c9f721a12f0b756ec8884a1882242b93))
* ✨ select-filter badge icon ([#217](https://github.com/nsnail/NetAdmin/issues/217)) ([4d857f1](https://github.com/nsnail/NetAdmin/commit/4d857f1861b1256980e7cc59e2ab6a5f7d966da2))
### Bug Fixes
* 🐛 按钮文字提示 ([#227](https://github.com/nsnail/NetAdmin/issues/227)) ([c88c8d2](https://github.com/nsnail/NetAdmin/commit/c88c8d293d44f2707f3b5232e6a40a141af9981c))
* 🐛 导出界面报错 ([#213](https://github.com/nsnail/NetAdmin/issues/213)) ([ef2f0de](https://github.com/nsnail/NetAdmin/commit/ef2f0de095e314f34bec21c0a2ccdb51423a163b))
* 🐛 导出文件的responseType ([#205](https://github.com/nsnail/NetAdmin/issues/205)) ([841a419](https://github.com/nsnail/NetAdmin/commit/841a4195e77aa96e3c6c72626c1add3f71a310aa))
* 🐛 请求日志批量插入,漏写了登录日志 ([#210](https://github.com/nsnail/NetAdmin/issues/210)) ([6c71c74](https://github.com/nsnail/NetAdmin/commit/6c71c74a27617c7d0530a5f6eaff650ecfd4eaec))
* 🐛 用户选择器报错 ([#220](https://github.com/nsnail/NetAdmin/issues/220)) ([71bfdaa](https://github.com/nsnail/NetAdmin/commit/71bfdaafa8176cf686b03244ee758de058080a71))
* 🐛 editUser ([ef2a0c3](https://github.com/nsnail/NetAdmin/commit/ef2a0c3280532ac24889279e4780a1b1a2561a6b))
* 🐛 idd ([#208](https://github.com/nsnail/NetAdmin/issues/208)) ([4e9f605](https://github.com/nsnail/NetAdmin/commit/4e9f605ea2cc6fe394068cfea5638e51920b9096))
* 🐛 version 条件重复指定 ([01058ba](https://github.com/nsnail/NetAdmin/commit/01058ba7288bcc645f66de2f78e1d659d55333cf))
* 🐛 version lock ([4eecc0b](https://github.com/nsnail/NetAdmin/commit/4eecc0b4ce09f620f83109949e4c2b67b7f8ba90))
## [2.2.0](https://github.com/nsnail/NetAdmin/compare/v2.1.0...v2.2.0) (2024-11-27)
### Features
* ✨ 菜单复制 ([#214](https://github.com/nsnail/NetAdmin/issues/214)) ([81d9b0b](https://github.com/nsnail/NetAdmin/commit/81d9b0b3bb280661ceffa61aa6e9d612fb7ec52c))
* ✨ 文档管理 ([#221](https://github.com/nsnail/NetAdmin/issues/221)) ([7ed3040](https://github.com/nsnail/NetAdmin/commit/7ed30406c9f721a12f0b756ec8884a1882242b93))
* ✨ select-filter badge icon ([#217](https://github.com/nsnail/NetAdmin/issues/217)) ([4d857f1](https://github.com/nsnail/NetAdmin/commit/4d857f1861b1256980e7cc59e2ab6a5f7d966da2))
### Bug Fixes
* 🐛 导出界面报错 ([#213](https://github.com/nsnail/NetAdmin/issues/213)) ([ef2f0de](https://github.com/nsnail/NetAdmin/commit/ef2f0de095e314f34bec21c0a2ccdb51423a163b))
* 🐛 导出文件的responseType ([#205](https://github.com/nsnail/NetAdmin/issues/205)) ([841a419](https://github.com/nsnail/NetAdmin/commit/841a4195e77aa96e3c6c72626c1add3f71a310aa))
* 🐛 请求日志批量插入,漏写了登录日志 ([#210](https://github.com/nsnail/NetAdmin/issues/210)) ([6c71c74](https://github.com/nsnail/NetAdmin/commit/6c71c74a27617c7d0530a5f6eaff650ecfd4eaec))
* 🐛 用户选择器报错 ([#220](https://github.com/nsnail/NetAdmin/issues/220)) ([71bfdaa](https://github.com/nsnail/NetAdmin/commit/71bfdaafa8176cf686b03244ee758de058080a71))
* 🐛 idd ([#208](https://github.com/nsnail/NetAdmin/issues/208)) ([4e9f605](https://github.com/nsnail/NetAdmin/commit/4e9f605ea2cc6fe394068cfea5638e51920b9096))
## [2.1.0](https://github.com/nsnail/NetAdmin/compare/v2.0.0...v2.1.0) (2024-11-15)
### Features
* ✨ 首页仪表板自定义布局 ([#201](https://github.com/nsnail/NetAdmin/issues/201)) ([2f30028](https://github.com/nsnail/NetAdmin/commit/2f300285aa2afbfaea1fd9ffe299cc2badf98e0f))
* ✨ 用户选择器 ([#189](https://github.com/nsnail/NetAdmin/issues/189)) ([8479f69](https://github.com/nsnail/NetAdmin/commit/8479f69bdccac93a497e039dd01e18333ec2bbdc))
### Bug Fixes
* 🐛 --el-color-primary 变量有闪烁现象 ([#194](https://github.com/nsnail/NetAdmin/issues/194)) ([26e3698](https://github.com/nsnail/NetAdmin/commit/26e3698f57a2986f3b727fa38f293ca40c89f3ab))
* 🐛 404 ([#198](https://github.com/nsnail/NetAdmin/issues/198)) ([d8dbb28](https://github.com/nsnail/NetAdmin/commit/d8dbb28cfc8ad427062eb8d81be67cc25ded6fb6))
* 🐛 module name ([#193](https://github.com/nsnail/NetAdmin/issues/193)) ([3069b8f](https://github.com/nsnail/NetAdmin/commit/3069b8fbc451c4c257becf0523ab6ea6cc9af7e2))
## [2.0.0](https://github.com/nsnail/NetAdmin/compare/v1.6.0...v2.0.0) (2024-11-04)

View File

@ -10,8 +10,8 @@
<Authors>nsnail</Authors>
<BaseIntermediateOutputPath>$(SolutionDir)/dist/backend/$(MSBuildProjectName)/obj</BaseIntermediateOutputPath>
<BaseOutputPath>$(SolutionDir)/dist/backend/$(MSBuildProjectName)/bin</BaseOutputPath>
<Copyright>© 2006-2023 nsnail</Copyright>
<Description>通用后台权限管理系统、快速开发框架基于C#12/.NET9、Vue3/Vite、Element Plus等现代技术构建具有十分整洁、优雅的编码规范</Description>
<Copyright>© 2006-2024 nsnail</Copyright>
<Description>通用后台权限管理系统、快速开发框架基于C#13/.NET9、Vue3/Vite、ElementPlus等现代技术构建具有十分整洁、优雅的编码规范</Description>
<EnableBaseIntermediateOutputPathMismatchWarning>false</EnableBaseIntermediateOutputPathMismatchWarning>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ImplicitUsings>enable</ImplicitUsings>
@ -32,6 +32,6 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="../GlobalUsings.cs" Link="GlobalUsings.cs" />
<Compile Include="$(SolutionDir)/src/backend/GlobalUsings.cs" Link="GlobalUsings.cs" />
</ItemGroup>
</Project>

View File

@ -3,5 +3,5 @@ WORKDIR /app
EXPOSE 8080
RUN apt update
RUN apt install -y redis
COPY ./dist/backend/NetAdmin.AdmServer.Host/bin/Release/net9.0/publish .
ENTRYPOINT redis-server --daemonize yes && dotnet NetAdmin.AdmServer.Host.dll -is
COPY ./dist/backend/YourSolution.AdmServer.Host/bin/Release/net9.0/publish .
ENTRYPOINT redis-server --daemonize yes && dotnet YourSolution.AdmServer.Host.dll -is

View File

@ -1,12 +1,42 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C84EB5A0-37AD-4B17-A51E-E36888C4441E}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".drone", ".drone", "{3E408077-E73E-45CE-A53A-EF5F9DAE4B46}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "backend", "backend", "{4DAF9366-855F-46BB-AE4C-660C92FA0697}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{BB5BB244-E7D2-4368-8C18-C1C0ED1E12D1}"
ProjectSection(SolutionItems) = preProject
README.md = .drone/workflows/README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1129FE25-466B-4F4F-85FC-3752664245E1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3C6F049E-3EE8-4D66-9AFF-E8A369032487}"
ProjectSection(SolutionItems) = preProject
nightly-build.yml = .github/workflows/nightly-build.yml
README.md = .github/workflows/README.md
release.yml = .github/workflows/release.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{8E4C93BA-9493-4892-80C4-5E174C504829}"
ProjectSection(SolutionItems) = preProject
code.quality.props = build/code.quality.props
copy.pkg.xml.comment.files.targets = build/copy.pkg.xml.comment.files.targets
minver.targets = build/minver.targets
prebuild.targets = build/prebuild.targets
stylecop.analyzers.ruleset = build/stylecop.analyzers.ruleset
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{E80A1018-C354-4A26-9029-8847BB9DA864}"
ProjectSection(SolutionItems) = preProject
README.md = docker/README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{5198A03D-0CAC-4828-A807-34A693F73859}"
ProjectSection(SolutionItems) = preProject
.commitlintrc.js = .commitlintrc.js
@ -26,12 +56,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{5198A03D-0
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{BB0B25C9-0901-4923-913F-00F9A6B352A5}"
ProjectSection(SolutionItems) = preProject
1.git.pull.request.ps1 = scripts/1.git.pull.request.ps1
2.git.release.ps1 = scripts/2.git.release.ps1
3.git.recreate.branch.ps1 = scripts/3.git.recreate.branch.ps1
4.git.del.obsolete.tags.ps1 = scripts/4.git.del.obsolete.tags.ps1
5.git.update.submodule.ps1 = scripts/5.git.update.submodule.ps1
clean.ln.csx = scripts/clean.ln.csx
code.clean.csx = scripts/code.clean.csx
code.clean.ps1 = scripts/code.clean.ps1
@ -44,55 +76,39 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{BB0B
install.as.tpl.ps1 = scripts/install.as.tpl.ps1
rename.csx = scripts/rename.csx
resharper.full.ps1 = scripts/resharper.full.ps1
switcher.freesql.json = scripts/switcher.freesql.json
switcher.gurion.json = scripts/switcher.gurion.json
switcher.nsext.json = scripts/switcher.nsext.json
switcher.ps1 = scripts/switcher.ps1
switch.nuget.or.project.csx = scripts/switch.nuget.or.project.csx
sync.sln.files.csx = scripts/sync.sln.files.csx
wait.server.stop.sh = scripts/wait.server.stop.sh
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1129FE25-466B-4F4F-85FC-3752664245E1}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C84EB5A0-37AD-4B17-A51E-E36888C4441E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3C6F049E-3EE8-4D66-9AFF-E8A369032487}"
ProjectSection(SolutionItems) = preProject
nightly-build.yml = .github/workflows/nightly-build.yml
README.md = .github/workflows/README.md
release.yml = .github/workflows/release.yml
EndProjectSection
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "backend", "backend", "{4DAF9366-855F-46BB-AE4C-660C92FA0697}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{8E4C93BA-9493-4892-80C4-5E174C504829}"
ProjectSection(SolutionItems) = preProject
code.quality.props = build/code.quality.props
copy.pkg.xml.comment.files.targets = build/copy.pkg.xml.comment.files.targets
minver.targets = build/minver.targets
prebuild.targets = build/prebuild.targets
stylecop.analyzers.ruleset = build/stylecop.analyzers.ruleset
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Infrastructure", "src\backend\NetAdmin\NetAdmin.Infrastructure\NetAdmin.Infrastructure.csproj", "{1E62C322-EE42-4699-A6F1-791C53EFA62D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Infrastructure", "src\backend\NetAdmin.Infrastructure\NetAdmin.Infrastructure.csproj", "{1E62C322-EE42-4699-A6F1-791C53EFA62D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YourSolution.AdmServer.Application", "src\backend\YourSolution.AdmServer.Application\YourSolution.AdmServer.Application.csproj", "{E38B2EB4-D7A5-4777-9236-3B348919DF23}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.AdmServer.Application", "src\backend\NetAdmin.AdmServer.Application\NetAdmin.AdmServer.Application.csproj", "{E38B2EB4-D7A5-4777-9236-3B348919DF23}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.AdmServer.Host", "src\backend\NetAdmin.AdmServer.Host\NetAdmin.AdmServer.Host.csproj", "{CE895E44-EEC3-4ECE-A56A-8A82E7D863E3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YourSolution.AdmServer.Host", "src\backend\YourSolution.AdmServer.Host\YourSolution.AdmServer.Host.csproj", "{CE895E44-EEC3-4ECE-A56A-8A82E7D863E3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "03.hosted-servers", "03.hosted-servers", "{12AE5B4B-CB1A-498E-83B8-04E201E31D86}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Domain", "src\backend\NetAdmin.Domain\NetAdmin.Domain.csproj", "{58509C57-09FA-4E3C-BC07-78E786A2A326}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Domain", "src\backend\NetAdmin\NetAdmin.Domain\NetAdmin.Domain.csproj", "{58509C57-09FA-4E3C-BC07-78E786A2A326}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Application", "src\backend\NetAdmin.Application\NetAdmin.Application.csproj", "{70C54E1B-2083-4196-AB68-34CAF0075D82}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Application", "src\backend\NetAdmin\NetAdmin.Application\NetAdmin.Application.csproj", "{70C54E1B-2083-4196-AB68-34CAF0075D82}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Host", "src\backend\NetAdmin.Host\NetAdmin.Host.csproj", "{91839A15-D08F-4848-A301-F793412BC688}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Host", "src\backend\NetAdmin\NetAdmin.Host\NetAdmin.Host.csproj", "{91839A15-D08F-4848-A301-F793412BC688}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Cache", "src\backend\NetAdmin.Cache\NetAdmin.Cache.csproj", "{91452C22-4B57-4F16-9AF6-42C7BF830504}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Cache", "src\backend\NetAdmin\NetAdmin.Cache\NetAdmin.Cache.csproj", "{91452C22-4B57-4F16-9AF6-42C7BF830504}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.AdmServer.Cache", "src\backend\NetAdmin.AdmServer.Cache\NetAdmin.AdmServer.Cache.csproj", "{7CB632D3-3635-4F8D-AFE7-F496D37D422B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YourSolution.AdmServer.Cache", "src\backend\YourSolution.AdmServer.Cache\YourSolution.AdmServer.Cache.csproj", "{7CB632D3-3635-4F8D-AFE7-F496D37D422B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.SysComponent.Host", "src\backend\NetAdmin.SysComponent.Host\NetAdmin.SysComponent.Host.csproj", "{C2CC1596-3BEE-43EA-A9BE-4EDE5716296C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.SysComponent.Host", "src\backend\NetAdmin\NetAdmin.SysComponent.Host\NetAdmin.SysComponent.Host.csproj", "{C2CC1596-3BEE-43EA-A9BE-4EDE5716296C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.SysComponent.Cache", "src\backend\NetAdmin.SysComponent.Cache\NetAdmin.SysComponent.Cache.csproj", "{19872A4C-3C9A-4C62-A33B-74F5B8D6F77C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.SysComponent.Cache", "src\backend\NetAdmin\NetAdmin.SysComponent.Cache\NetAdmin.SysComponent.Cache.csproj", "{19872A4C-3C9A-4C62-A33B-74F5B8D6F77C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.SysComponent.Application", "src\backend\NetAdmin.SysComponent.Application\NetAdmin.SysComponent.Application.csproj", "{34650E82-D257-46DA-BD6B-DE307113347B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.SysComponent.Application", "src\backend\NetAdmin\NetAdmin.SysComponent.Application\NetAdmin.SysComponent.Application.csproj", "{34650E82-D257-46DA-BD6B-DE307113347B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "02.components", "02.components", "{3F23258D-8299-4992-9F51-2EE9B52CF9D2}"
EndProject
@ -104,21 +120,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "05.tools", "05.tools", "{79
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "src\backend\UnitTests\UnitTests.csproj", "{C7F27698-DA05-4ACD-B0D7-4791B3972002}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Tests", "src\backend\NetAdmin.Tests\NetAdmin.Tests.csproj", "{00604162-C444-478B-B773-3AB23C856CA7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.Tests", "src\backend\NetAdmin\NetAdmin.Tests\NetAdmin.Tests.csproj", "{00604162-C444-478B-B773-3AB23C856CA7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{E80A1018-C354-4A26-9029-8847BB9DA864}"
ProjectSection(SolutionItems) = preProject
README.md = docker/README.md
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YourSolution.AdmServer.Domain", "src\backend\YourSolution.AdmServer.Domain\YourSolution.AdmServer.Domain.csproj", "{932520DF-D312-415A-A128-1117F8221D68}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.SysComponent.Domain", "src\backend\NetAdmin.SysComponent.Domain\NetAdmin.SysComponent.Domain.csproj", "{51D6E603-0749-4A11-A78C-9E5BB127E03A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.AdmServer.Domain", "src\backend\NetAdmin.AdmServer.Domain\NetAdmin.AdmServer.Domain.csproj", "{932520DF-D312-415A-A128-1117F8221D68}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.AdmServer.Infrastructure", "src\backend\NetAdmin.AdmServer.Infrastructure\NetAdmin.AdmServer.Infrastructure.csproj", "{C3DE6F6A-D1FC-4B8E-9033-980FBEBBD2BA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetAdmin.SysComponent.Infrastructure", "src\backend\NetAdmin.SysComponent.Infrastructure\NetAdmin.SysComponent.Infrastructure.csproj", "{48EE6FC4-B64A-40D3-B889-36837E067880}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YourSolution.AdmServer.Infrastructure", "src\backend\YourSolution.AdmServer.Infrastructure\YourSolution.AdmServer.Infrastructure.csproj", "{C3DE6F6A-D1FC-4B8E-9033-980FBEBBD2BA}"
EndProject
##Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gurion", "refs\Gurion\src\Gurion\Gurion.csproj", "{CCD098FE-4F95-4FA4-8CC0-9A6DE921FBAE}"#refs
##EndProject#refs
##Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSql", "refs\NetAdmin.FreeSql\src\FreeSql\FreeSql.csproj", "{3C65DA42-877D-46FF-B754-C12214302A29}"#refs
##EndProject#refs
##Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSql.Provider.Sqlite", "refs\NetAdmin.FreeSql\src\FreeSql.Provider.Sqlite\FreeSql.Provider.Sqlite.csproj", "{CF5EFA63-4631-4A64-B4F3-98A7DD532F68}"#refs
##EndProject#refs
##Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSql.DbContext", "refs\NetAdmin.FreeSql\src\FreeSql.DbContext\FreeSql.DbContext.csproj", "{FE03DF27-EC56-48DB-81B0-F99947259A7C}"#refs
##EndProject#refs
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -180,10 +196,6 @@ Global
{00604162-C444-478B-B773-3AB23C856CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00604162-C444-478B-B773-3AB23C856CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00604162-C444-478B-B773-3AB23C856CA7}.Release|Any CPU.Build.0 = Release|Any CPU
{51D6E603-0749-4A11-A78C-9E5BB127E03A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{51D6E603-0749-4A11-A78C-9E5BB127E03A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{51D6E603-0749-4A11-A78C-9E5BB127E03A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{51D6E603-0749-4A11-A78C-9E5BB127E03A}.Release|Any CPU.Build.0 = Release|Any CPU
{932520DF-D312-415A-A128-1117F8221D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{932520DF-D312-415A-A128-1117F8221D68}.Debug|Any CPU.Build.0 = Debug|Any CPU
{932520DF-D312-415A-A128-1117F8221D68}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -192,10 +204,22 @@ Global
{C3DE6F6A-D1FC-4B8E-9033-980FBEBBD2BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3DE6F6A-D1FC-4B8E-9033-980FBEBBD2BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3DE6F6A-D1FC-4B8E-9033-980FBEBBD2BA}.Release|Any CPU.Build.0 = Release|Any CPU
{48EE6FC4-B64A-40D3-B889-36837E067880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48EE6FC4-B64A-40D3-B889-36837E067880}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48EE6FC4-B64A-40D3-B889-36837E067880}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48EE6FC4-B64A-40D3-B889-36837E067880}.Release|Any CPU.Build.0 = Release|Any CPU
##{CCD098FE-4F95-4FA4-8CC0-9A6DE921FBAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
##{CCD098FE-4F95-4FA4-8CC0-9A6DE921FBAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
##{CCD098FE-4F95-4FA4-8CC0-9A6DE921FBAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
##{CCD098FE-4F95-4FA4-8CC0-9A6DE921FBAE}.Release|Any CPU.Build.0 = Release|Any CPU
##{3C65DA42-877D-46FF-B754-C12214302A29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
##{3C65DA42-877D-46FF-B754-C12214302A29}.Debug|Any CPU.Build.0 = Debug|Any CPU
##{3C65DA42-877D-46FF-B754-C12214302A29}.Release|Any CPU.ActiveCfg = Release|Any CPU
##{3C65DA42-877D-46FF-B754-C12214302A29}.Release|Any CPU.Build.0 = Release|Any CPU
##{CF5EFA63-4631-4A64-B4F3-98A7DD532F68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
##{CF5EFA63-4631-4A64-B4F3-98A7DD532F68}.Debug|Any CPU.Build.0 = Debug|Any CPU
##{CF5EFA63-4631-4A64-B4F3-98A7DD532F68}.Release|Any CPU.ActiveCfg = Release|Any CPU
##{CF5EFA63-4631-4A64-B4F3-98A7DD532F68}.Release|Any CPU.Build.0 = Release|Any CPU
##{FE03DF27-EC56-48DB-81B0-F99947259A7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
##{FE03DF27-EC56-48DB-81B0-F99947259A7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
##{FE03DF27-EC56-48DB-81B0-F99947259A7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
##{FE03DF27-EC56-48DB-81B0-F99947259A7C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{4DAF9366-855F-46BB-AE4C-660C92FA0697} = {C84EB5A0-37AD-4B17-A51E-E36888C4441E}
@ -217,10 +241,9 @@ Global
{19872A4C-3C9A-4C62-A33B-74F5B8D6F77C} = {3F23258D-8299-4992-9F51-2EE9B52CF9D2}
{C2CC1596-3BEE-43EA-A9BE-4EDE5716296C} = {3F23258D-8299-4992-9F51-2EE9B52CF9D2}
{79409163-5006-405D-AC96-406FA0AD77B7} = {4DAF9366-855F-46BB-AE4C-660C92FA0697}
{51D6E603-0749-4A11-A78C-9E5BB127E03A} = {3F23258D-8299-4992-9F51-2EE9B52CF9D2}
{932520DF-D312-415A-A128-1117F8221D68} = {12AE5B4B-CB1A-498E-83B8-04E201E31D86}
{C3DE6F6A-D1FC-4B8E-9033-980FBEBBD2BA} = {12AE5B4B-CB1A-498E-83B8-04E201E31D86}
{48EE6FC4-B64A-40D3-B889-36837E067880} = {3F23258D-8299-4992-9F51-2EE9B52CF9D2}
{3C6F049E-3EE8-4D66-9AFF-E8A369032487} = {1129FE25-466B-4F4F-85FC-3752664245E1}
{BB5BB244-E7D2-4368-8C18-C1C0ED1E12D1} = {3E408077-E73E-45CE-A53A-EF5F9DAE4B46}
EndGlobalSection
EndGlobal

View File

@ -1,6 +1,6 @@
# NetAdmin
通用后台权限管理系统、快速开发框架基于C#12/.NET9、Vue3/Vite、Element Plus等现代技术构建具有十分整洁、优雅的编码规范
通用后台权限管理系统、快速开发框架基于C#13/.NET9、Vue3/Vite、ElementPlus等现代技术构建具有十分整洁、优雅的编码规范
[![.NET](https://github.com/nsnail/NetAdmin/actions/workflows/nightly-build.yml/badge.svg)](https://github.com/nsnail/NetAdmin/actions/workflows/nightly-build.yml)
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nsnail/NetAdmin/blob/main/LICENSE)
@ -14,7 +14,7 @@ https://na.tools92.top
```shell
docker run -p 8080:8080 nsnail/netadmin
# 需翻墙
# 需魔法上网
```
## 构建步骤
@ -27,14 +27,16 @@ dotnet --list-sdks
# 2. 克隆代码仓库
git clone https://github.com/nsnail/NetAdmin.git && cd ./NetAdmin
# 3. 检查本机 redis 运行状态
redis-cli dbsize
# 3. 确认本机 redis 处于运行状态
redis-server # 启动服务器
redis-cli # 连接测试
# 下载 redis for windowshttps://github.com/redis-windows/redis-windows/releases
# 下载 redis for linux/machttps://redis.io/download
# 4. 运行后端 WebApi
dotnet run --project ./src/backend/NetAdmin.AdmServer.Host/NetAdmin.AdmServer.Host.csproj --urls http://[::]:5010 -is
# 浏览器打开 http://localhost:5010 将看到SwaggerKnife4jUI界面
dotnet run --project ./src/backend/YourSolution.AdmServer.Host/YourSolution.AdmServer.Host.csproj --urls http://[::]:5010 -is
# -i 插入种子数据;-s 同步数据库结构
# 浏览器访问 http://localhost:5010 将看到SwaggerKnife4jUI界面
# 5. 检查 nodejs 版本 >=20
node -v
@ -45,42 +47,52 @@ cd ./src/frontend/admin && npm install
# 7. 运行前端项目
npm run dev
# 浏览器打开 http://localhost:5020 将看到管理界面默认用户名root,密码:1234qwer
# 浏览器访问 http://localhost:5020 ,将看到管理界面(默认用户名密码root 1234qwer
```
## 文件目录
## 文件目录
```
+---.github # github 工程文件目录
+---.template.config # dotnet 项目模板配置目录
+---assets # 项目资源文件目录
+---build # 构建相关的工程文件目录
+---dist # 编译生成的二进制文件目录
+---docker # docker 镜像构建文件目录
+---docs # 项目开发文档目录
+---refs # 引用的第三方包的仓库目录
+---scripts # 各种工具脚本文件目录
+---src # 项目源码文件目录
```
## 后端项目架构
## 项目架构
```mermaid
flowchart TD
H["NetAdmin.Host\n公共主机层\n.Net自托管主机程序\n输入输出格式化\n数据校验、鉴权\n...所有HTTP管道过滤器中间件"] --> C["NetAdmin.Cache\n公共缓存层\n基于Redis或MemoryCache的缓存策略实现"]
C --> A["NetAdmin.Application\n公共业务逻辑层\n内部服务增删改查\n外部服务增删改查\n...所有业务用例的计算与组合逻辑的模块化)"]
A --> D["NetAdmin.Domain\n数据实体层\n数据库关系实体映射\nDTO数据传输对象\n...所有数据模型的抽象与封装)"]
D --> I["NetAdmin.Infrastructure\n基础设施层\n第三方组件和Nuget包引用\n公共构建和程序运行配置\n公共常量枚举异常定义\n全球化化和多语言\n...所有公共Utility工具"]
XH["NetAdmin.XXX.Host\nWebApi"]-->H
XS["NetAdmin.XXXService\n常驻内存服务"]-->H
XS["NetAdmin.XXXService\n常驻内存服务"]-->XC
XC["NetAdmin.XXX.Cache\n缓存层实例"]-->C
XA["NetAdmin.XXX.Application\n业务逻辑层实例)"]-->A
XH-->XC
XC-->XA
sys-host["NetAdmin.SysComponent.Host\n系统组件主机层"]
sys-cache["NetAdmin.SysComponent.Cache\n系统组件缓存层"]
sys-app["NetAdmin.SysComponent.Application\n系统组件应用层"]
host["<b>NetAdmin.Host</b>\n框架主机层\n.Net自托管主机程序\n输入输出格式化\n数据校验、鉴权\n...所有HTTP管道过滤器中间件"]
cache["<b>NetAdmin.Cache</b>\n框架缓存层\n基于Redis或MemoryCache的缓存策略实现"]
app["<b>NetAdmin.Application</b>\n框架业务应用层\n内部服务增删改查\n外部服务增删改查\n...所有业务用例的计算与组合逻辑的模块化)"]
domain["<b>NetAdmin.Domain</b>\n框架数据实体层\n数据库关系实体映射\nDTO数据传输对象\n...所有数据模型的抽象与封装)"]
infra["<b>NetAdmin.Infrastructure</b>\n框架基础设施层\n第三方组件和Nuget包引用\n公共构建和程序运行配置\n公共常量枚举异常定义\n全球化化和多语言\n...所有公共Utility工具"]
biz-host["YourSolution.XXX.Host\n业务实例主机层"]
biz-cache["YourSolution.XXX.Cache\n业务实例:缓存层"]
biz-app["YourSolution.XXX.Application\n业务实例应用层"]
biz-domain["YourSolution.XXX.Domain\n业务实例数据实体层"]
biz-infra["YourSolution.XXX.Infrastructure\n业务实例基础设施层"]
biz-host-->biz-cache-->biz-app-->biz-domain-->biz-infra
sys-host-->sys-cache-->sys-app-->domain-->infra
host-->cache-->app-->domain-->infra
biz-host-->sys-host-->host
biz-cache-->sys-cache-->cache
biz-app-->sys-app-->app
biz-domain-->domain
biz-infra-->infra
```
## 引用的开源代码 / 特别鸣谢
## 特别鸣谢
| 语言 | 集成领域 | 开源库 |
|------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@ -88,7 +100,6 @@ XC-->XA
| C# | 数据库关系映射 | [FreeSql](https://github.com/dotnetcore/FreeSql) |
| C# | 代码质量检查 | [Roslynator.Analyzers](https://github.com/josefpihrt/roslynator) \| [SonarAnalyzer.CSharp](https://github.com/SonarSource/sonar-dotnet) \| [StyleCop.Analyzers](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) |
| C# | 单元测试框架 | [xunit](https://github.com/xunit/xunit) \| [coverlet.collector](https://github.com/coverlet-coverage/coverlet) |
| C# | 分布式锁 | [RedLock.net](https://github.com/samcook/RedLock.net) |
| C# | 控制台终端界面库 | [Spectre.Console](https://github.com/spectreconsole/spectre.console) |
| C# | 扩展函数库 | [NSExt](https://github.com/nsnail/ns-ext.git) |
| C# | 图形处理库 | [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) |
@ -96,8 +107,6 @@ XC-->XA
| C# | 性能监控采集 | [prometheus-net.AspNetCore](https://github.com/prometheus-net/prometheus-net) |
| C# | 雪花ID生成器 | [Yitter.IdGenerator](https://github.com/yitter/idgenerator) |
| C# | 自动化版本管理 | [MinVer](https://github.com/adamralph/minver) |
| C# | JavaScript引擎 | [MsieJavaScriptEngine](https://github.com/Taritsyn/MsieJavaScriptEngine) |
| C# | WebApi图形界面 | [IGeekFan.AspNetCore.Knife4jUI](https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI) |
| TypeScript | SPA基础框架 | [Vue](https://github.com/vuejs/core) |
| TypeScript | 前端构建工具 | [Vite](https://github.com/vitejs/vite) |
| TypeScript | UI控件库 | [ElementPlus](https://github.com/element-plus/element-plus) |

View File

@ -1,3 +1,7 @@
上次执行时间
上次执行状态
上次执行耗时
下次执行时间
不为其中之一
不以什么开始
不以什么结束
@ -8,63 +12,138 @@
中专
中共党员
为其中之一
人工审核
以什么开始
以什么结束
保密
作业名称
作业状态
保密
信息
倒序排序
全部数据
公告
共青团员
出生证
创建时间
初中
删除
包含
博士
博士后
发送失败
同步数据库结构
响应体
响应状态码
唯一编码
备注
外国人居留证
外部错误
大专
大于
大于等于
字典内容导出
宕机
客户端IP
小于
小于等于
小学
已发送
已婚
已校验
已读
并且
成功
或者
所属角色
所属部门
手机
手机号
执行耗时
执行计划
护照
指定部门数据
按钮
排序
接口名称
接口导出
接口描述
接口路径
插入种子数据
操作系统
数据范围
文档内容
文档内容导出
文档标题
无效操作
无效输入
无限权限
日期范围
是否启用
显示仪表板
最后登录时间
未处理异常
未婚
未读
本人数据
本科
本部门和下级部门数据
本部门数据
框架
比较数据库结构
注册
消息主题
消息摘要
消息类型
港澳台通行证
用户代理
用户名
用户导出
电子邮箱
登录
登录名
登录日志导出
硕士
示例导出
离异
空闲
站内信导出
等于
等于
待发送
管理模块
系统模块
绑定手机号码
结果非预期
群众
自定义
范围
菜单
角色名称
角色导出
解绑手机号码
警告
计划作业导出
计划作业执行记录导出
请求方式
请求日志导出
调试
跟踪
跟踪标识
身份证
运行
通知
邮箱号
部门名称
部门导出
配置导出
重设密码
链接
错误
随机排序
项值
项名
顺序排序
高中
默认角色
默认部门

View File

@ -1,21 +1,121 @@
1分钟内只能发送1次
6位数字
8位以上数字字母组合
XML注释文件不存在
中文姓名
事务已回滚
事务已提交
人机校验请求不能为空
人机验证未通过
作业名称不能为空
允许的文件大小
允许的文件格式
区号电话号码分机号
参数格式不正确
唯一编码不能为空
图标代码不能为空
图标名称不能为空
婚姻状况不正确
字典名称不能为空
字典目录不存在
字典目录编号不能为空
字典编码不能为空
学历不正确
完全公开
密码不能为空
已处理完毕
并发冲突_请稍后重试
开始事务
性别不正确
手机号码不正确
手机号码不能为空
接口编码不存在
支付宝账号
政治面貌不正确
数据库同步开始
数据库服务器时钟偏移
数据库结构同步完成
文件不能为空
文档内容不能为空
文档分类不存在
文档分类名称不能为空
文档分类编号不能为空
文档分类编码不能为空
文档标题不能为空
新密码不能为空
新手机号码验证码不正确
无效端口号
无效证件号码
旧密码不正确
旧密码不能为空
旧手机号码不正确
旧手机号码验证码不正确
时间表达式
时间计划不能为空
未指定部门
未获取到待执行任务
档案可见性不正确
模块名称不能为空
模块类型不能为空
模块说明不能为空
此节点已下线
民族不正确
消息主题不能为空
消息内容不能为空
父节点不存在
用户不存在
用户名不能为空
用户名不能是手机号码
用户名或密码错误
用户名长度4位以上
用户头像不能为空
用户编号不存在
登录用户
目标设备不能为空
短信验证请求不能为空
种子数据插入完成
站内信不存在
站内信状态不正确
站内信类型不正确
缓存键不能为空
网络地址不正确
自己可见
菜单名称不能为空
菜单标题不能为空
菜单类型不正确
菜单编号不能为空
角色不存在
角色名称不能为空
角色数据范围不正确
角色编号不能为空
角色编号列表不能为空
记录已存在
设备类型不能为空
证件类型不正确
该角色下存在用户
该部门下存在子部门
该部门下存在用户
请求地址不能为空
请求对象不能为空
请求方法不正确
请稍后重试
请联系管理员激活账号
读取用户令牌出错
账号不能为空
邀请码不正确
邮箱验证码不正确
部门不存在
部门可见
部门名称不能为空
配置文件初始化完毕
键值不能为空
键名称不能为空
随机延时结束时间不正确
随机延时起始时间不正确
非JSON字符串
验证数据不能为空
验证码不正确
验证码不能为空
验证码目标设备类型不正确
验证码类型不正确
验证码类型不能为空

View File

@ -1,81 +0,0 @@
上次执行时间
上次执行状态
上次执行耗时
下次执行时间
人工审核
作业名称
作业状态
全部数据
公告
创建时间
删除
发送失败
响应体
响应状态码
唯一编码
备注
字典内容导出
客户端IP
已发送
已校验
已读
所属角色
所属部门
手机
手机号
执行耗时
执行计划
指定部门数据
按钮
排序
接口名称
接口导出
接口描述
接口路径
操作系统
数据范围
无限权限
是否启用
显示仪表板
最后登录时间
未读
本人数据
本部门和下级部门数据
本部门数据
框架
注册
消息主题
消息摘要
消息类型
用户代理
用户名
用户导出
电子邮箱
登录
登录名
登录日志导出
空闲
站内信导出
等待发送
绑定手机号码
菜单
角色名称
角色导出
解绑手机号码
计划作业导出
计划作业执行记录导出
请求方式
请求日志导出
跟踪标识
运行
通知
邮箱号
部门名称
部门导出
配置导出
重设密码
链接
项值
项名
默认角色
默认部门

View File

@ -1,102 +0,0 @@
1分钟内只能发送1次
人机校验请求不能为空
人机验证未通过
作业名称不能为空
允许的文件大小
允许的文件格式
唯一编码不能为空
图标代码不能为空
图标名称不能为空
婚姻状况不正确
字典名称不能为空
字典目录不存在
字典目录编号不能为空
字典目录编号不能为空
字典编码不能为空
学历不正确
密码不能为空
密码不能为空
密码不能为空
密码不能为空
已处理完毕
已处理完毕
已处理完毕
并发冲突_请稍后重试
性别不正确
手机号码不正确
手机号码不能为空
接口编码不存在
政治面貌不正确
数据库服务器时钟偏移
文件不能为空
新密码不能为空
新手机号码验证码不正确
旧密码不正确
旧密码不能为空
旧手机号码不正确
旧手机号码验证码不正确
时间计划不能为空
未指定部门
未获取到待执行任务
模块名称不能为空
模块类型不能为空
模块说明不能为空
此节点已下线
此节点已下线
民族不正确
消息主题不能为空
消息内容不能为空
父节点不存在
用户不存在
用户名不能为空
用户名不能为空
用户名不能为空
用户名或密码错误
用户头像不能为空
用户编号不存在
目标设备不能为空
目标设备不能为空
短信验证请求不能为空
短信验证请求不能为空
短信验证请求不能为空
站内信不存在
站内信状态不正确
站内信类型不正确
缓存键不能为空
网络地址不正确
网络地址不正确
网络地址不正确
菜单名称不能为空
菜单标题不能为空
菜单类型不正确
菜单编号不能为空
角色不存在
角色名称不能为空
角色数据范围不正确
角色编号不能为空
角色编号列表不能为空
设备类型不能为空
证件类型不正确
该角色下存在用户
该部门下存在子部门
该部门下存在用户
请求地址不能为空
请求方法不正确
请稍后重试
请联系管理员激活账号
读取用户令牌出错
账号不能为空
邮箱验证码不正确
部门不存在
部门名称不能为空
键值不能为空
键名称不能为空
键名称不能为空
随机延时结束时间不正确
随机延时起始时间不正确
验证数据不能为空
验证码不正确
验证码不能为空
验证码目标设备类型不正确
验证码类型不正确
验证码类型不能为空

View File

@ -140,13 +140,34 @@
"Title": "缓存管理",
"Type": 1
},
// ------------------------------ 档案管理 ------------------------------
{
"Icon": "sc-icon-Archive",
"Id": 616214756757512,
"Name": "archive",
"Path": "/archive",
"Sort": 98,
"Title": "档案管理",
"Type": 1
},
{
"Component": "sys/doc",
"Icon": "el-icon-document",
"Id": 616214756757516,
"Name": "archive/doc",
"ParentId": 616214756757512,
"Path": "/archive/doc",
"Sort": 100,
"Title": "文档管理",
"Type": 1
},
// ------------------------------ 日志管理 ------------------------------
{
"Icon": "el-icon-tickets",
"Id": 374792687640581,
"Name": "log",
"Path": "/log",
"Sort": 98,
"Sort": 97,
"Title": "日志管理",
"Type": 1
},
@ -178,7 +199,7 @@
"Id": 373838105399301,
"Name": "dev",
"Path": "/dev",
"Sort": 97,
"Sort": 96,
"Title": "开发管理",
"Type": 1
},
@ -198,7 +219,7 @@
"ParentId": 373838105399301,
"Icon": "el-icon-eleme-filled",
"Name": "dev/element",
"Path": "http://element-plus.org/zh-CN/component/overview.html",
"Path": "https://element-plus.org/zh-CN/component/overview.html",
"Sort": 99,
"Title": "Element",
"Type": 3,

View File

@ -1,10 +1,10 @@
[
{
"Content": "<p>尊敬的用户:</p>\n<p style=\"padding-left: 40px;\">欢迎您使用 NetAdmin 后台管理系统NetAdmin 是一款通用后台权限管理系统和快速开发框架,它基于 C#12/.NET9、Vue3/Vite、Element Plus 等现代技术构建,具有十分整洁、优雅的编码规范。</p>\n<p style=\"padding-left: 40px;\">NetAdmin 致力于为企业提供高效、安全、易用的解决方案,帮助您快速构建出符合业务需求的应用程序。系统提供了丰富的功能模块,包括用户管理、权限管理、日志管理、文件上传等,可以满足您日常管理的需求。</p>\n<p style=\"padding-left: 40px;\">在使用 NetAdmin 的过程中,我们真诚地希望您能够遵守以下规定:</p>\n<p style=\"padding-left: 80px;\">1. 不得利用 NetAdmin 进行非法活动或者侵犯他人权益;</p>\n<p style=\"padding-left: 80px;\">2. 不得对 NetAdmin 系统进行恶意攻击或者破坏;</p>\n<p style=\"padding-left: 80px;\">3. 不得将 NetAdmin 系统的任何部分用于商业目的或者未经授权的访问。</p>\n<p style=\"padding-left: 80px;\">4. 为了更好地为您提供服务NetAdmin 将不断进行优化和升级,同时也欢迎您提出宝贵的意见和建议。如果您在使用过程中遇到任何问题,可以通过官方网站或者技术支持团队进行咨询和解决。</p>\n<p style=\"padding-left: 40px;\">再次感谢您对 NetAdmin 的信任和支持我们相信在您的使用过程中NetAdmin 一定会成为您的得力助手,为您的事业发展提供强有力的支持!</p>\n<p style=\"text-align: right;\">NetAdmin 开发团队</p>",
"Content": "<p>尊敬的用户:</p>\n<p style=\"padding-left: 40px;\">欢迎您使用 NetAdmin 后台管理系统NetAdmin 是一款通用后台权限管理系统和快速开发框架,它基于 C#13/.NET9、Vue3/Vite、ElementPlus 等现代技术构建,具有十分整洁、优雅的编码规范。</p>\n<p style=\"padding-left: 40px;\">NetAdmin 致力于为企业提供高效、安全、易用的解决方案,帮助您快速构建出符合业务需求的应用程序。系统提供了丰富的功能模块,包括用户管理、权限管理、日志管理、文件上传等,可以满足您日常管理的需求。</p>\n<p style=\"padding-left: 40px;\">在使用 NetAdmin 的过程中,我们真诚地希望您能够遵守以下规定:</p>\n<p style=\"padding-left: 80px;\">1. 不得利用 NetAdmin 进行非法活动或者侵犯他人权益;</p>\n<p style=\"padding-left: 80px;\">2. 不得对 NetAdmin 系统进行恶意攻击或者破坏;</p>\n<p style=\"padding-left: 80px;\">3. 不得将 NetAdmin 系统的任何部分用于商业目的或者未经授权的访问。</p>\n<p style=\"padding-left: 80px;\">4. 为了更好地为您提供服务NetAdmin 将不断进行优化和升级,同时也欢迎您提出宝贵的意见和建议。如果您在使用过程中遇到任何问题,可以通过官方网站或者技术支持团队进行咨询和解决。</p>\n<p style=\"padding-left: 40px;\">再次感谢您对 NetAdmin 的信任和支持我们相信在您的使用过程中NetAdmin 一定会成为您的得力助手,为您的事业发展提供强有力的支持!</p>\n<p style=\"text-align: right;\">NetAdmin 开发团队</p>",
"CreatedUserId": 370942943322181,
"CreatedUserName": "root",
"MsgType": 2,
"Summary": "尊敬的用户:\n欢迎您使用 NetAdmin 后台管理系统NetAdmin 是一款通用后台权限管理系统和快速开发框架,它基于 C#12/.NET9、Vue3/Vite、Element Plus 等现代",
"Summary": "尊敬的用户:\n欢迎您使用 NetAdmin 后台管理系统NetAdmin 是一款通用后台权限管理系统和快速开发框架,它基于 C#13/.NET9、Vue3/Vite、ElementPlus 等现代",
"Title": "欢迎使用 NetAdmin 后台管理系统",
}
]

View File

@ -15,7 +15,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.12.19">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
@ -23,7 +23,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.32.0.97167">
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.3.0.106239">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,9 +1,9 @@
{
"version": "2.0.0",
"version": "2.3.0",
"devDependencies": {
"cz-git": "^1.10.1",
"cz-git": "^1.11.0",
"commitizen": "^4.3.1",
"prettier": "^3.3.3",
"prettier": "^3.4.2",
"standard-version": "^9.5.0"
},
"config": {

Submodule refs/FreeSql deleted from 0f6c2b807d

1
refs/Gurion Submodule

Submodule refs/Gurion added at 89586fd0c6

1
refs/NetAdmin.FreeSql Submodule

Submodule refs/NetAdmin.FreeSql added at c851ae3da2

View File

@ -0,0 +1,3 @@
git submodule update --progress --init --recursive --force --remote -- "../refs/Gurion"
git submodule update --progress --init --recursive --force --remote -- "../refs/NetAdmin.FreeSql"
git submodule update --progress --init --recursive --force --remote -- "../refs/ns-ext"

View File

@ -1,12 +1,11 @@
#r "nuget: NSExt, 2.2.0"
#r "nuget: NSExt, 2.3.2"
using NSExt.Extensions;
Console.WriteLine("请输入原始名称NetAdmin");
var oldName = Console.ReadLine().NullOrEmpty("NetAdmin");
Console.WriteLine("请输入替换名称:");
var newName = Console.ReadLine();
foreach (var path in Directory.EnumerateDirectories("../", $"*{oldName}*",
SearchOption.AllDirectories))
foreach (var path in Directory.EnumerateDirectories("../", $"*{oldName}*", SearchOption.AllDirectories).Where(x => !x.Contains(".git")))
{
Console.Write($"{path} --> ");
var newPath = path.Replace(oldName, newName);
@ -16,7 +15,7 @@ foreach (var path in Directory.EnumerateDirectories("../", $"*{oldName}*",
Console.WriteLine();
foreach (var path in Directory.EnumerateFiles("../", $"*.*", SearchOption.AllDirectories))
foreach (var path in Directory.EnumerateFiles("../", $"*.*", SearchOption.AllDirectories).Where(x => !x.Contains(".git")))
{
File.WriteAllText(path, File.ReadAllText(path).Replace(oldName, newName));
var newPath = path.Replace(oldName, newName);

View File

@ -0,0 +1,42 @@
using System.Text.RegularExpressions;
string input = string.Empty;
while (!new[] { "1", "2" }.Contains(input))
{
Console.WriteLine("1.nuget 2.project");
input = Console.ReadLine();
}
var slnFile = Directory.GetFiles(@"../", "*.sln").First();
var csprojFiles = Directory.GetFiles(@"../src", "*.csproj", new EnumerationOptions { RecurseSubdirectories = true });
var slnContent = File.ReadAllText(slnFile);
if (input == "1")
{
slnContent = Regex.Replace(slnContent, "\\nProject\\((.*)#refs", "\n##Project($1#refs");
slnContent = Regex.Replace(slnContent, "\\nEndProject#refs", "\n##EndProject#refs");
foreach (Match m in Regex.Matches(slnContent, "\"(\\{[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\\})\"#refs"))
{
slnContent = slnContent.Replace($" {m.Groups[1].Value}.", $" ##{m.Groups[1].Value}.");
}
foreach (var csprojFile in csprojFiles)
{
var csprojContent = File.ReadAllText(csprojFile);
csprojContent = Regex.Replace(csprojContent," <ProjectReference(.*)Label=\"refs\"(.*)>", " <!--<ProjectReference$1Label=\"refs\"$2>-->");
csprojContent = Regex.Replace(csprojContent," <!--<PackageReference(.*)Label=\"refs\"(.*)>-->", " <PackageReference$1Label=\"refs\"$2>");
File.WriteAllText(csprojFile, csprojContent);
}
}
else
{
slnContent = Regex.Replace(slnContent, "##", "");
foreach (var csprojFile in csprojFiles)
{
var csprojContent = File.ReadAllText(csprojFile);
csprojContent = Regex.Replace(csprojContent," <!--<ProjectReference(.*)Label=\"refs\"(.*)>-->", " <ProjectReference$1Label=\"refs\"$2>");
csprojContent = Regex.Replace(csprojContent," <PackageReference(.*)Label=\"refs\"(.*)>", " <!--<PackageReference$1Label=\"refs\"$2>-->");
File.WriteAllText(csprojFile, csprojContent);
}
}
Console.WriteLine(slnContent);
File.WriteAllText(slnFile, slnContent);

View File

@ -1,22 +0,0 @@
{
"solution": "NetAdmin.sln",
"mappings": {
"FreeSql.NS": "../refs/FreeSql/FreeSql/FreeSql.csproj",
"FreeSql.DbContext.NS": "../refs/FreeSql/FreeSql.DbContext/FreeSql.DbContext.csproj"
},
"restore": [
{
"name": "NetAdmin.Infrastructure",
"packages": [
{
"packageName": "FreeSql.NS",
"version": "3.2.833-ns4"
},
{
"packageName": "FreeSql.DbContext.NS",
"version": "3.2.833-ns4"
}
]
}
]
}

View File

@ -1,17 +0,0 @@
{
"solution": "NetAdmin.sln",
"mappings": {
"Gurion": "../refs/Gurion/src/Gurion.csproj"
},
"restore": [
{
"name": "NetAdmin.Infrastructure",
"packages": [
{
"packageName": "Gurion",
"version": "1.1.0"
}
]
}
]
}

View File

@ -1,17 +0,0 @@
{
"solution": "NetAdmin.sln",
"mappings": {
"NSExt": "../refs/ns-ext/src/NSExt/NSExt.csproj"
},
"restore": [
{
"name": "NetAdmin.Infrastructure",
"packages": [
{
"packageName": "NSExt",
"version": "2.2.0"
}
]
}
]
}

View File

@ -1,27 +0,0 @@
# https://github.com/RicoSuter/DNT#switch-to-projects
$targets = @{
'1' = 'switch-to-projects'
'2' = 'switch-to-packages'
}
$key = ''
while ($null -eq $targets[$key])
{
$key = Read-Host '请选择1切换到项目引用 2切换到Nuget包引用'
}
$files = Get-ChildItem Switcher.*.json
$file = 9999
while ($null -eq $files[[int]$file - 1])
{
$i = 0
Write-Host '请选择要切换的配置文件文件'
foreach ($file in $files)
{
$i++
Write-Host $i $file.Name
}
$file = Read-Host
}
$file = [int]$file - 1
Copy-Item $files[$file] 'switcher.json' -Force
dnt $targets[$key] ../NetAdmin.sln
Remove-Item switcher.json

View File

@ -45,6 +45,20 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
"""
);
content = Regex.Replace(
content,
"Project\\(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\"\\) = \"workflows\", \"workflows\", \"{BB5BB244-E7D2-4368-8C18-C1C0ED1E12D1}\"(?:.|\n)*?EndProject",
$$"""
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{BB5BB244-E7D2-4368-8C18-C1C0ED1E12D1}"
ProjectSection(SolutionItems) = preProject
{{string.Join('\n',
Directory.GetFiles(@"../.drone/workflows", "*")
.Select(x=>$" {Path.GetFileName(x)} = .drone/workflows/{Path.GetFileName(x)}")
)}}
EndProject
"""
);
content = Regex.Replace(
content,
"Project\\(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\"\\) = \"scripts\", \"scripts\", \"{BB0B25C9-0901-4923-913F-00F9A6B352A5}\"(?:.|\n)*?EndProject",

View File

@ -1,10 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)/build/code.quality.props"/>
<ItemGroup>
<ProjectReference Include="../NetAdmin.AdmServer.Domain/NetAdmin.AdmServer.Domain.csproj"/>
<ProjectReference Include="../NetAdmin.SysComponent.Application/NetAdmin.SysComponent.Application.csproj"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MailKit" Version="4.8.0"/>
</ItemGroup>
</Project>

View File

@ -1,7 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)/build/code.quality.props"/>
<ItemGroup>
<ProjectReference Include="../NetAdmin.AdmServer.Application/NetAdmin.AdmServer.Application.csproj"/>
<ProjectReference Include="../NetAdmin.SysComponent.Cache/NetAdmin.SysComponent.Cache.csproj"/>
</ItemGroup>
</Project>

View File

@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)/build/code.quality.props"/>
<ItemGroup>
<ProjectReference Include="../NetAdmin.Infrastructure/NetAdmin.Infrastructure.csproj"/>
</ItemGroup>
<ItemGroup>
<None Include="$(SolutionDir)/assets/res/NetAdmin.AdmServer.Statements.ln">
<Link>Languages/NetAdmin.AdmServer.Statements.ln</Link>
</None>
<None Include="$(SolutionDir)/assets/res/NetAdmin.AdmServer.Fields.ln">
<Link>Languages/NetAdmin.AdmServer.Fields.ln</Link>
</None>
</ItemGroup>
<ItemGroup>
<None Update="*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@ -1,5 +0,0 @@
global using NetAdmin.Domain.Attributes;
global using NetAdmin.Domain.DbMaps.Dependency;
global using NetAdmin.Domain.DbMaps.Dependency.Fields;
global using CsvIgnore = CsvHelper.Configuration.Attributes.IgnoreAttribute;
global using DynamicFilterOperators = NetAdmin.Domain.Enums.DynamicFilterOperators;

View File

@ -1,23 +0,0 @@
#pragma warning disable CS1591
namespace NetAdmin.Infrastructure.Constant;
/// <summary>
/// 数字常量表
/// </summary>
/// <remarks>
/// public类型会通过接口暴露给前端
/// </remarks>
public static class Numbers
{
public const int DEF_PAGE_SIZE_QUERY = 20; // 默认值:分页查询页容量
public const int HTTP_STATUS_BIZ_FAIL = 900; // HTTP状态码业务异常
public const int MAX_LIMIT_BULK_REQ = 100; // 最大限制:批量请求数
public const int MAX_LIMIT_EXPORT = 50000; // 最大限制导出为CSV文件的条数
public const int MAX_LIMIT_QUERY = 1000; // 最大限制:非分页查询条数
public const int MAX_LIMIT_QUERY_PAGE_NO = 10000; // 最大限制:分页查询页码
public const int MAX_LIMIT_QUERY_PAGE_SIZE = 100; // 最大限制:分页查询页容量
public const int MAX_LIMIT_RETRY_CNT_REDIS_LOCK = 10; // 最大限制Redis锁重试次数
public const int SECS_REDIS_LOCK_EXPIRY = 60; // 秒Redis锁过期时间
public const int SECS_REDIS_LOCK_RETRY_DELAY = 1; // 秒Redis锁重试间隔
}

File diff suppressed because it is too large Load Diff

View File

@ -1,160 +0,0 @@
using System.Numerics;
using Microsoft.CodeAnalysis.CSharp.Scripting;
using Microsoft.CodeAnalysis.Scripting;
namespace NetAdmin.Infrastructure.Extensions;
/// <summary>
/// String 扩展方法
/// </summary>
public static class StringExtensions
{
private const string _CHARACTERS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
private static readonly Regex _regexIpV4 = new(Chars.RGXL_IP_V4);
/// <summary>
/// 将指定的输入字符串进行Base62解码
/// </summary>
/// <exception cref="ArgumentException">ArgumentException</exception>
public static string Base62Decode(this string me)
{
BigInteger result = 0;
foreach (var index in me.Select(c => _CHARACTERS.IndexOf(c))) {
if (index < 0) {
throw new ArgumentException("Invalid character in Base62 string.");
}
#pragma warning disable IDE0048, RCS1123, SA1407
result = result * 62 + index;
#pragma warning restore SA1407, RCS1123, IDE0048
}
// Convert BigInteger back to byte array and then to string
var bytes = result.ToByteArray();
// Handle the sign bit
if (bytes[^1] == 0) {
Array.Resize(ref bytes, bytes.Length - 1);
}
return Encoding.UTF8.GetString(bytes);
}
/// <summary>
/// 将指定的输入字符串进行Base62编码
/// </summary>
public static string Base62Encode(this string me)
{
// Convert string to byte array
var bytes = Encoding.UTF8.GetBytes(me);
// Convert byte array to BigInteger for easier processing
var bigInteger = new BigInteger(bytes);
if (bigInteger == 0) {
return _CHARACTERS[0].ToString();
}
var result = new StringBuilder();
while (bigInteger > 0) {
var remainder = (int)(bigInteger % 62);
bigInteger /= 62;
_ = result.Insert(0, _CHARACTERS[remainder]);
}
return result.ToString();
}
/// <summary>
/// 解码避免转义的Base64
/// </summary>
public static string Base64InUrlDecode(this string me)
{
return me.Replace("-", "+").Replace("_", "/");
}
/// <summary>
/// 编码避免转义的Base64
/// </summary>
public static string Base64InUrlEncode(this string me)
{
return me.Replace("+", "-").Replace("/", "_");
}
/// <summary>
/// 计算Crc32
/// </summary>
public static int Crc32(this string me)
{
return BitConverter.ToInt32(System.IO.Hashing.Crc32.Hash(Encoding.UTF8.GetBytes(me)));
}
/// <summary>
/// 执行C#代码
/// </summary>
public static Task<T> ExecuteCSharpCodeAsync<T>(this string me, Assembly[] assemblies, params string[] importNamespaces)
{
// 使用 Roslyn 编译并执行代码
return CSharpScript.EvaluateAsync<T>(me, ScriptOptions.Default.WithReferences(assemblies).WithImports(importNamespaces));
}
/// <summary>
/// 是否IPV4地址
/// </summary>
public static bool IsIpV4(this string me)
{
return _regexIpV4.IsMatch(me);
}
/// <summary>
/// object -> json
/// </summary>
public static T ToObject<T>(this string me)
{
return me.Object<T>(GlobalStatic.JsonSerializerOptions);
}
/// <summary>
/// object -> json
/// </summary>
public static object ToObject(this string me, Type toType)
{
return me.Object(toType, GlobalStatic.JsonSerializerOptions);
}
/// <summary>
/// 去掉前部字符串
/// </summary>
public static string TrimPrefix(this string me, string clearStr)
{
return Regex.Replace(me, $"^{clearStr}", string.Empty);
}
/// <summary>
/// 去掉尾部字符串
/// </summary>
public static string TrimSuffix(this string me, string clearStr)
{
return Regex.Replace(me, $"{clearStr}$", string.Empty);
}
/// <summary>
/// 去掉尾部字符串“Async”
/// </summary>
#pragma warning disable RCS1047, ASA002, VSTHRD200
public static string TrimSuffixAsync(this string me)
#pragma warning restore VSTHRD200, ASA002, RCS1047
{
return TrimSuffix(me, "Async");
}
/// <summary>
/// 去掉尾部字符串“Options”
/// </summary>
public static string TrimSuffixOptions(this string me)
{
return TrimSuffix(me, "Options");
}
}

View File

@ -1,6 +0,0 @@
{
"AppSettings": {
"InjectSpecificationDocument": true,
"InjectMiniProfiler": true
}
}

View File

@ -1,6 +0,0 @@
{
"AppSettings": {
"InjectSpecificationDocument": true,
"InjectMiniProfiler": true
}
}

View File

@ -1,6 +0,0 @@
{
"AppSettings": {
"InjectSpecificationDocument": true,
"InjectMiniProfiler": true
}
}

View File

@ -1,6 +0,0 @@
namespace NetAdmin.SysComponent.Domain.Dto.Sys.JobRecord;
/// <summary>
/// 请求:创建计划作业执行记录
/// </summary>
public sealed record CreateJobRecordReq : Sys_JobRecord;

View File

@ -1,6 +0,0 @@
namespace NetAdmin.SysComponent.Domain.Dto.Sys.RequestLogDetail;
/// <summary>
/// 请求:创建请求日志明细
/// </summary>
public sealed record CreateRequestLogDetailReq : Sys_RequestLogDetail;

View File

@ -1,6 +0,0 @@
namespace NetAdmin.SysComponent.Domain.Dto.Sys.SiteMsgDept;
/// <summary>
/// 请求:创建站内信-部门映射
/// </summary>
public sealed record CreateSiteMsgDeptReq : Sys_SiteMsgDept;

View File

@ -1,6 +0,0 @@
namespace NetAdmin.SysComponent.Domain.Dto.Sys.SiteMsgRole;
/// <summary>
/// 请求:创建站内信-角色映射
/// </summary>
public sealed record CreateSiteMsgRoleReq : Sys_SiteMsgRole;

View File

@ -1,6 +0,0 @@
namespace NetAdmin.SysComponent.Domain.Dto.Sys.SiteMsgUser;
/// <summary>
/// 请求:创建站内信-用户映射
/// </summary>
public sealed record CreateSiteMsgUserReq : Sys_SiteMsgUser;

View File

@ -1,10 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)/build/code.quality.props"/>
<ItemGroup>
<Content Include="$(SolutionDir)/assets/seed-data/Sys_*.json" LinkBase="SeedData" CopyToOutputDirectory="PreserveNewest"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../NetAdmin.Domain/NetAdmin.Domain.csproj"/>
<ProjectReference Include="../NetAdmin.SysComponent.Infrastructure/NetAdmin.SysComponent.Infrastructure.csproj"/>
</ItemGroup>
</Project>

View File

@ -1,14 +0,0 @@
#pragma warning disable CS1591
namespace NetAdmin.SysComponent.Infrastructure.Constant;
/// <summary>
/// 字符串常量表
/// </summary>
/// <remarks>
/// public类型会通过接口暴露给前端
/// </remarks>
public static class SysChars
{
public const string FLG_PATH_API_SYS_USER_LOGIN_BY_PWD = "api/sys/user/login.by.pwd";
}

View File

@ -1,22 +0,0 @@
#pragma warning disable CS1591
namespace NetAdmin.SysComponent.Infrastructure.Constant;
/// <summary>
/// 数字常量表
/// </summary>
/// <remarks>
/// public类型会通过接口暴露给前端
/// </remarks>
public static class SysNumbers
{
public const long DEF_SORT_VAL = 100; // 默认值:排序字段
public const long ID_DIC_CATALOG_GEO_AREA = 379794295185413; // 唯一编号:字典目录-行政区划字典
public const int REQUEST_LOG_BUFF_SIZE = 1000; // 请求日志缓冲区大小
public const int SCHEDULED_JOB_PARALLEL_NUM = 5; // 计划作业并发数
public const int SECS_CACHE_CHART = 300; // 缓存时间(秒):仪表
public const int SECS_CACHE_DEFAULT = 60; // 缓存时间(秒):默认
public const int SECS_CACHE_DIC_CATALOG_CODE = 300; // 缓存时间(秒):字典配置-目录代码
public const int SECS_CACHE_LOGIN_BY_USER_ID = 3600 * 24 * 30; // 缓存时间(秒):通过用户编号登录的用户信息
public const int SECS_TIMEOUT_JOB = 180; // 超时时间(秒):作业
}

View File

@ -1,14 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)/build/code.quality.props"/>
<ItemGroup>
<ProjectReference Include="../NetAdmin.Infrastructure/NetAdmin.Infrastructure.csproj"/>
</ItemGroup>
<ItemGroup>
<None Include="$(SolutionDir)/assets/res/NetAdmin.SysComponent.Statements.ln">
<Link>Languages/NetAdmin.SysComponent.Statements.ln</Link>
</None>
<None Include="$(SolutionDir)/assets/res/NetAdmin.SysComponent.Fields.ln">
<Link>Languages/NetAdmin.SysComponent.Fields.ln</Link>
</None>
</ItemGroup>
</Project>

View File

@ -8,7 +8,7 @@ public static class UnitOfWorkManagerExtensions
/// <summary>
/// 事务操作
/// </summary>
public static async Task AtomicOperateAsync(this UnitOfWorkManager me, Func<Task> handle)
public static async Task AtomicOperateAsync(this UnitOfWorkManager me, Func<Task> handle, Func<Task> onErrorHandle = null)
{
var logger = LogHelper.Get<UnitOfWorkManager>();
using var unitOfWork = me.Begin();
@ -25,6 +25,11 @@ public static class UnitOfWorkManagerExtensions
logger?.Warn(ex);
unitOfWork.Rollback();
logger?.Warn($"{Ln.事务已回滚}: {hashCode}");
if (onErrorHandle != null) {
await onErrorHandle().ConfigureAwait(false);
}
throw;
}
}

View File

@ -8,12 +8,14 @@ namespace NetAdmin.Application.Modules;
/// </summary>
/// <typeparam name="TCreateReq">创建请求类型</typeparam>
/// <typeparam name="TCreateRsp">创建响应类型</typeparam>
/// <typeparam name="TEditReq">编辑请求类型</typeparam>
/// <typeparam name="TQueryReq">查询请求类型</typeparam>
/// <typeparam name="TQueryRsp">查询响应类型</typeparam>
/// <typeparam name="TDelReq">删除请求类型</typeparam>
public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, TDelReq>
public interface ICrudModule<in TCreateReq, TCreateRsp, in TEditReq, TQueryReq, TQueryRsp, TDelReq>
where TCreateReq : DataAbstraction, new()
where TCreateRsp : DataAbstraction
where TEditReq : DataAbstraction, new()
where TQueryReq : DataAbstraction, new()
where TQueryRsp : DataAbstraction
where TDelReq : DataAbstraction, new()
@ -28,6 +30,11 @@ public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, TD
/// </summary>
Task<long> CountAsync(QueryReq<TQueryReq> req);
/// <summary>
/// 实体分组计数
/// </summary>
Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<TQueryReq> req);
/// <summary>
/// 创建实体
/// </summary>
@ -39,9 +46,9 @@ public interface ICrudModule<in TCreateReq, TCreateRsp, TQueryReq, TQueryRsp, TD
Task<int> DeleteAsync(TDelReq req);
/// <summary>
/// 判断实体是否存在
/// 编辑实体
/// </summary>
Task<bool> ExistAsync(QueryReq<TQueryReq> req);
Task<TQueryRsp> EditAsync(TEditReq req);
/// <summary>
/// 导出实体

View File

@ -7,6 +7,7 @@ namespace NetAdmin.Application.Modules.Tpl;
/// 示例模块
/// </summary>
public interface IExampleModule : ICrudModule<CreateExampleReq, QueryExampleRsp // 创建类型
, EditExampleReq // 编辑类型
, QueryExampleReq, QueryExampleRsp // 查询类型
, DelReq // 删除类型
>;

View File

@ -5,6 +5,7 @@ using NetAdmin.Domain;
using NetAdmin.Domain.DbMaps.Dependency;
using NetAdmin.Domain.DbMaps.Dependency.Fields;
using NetAdmin.Domain.Dto.Dependency;
using NetAdmin.Domain.Extensions;
namespace NetAdmin.Application.Services;
@ -50,13 +51,11 @@ public abstract class RepositoryService<TEntity, TPrimary, TLogger>(BasicReposit
Func<QueryReq<TQuery>, ISelect<TEntity>> selector, QueryReq<TQuery> query, string fileName, Expression<Func<TEntity, object>> listExp = null)
where TQuery : DataAbstraction, new()
{
var select = selector(query)
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
.Take(Numbers.MAX_LIMIT_EXPORT);
var select = selector(query).WithNoLockNoWait().Take(Numbers.MAX_LIMIT_EXPORT);
object list = listExp == null ? await select.ToListAsync().ConfigureAwait(false) : await select.ToListAsync(listExp).ConfigureAwait(false);
object list = listExp == null
? await select.ToListAsync().ConfigureAwait(false)
: await select.ToListAsync(listExp).ConfigureAwait(false);
return await GetExportFileStreamAsync<TExport>(fileName, list).ConfigureAwait(false);
}
@ -73,8 +72,8 @@ public abstract class RepositoryService<TEntity, TPrimary, TLogger>(BasicReposit
/// <returns>更新行数</returns>
protected Task<int> UpdateAsync( //
TEntity newValue //
, IEnumerable<string> includeFields //
, string[] excludeFields = null //
, List<string> includeFields = null //
, List<string> excludeFields = null //
, Expression<Func<TEntity, bool>> whereExp = null //
, string whereSql = null //
, bool ignoreVersion = false)
@ -98,8 +97,8 @@ public abstract class RepositoryService<TEntity, TPrimary, TLogger>(BasicReposit
/// <returns>更新后的实体列表</returns>
protected Task<List<TEntity>> UpdateReturnListAsync( //
TEntity newValue //
, IEnumerable<string> includeFields //
, string[] excludeFields = null //
, List<string> includeFields = null //
, List<string> excludeFields = null //
, Expression<Func<TEntity, bool>> whereExp = null //
, string whereSql = null //
, bool ignoreVersion = false)
@ -136,22 +135,22 @@ public abstract class RepositoryService<TEntity, TPrimary, TLogger>(BasicReposit
return new FileStreamResult(stream, Chars.FLG_HTTP_HEADER_VALUE_APPLICATION_OCTET_STREAM);
}
private IUpdate<TEntity> BuildUpdate( //
TEntity entity //
, IEnumerable<string> includeFields //
, string[] excludeFields = null //
, bool ignoreVersion = false)
private IUpdate<TEntity> BuildUpdate(TEntity entity, List<string> includeFields, List<string> excludeFields, bool ignoreVersion)
{
var updateExp = includeFields == null
? Rpo.UpdateDiy.SetSource(entity)
: Rpo.UpdateDiy.SetDto(includeFields!.ToDictionary(
x => x, x => typeof(TEntity).GetProperty(x, BindingFlags.Public | BindingFlags.Instance)!.GetValue(entity)));
if (excludeFields != null) {
updateExp = updateExp.IgnoreColumns(excludeFields);
IUpdate<TEntity> updateExp;
if (includeFields.NullOrEmpty()) {
updateExp = Rpo.UpdateDiy.SetSource(entity);
if (!excludeFields.NullOrEmpty()) {
updateExp = updateExp.IgnoreColumns(excludeFields.ToArray());
}
}
else {
updateExp = Rpo.UpdateDiy.SetDto(includeFields!.ToDictionary(
x => x
, x => typeof(TEntity).GetProperty(x, BindingFlags.Public | BindingFlags.Instance)!.GetValue(entity)));
if (!ignoreVersion && entity is IFieldVersion ver) {
updateExp = updateExp.Where($"{nameof(IFieldVersion.Version)} = @version", new { version = ver.Version });
updateExp = updateExp.Where($"{nameof(IFieldVersion.Version)} = {ver.Version}");
}
}
return updateExp;

View File

@ -3,6 +3,7 @@ using NetAdmin.Application.Services.Tpl.Dependency;
using NetAdmin.Domain.DbMaps.Tpl;
using NetAdmin.Domain.Dto.Dependency;
using NetAdmin.Domain.Dto.Tpl.Example;
using NetAdmin.Domain.Extensions;
namespace NetAdmin.Application.Services.Tpl;
@ -28,11 +29,22 @@ public sealed class ExampleService(BasicRepository<Tpl_Example, long> rpo) //
public Task<long> CountAsync(QueryReq<QueryExampleReq> req)
{
req.ThrowIfInvalid();
return QueryInternal(req)
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
.CountAsync();
return QueryInternal(req).WithNoLockNoWait().CountAsync();
}
/// <inheritdoc />
public async Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryExampleReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req with { Order = Orders.None })
.WithNoLockNoWait()
.GroupBy(req.GetToListExp<Tpl_Example>())
.ToDictionaryAsync(a => a.Count())
.ConfigureAwait(false);
return ret.Select(x => new KeyValuePair<IImmutableDictionary<string, string>, int>(
req.RequiredFields.ToImmutableDictionary(y => y, y => typeof(Tpl_Example).GetProperty(y)!.GetValue(x.Key)!.ToString())
, x.Value))
.OrderByDescending(x => x.Value);
}
/// <inheritdoc />
@ -51,14 +63,14 @@ public sealed class ExampleService(BasicRepository<Tpl_Example, long> rpo) //
}
/// <inheritdoc />
public Task<bool> ExistAsync(QueryReq<QueryExampleReq> req)
public async Task<QueryExampleRsp> EditAsync(EditExampleReq req)
{
req.ThrowIfInvalid();
return QueryInternal(req)
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
return (await UpdateReturnListAsync(req).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryExampleRsp>();
#else
return await UpdateAsync(req).ConfigureAwait(false) > 0 ? await GetAsync(new QueryExampleReq { Id = req.Id }).ConfigureAwait(false) : null;
#endif
.AnyAsync();
}
/// <inheritdoc />
@ -82,11 +94,9 @@ public sealed class ExampleService(BasicRepository<Tpl_Example, long> rpo) //
req.ThrowIfInvalid();
var list = await QueryInternal(req)
.Page(req.Page, req.PageSize)
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
.WithNoLockNoWait()
.Count(out var total)
.ToListAsync()
.ToListAsync(req)
.ConfigureAwait(false);
return new PagedQueryRsp<QueryExampleRsp>(req.Page, req.PageSize, total, list.Adapt<IEnumerable<QueryExampleRsp>>());
@ -96,13 +106,7 @@ public sealed class ExampleService(BasicRepository<Tpl_Example, long> rpo) //
public async Task<IEnumerable<QueryExampleRsp>> QueryAsync(QueryReq<QueryExampleReq> req)
{
req.ThrowIfInvalid();
var ret = await QueryInternal(req)
#if DBTYPE_SQLSERVER
.WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait)
#endif
.Take(req.Count)
.ToListAsync()
.ConfigureAwait(false);
var ret = await QueryInternal(req).WithNoLockNoWait().Take(req.Count).ToListAsync(req).ConfigureAwait(false);
return ret.Adapt<IEnumerable<QueryExampleRsp>>();
}

View File

@ -21,6 +21,12 @@ public sealed class ExampleCache(IDistributedCache cache, IExampleService servic
return Service.CountAsync(req);
}
/// <inheritdoc />
public Task<IOrderedEnumerable<KeyValuePair<IImmutableDictionary<string, string>, int>>> CountByAsync(QueryReq<QueryExampleReq> req)
{
return Service.CountByAsync(req);
}
/// <inheritdoc />
public Task<QueryExampleRsp> CreateAsync(CreateExampleReq req)
{
@ -34,9 +40,9 @@ public sealed class ExampleCache(IDistributedCache cache, IExampleService servic
}
/// <inheritdoc />
public Task<bool> ExistAsync(QueryReq<QueryExampleReq> req)
public Task<QueryExampleRsp> EditAsync(EditExampleReq req)
{
return Service.ExistAsync(req);
return Service.EditAsync(req);
}
/// <inheritdoc />

View File

@ -1,6 +1,6 @@
using NetAdmin.SysComponent.Domain.Dto.Sys.Api;
using NetAdmin.Domain.Dto.Sys.Api;
namespace NetAdmin.SysComponent.Domain.Attributes.DataValidation;
namespace NetAdmin.Domain.Attributes.DataValidation;
/// <summary>
/// 接口编码验证器
@ -11,12 +11,15 @@ public sealed class ApiIdAttribute : ValidationAttribute
/// <inheritdoc />
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
{
var service = App.GetService(App.EffectiveTypes.Single(x => x.FullName == "NetAdmin.SysComponent.Cache.Sys.Dependency.IApiCache"));
var service = App.GetService(
App.EffectiveTypes.Single(x => x.FullName == "NetAdmin.SysComponent.Application.Services.Sys.Dependency.IApiService"));
var req = new QueryReq<QueryApiReq> { Filter = new QueryApiReq { Id = value as string } };
var method = service.GetType().GetMethod("ExistAsync");
#pragma warning disable VSTHRD002
var exist = ((Task<bool>)method!.Invoke(service, [req]))!.ConfigureAwait(false).GetAwaiter().GetResult();
#pragma warning restore VSTHRD002
return !exist ? new ValidationResult(Ln.) : ValidationResult.Success;
}
}

Some files were not shown because too many files have changed in this diff Show More