diff --git a/.gitignore b/.gitignore index 2f9ee45d..8d2484a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,7 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore -dist/ -appsettings.Production.json -appsettings.Development.json -wwwroot # User-specific files -*.rsuser *.suo *.user *.userosscache @@ -24,21 +17,16 @@ wwwroot [Rr]eleases/ x64/ x86/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ -# Visual Studio 2015/2017 cache/options directory +# Visual Studio 2015 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ -# Visual Studio 2017 auto generated files -Generated\ Files/ - # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* @@ -52,28 +40,18 @@ TestResult.xml [Rr]eleasePS/ dlldata.c -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core +# DNX project.lock.json -project.fragment.lock.json artifacts/ -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio *_i.c *_p.c -*_h.h +*_i.h *.ilk *.meta *.obj -*.iobj *.pch *.pdb -*.ipdb *.pgc *.pgd *.rsp @@ -83,7 +61,6 @@ StyleCopReport.xml *.tlh *.tmp *.tmp_proj -*_wpftmp.csproj *.log *.vspscc *.vssscc @@ -112,9 +89,6 @@ ipch/ *.vspx *.sap -# Visual Studio Trace Files -*.e2e - # TFS 2012 Local Workspace $tf/ @@ -135,14 +109,6 @@ _TeamCity* # DotCover is a Code Coverage Tool *.dotCover -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Visual Studio code coverage results -*.coverage -*.coveragexml - # NCrunch _NCrunch_* .*crunch*.local.xml @@ -174,7 +140,7 @@ publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, +# TODO: Comment the next line if you want to checkin your web deploy settings # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj @@ -187,12 +153,12 @@ PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* +**/packages/* # except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ +!**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files *.nuget.props *.nuget.targets @@ -209,13 +175,12 @@ AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt -*.appx # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache -!?*.[Cc]ache/ +!*.[Cc]ache/ # Others ClientBin/ @@ -223,15 +188,11 @@ ClientBin/ *~ *.dbmdl *.dbproj.schemaview -*.jfm *.pfx *.publishsettings +node_modules/ orleans.codegen.cs -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ @@ -246,20 +207,15 @@ _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak # SQL Server files *.mdf *.ldf -*.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings -*.rptproj.rsuser -*- Backup*.rdl # Microsoft Fakes FakesAssemblies/ @@ -269,7 +225,6 @@ FakesAssemblies/ # Node.js Tools for Visual Studio .ntvs_analysis.dat -node_modules/ # Visual Studio 6 build log *.plg @@ -277,9 +232,6 @@ node_modules/ # Visual Studio 6 workspace options file *.opt -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts @@ -299,48 +251,15 @@ paket-files/ .idea/ *.sln.iml -# CodeRush personal settings -.cr/personal +# BookStore +src/Acme.BookStore.Web/Logs/* +src/Acme.BookStore.Web.Host/Logs/* +src/Acme.BookStore.AuthServer/Logs/* +src/Acme.BookStore.HttpApi.Host/Logs/* +src/Acme.BookStore.HttpApi.HostWithIds/Logs/* +src/Acme.BookStore.DbMigrator/Logs/* +src/Acme.BookStore.Blazor.Server/Logs/* +src/Acme.BookStore.Blazor.Server.Tiered/Logs/* -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -appsettings.Development.json +# Use abp install-libs to restore. +**/wwwroot/libs/* diff --git a/LICENSE b/LICENSE index de980666..2fbd598e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 jacktang +Copyright (c) 2023 橙子 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.en.md b/README.en.md new file mode 100644 index 00000000..d5f7dabe --- /dev/null +++ b/README.en.md @@ -0,0 +1,36 @@ +# YiAbp + +#### Description +{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} + +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request + + +#### Gitee Feature + +1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md +2. Gitee blog [blog.gitee.com](https://blog.gitee.com) +3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) +4. The most valuable open source project [GVP](https://gitee.com/gvp) +5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index cd690d9c..8fc0ba02 100644 --- a/README.md +++ b/README.md @@ -1,289 +1,39 @@ -

Yi框架

-

一套以用户体验出发的.Net6 Web开源框架

-
支持原生版本、Furion版本、Abp版本,前端后台接入Ruoyi Vue3.0
-

集大成者,终究轮子

+# YiAbp -[English](README-en.md) | 简体中文 +#### 介绍 +{**以下是 Gitee 平台说明,您可以替换此简介** +Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 +无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} -![sdk](https://img.shields.io/badge/sdk-6.0.1-d.svg)![License MIT](https://img.shields.io/badge/license-Apache-blue.svg?style=flat-square) +#### 软件架构 +软件架构说明 -**** -### 简介: -**中文:意框架**(和他的名字一样“简易”,同时接入Java的Ruoyi Vue3.0前端) -模块分化较多,可根据业务自行引用或抛弃,集大成者,大而全乎,也许你能从中学习到一些独特见解 +#### 安装教程 -**英文:YiFramework** +1. xxxx +2. xxxx +3. xxxx -Yi框架-一套与SqlSugar一样爽的.Net6开源框架。 -与Sqlsugar理念一致,以用户体验出发。 -适合.Net6学习、Sqlsugar学习 、项目二次开发。 -集大成者,终究轮子 +#### 使用说明 -Yi框架最新版本标签:`v3.0.0`,具体版本可以查看标签迭代 +1. xxxx +2. xxxx +3. xxxx -(项目与Sqlsugar同步更新,但这作者老杰哥代码天天爆肝到凌晨两点,我们也尽量会跟上他的脚步。更新频繁,所以可watching持续关注。) +#### 参与贡献 -————这不仅仅是一个程序,更是一个艺术品,面向艺术的开发! +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. 提交代码 +4. 新建 Pull Request -> 核心特点:简单好用,框架不以打包形式引用,而是直接以项目附带源码给出,自由度拉满,遵循Mit协议,允许随意修改(请注明来源即可) -**分支:** +#### 特技 -(本项目由EFCore版本历经4年不断迭代至Sqlsugar版本,现EFcore版本已弃用,目前sqlsugar已带业务功能) - -- (推荐) **Furion**: 基于Furion分支,回归开发本质,极度简单,用起来贼爽 - -- ~~**Framework**~~: 框架分支,所有东西都在这里 - -- ~~**SqlSugar**:.Net6 DDD领域驱动设计 简单分层微服务架构~~ - -- ~~**SqlSugar-Dev**:为sqlsugar分支的实时开发版本~~ - -- ~~**abp**:基于abp.vnext项目~~ - -**** - -**目录:** - -Yi后端框架分为3个部分: - -- Infrastructure(基础设施,框架底层+sqlsugar+furion) -- Module(应用模块,可选项,例如缓存模块、微信模块、文件模块、日志模块等) -- Application(业务模块,用于开发) - -另外,光说不练假把式,我们不仅仅提供一个空白的框架,还同时提供3个基于yi框架的业务模块,没有听错,目前为1个后端,支持3个前端。各个模块关系解耦,可单独使用其中的任意业务模块 - -- Yi.RuoYi.Vue3:Ruoyi后台管理系统Rbac Vue3前端(推荐) - -- Yi.Furion.Net6:.NET6后端(推荐) - -- Yi.App.Vue3:移动端App Vue3前端 - -- Yi.BBS.Vue3:Web网页端BBS论坛 Vue3+Ts前端 - -后续我们持续更新各大应用模块及业务模块:shop商场、erp进销存、mes工厂系统等 - -业务支持并扩展至各个领域,用于具体项目的二次开发极大复用后端代码及前端代码,以通用的部分+不通的部分快速二开 - - -### 演示地址: - -废话少说直接上地址,**请不要**更改里面的数据 - -官网网址:[ccnetcore.com](https://ccnetcore.com) (已上线,欢迎加入) - -Bbs社区系统:[ccnetcore.com](https://ccnetcore.com) (已上线,欢迎加入) - -Rbac后台管理系统:[yi.ccnetcore.com](http://yi.ccnetcore.com) (已上线)~~管理员账号:cc 、 123456~~ - -App移动端系统:[xxx](xxx)正在部署 - -网关地址:~~[gate.ccnetcore.com/swagger](http://gate.ccnetcore.com/swagger)~~(目前使用单体架构部署,无需网关) - -### 支持: - -- [x] 完全支持单体应用架构 -- [x] 完全支持分布式应用架构 -- [x] 完全支持微服务架构 - -**** -### 详细到爆炸的Yi框架教程导航: - -1. [框架快速开始](https://ccnetcore.com/article/1641733850189139969)(已完成) -2. [框架模块教程](https://ccnetcore.com/article/1641733991574933505)(已完成) -3. [应用模块教程](https://ccnetcore.com/article/1641734073091231745) -4. [Yi.RBAC后台系统](https://ccnetcore.com/article/1641734171128893441) -5. [Yi.BBS社区系统](https://ccnetcore.com/article/1641734308475572225) - -**** -### 它的理念: -优雅的进行快速开发,通常,简单程度与优雅程度不可兼得,Yi框架并不一昧的追求极致的解耦,会站在用户使用角度上,在使用难易度进行考虑衡量 - -例如:我们大部分功能紧密贴合Sqlsugar,虽然缺少其他orm的替换性,但在使用程度上降低的使用难度 - -> 一个面向用户的快速开发后端框架 - -在真正的使用这,你会明白这一点,极致的简单,也是优雅的一种体现。 -**** - -### 特点: -- 面向用户的后端框架,使用简单,适合小型、企业级项目 -- 项目内置源码,不打包 -- 开箱即用 -- 支持模块化 -- 支持动态Api -- 支持属性注入 -- 内置包含大量通用场景模块 -- 等等 - -### 基础设施简介 -- Jwt鉴权 -- 接口级别授权 -- 对象映射 -- O/RM -- 数据过滤 -- 多租户 -- 逻辑删除 -- 审计日志 -- 种子数据 -- 工作单元 -- 模块化 -- 动态Api -- 属性注入 -- 自动依赖注入 -- 当前用户 -- 仓储 -- Crud - - -### 内置模块简介 -- 后台任务 -- 本地缓存 -- 分布式缓存 -- 事件总线 -- 字典管理 -- 文件管理 -- 图片操作 -- Excel操作 -- 操作日志管理 -- Sms短信 -- 微信支付 -- WebFirst代码生成 - -### 业务项目 -- RABC后台管理系统 -- BBS社区系统 -- APP移动端系统 - -> 重复的东西,无需再写一遍,这也是优雅的体现之一 - -**** -### 核心技术 -#### 后端 -C# Asp.NetCore 6.0 -- [x] 动态Api:Cike.AutoApi -- [x] 鉴权授权:Jwt -- [x] 日志:Nlog -- [x] 模块化:StartupModules -- [x] 依赖注入:Autofac -- [x] 对象映射:Mapster -- [x] ORM:SqlsugarCore -- [x] 多租户:Abp -- [x] 后台任务:Quartz.Net -- [x] 本地缓存:MemortCache -- [x] 分布式缓存:CSRedisCore -- [x] 事件总线:Cike.EventBus -- [x] 图像操作:SixLabors.ImageSharp -- [x] Excle操作:ExcelToObject.Npoi - -#### 前端 -js Vue3.2 -- [x] 异步请求:axios -- [x] 图表:echarts -- [x] ui:element-plus -- [x] 存储:pinia -- [x] 路由:vue-router -- [x] 打包:vite - -#### 运维 -- [x] 部署:nginx -- [x] CICD:gitlab+Jenkins -- [x] Docker:harbor - -**** -### 业务支持模块: - -RABC权限管理系统(正在更新) -(采用ruoyi前端) -- 用户管理 -- 角色管理 -- 菜单管理 -- 部门管理 -- 岗位管理 -- 字典管理 -- 参数管理 -- 用户在线 -- 操作日志 -- 登录日志 -- 定时任务 -- 缓存列表 -- 服务监控 -- WebFirst代码生成工具 - - **演示截图:** -![输入图片说明](readme/1.png) -![输入图片说明](readme/2.png) -![输入图片说明](readme/3.png) -![输入图片说明](readme/4.png) -![输入图片说明](readme/5.png) -![输入图片说明](readme/6.png) -![输入图片说明](readme/7.png) -![输入图片说明](readme/8.png) -![输入图片说明](readme/9.png) -![输入图片说明](readme/10.png) -![输入图片说明](readme/1696760969217.jpg) -![输入图片说明](readme/1696761014270.jpg) - -BBS论坛系统(持续迭代) -- 文章管理 -- 评论管理 -- 主题管理 -- 板块管理 -- 点赞管理 -- 等等 - -APP移动端系统(持续迭代) -- 动态查询 -- 我的资料 - -ERP进销存系统(持续迭代) -- 供货商管理 -- 等等 - -SHOP电商系统(持续迭代) -- SPU管理 -- SKU管理 -- 商品规格 -- 商品分类 -- 等等 - - -**** -### 感谢: - -**大力支持**: Eleven神、Sqlsugar上海杰哥、Gerry、哲学的老张 - -[橙子]https://ccnetcore.com - -[lzw]https://github.com/yeslode - -[朝夕教育]https://www.zhaoxiedu.net - -[Sqlsugar老杰哥]https://www.donet5.com/Home/Doc - -[RuYiAdmin如意老兄]https://gitee.com/pang-mingjun/RuYiAdmin - -[ZrAdminNetCore字母老哥]https://gitee.com/izory/ZrAdminNetCore - -[Admin.NET周哥]https://gitee.com/zuohuaijun/Admin.NET - -[Furion百小僧]https://furion.baiqian.ltd/ - -**** -### 联系我们: - -作者QQ:`454313500`,2029年之前作者24小时在线,时刻保持活跃更新。 - -QQ交流群:官方一群(已满)、官方二群(已满)、官方三群:`786308927`(基本已满)、官方四群:`498310311`(新群) - -联系作者,这里人人都是顾问 - -官方网址留言区:[ccnetcore.com](https://ccnetcore.com) - -**** -### FQA: - -前往官网查看留言区 - -[留言区](https://ccnetcore.com/discuss/1641030787056930818) \ No newline at end of file +1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md +2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 +5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/Yi.Abp.Net8/Yi.Abp.sln b/Yi.Abp.Net8/Yi.Abp.sln new file mode 100644 index 00000000..acc24feb --- /dev/null +++ b/Yi.Abp.Net8/Yi.Abp.sln @@ -0,0 +1,201 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34202.233 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Web", "src\Yi.Abp.Web\Yi.Abp.Web.csproj", "{15913E44-DA92-44B9-9AC5-E9457EA34BF5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.SqlSugarCore", "framework\Yi.Framework.SqlSugarCore\Yi.Framework.SqlSugarCore.csproj", "{DC431ECC-C75D-4B01-8B79-4861948179BB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B782C78B-6C17-49E6-A237-3383BA720766}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0D10EEF2-FBAE-4C72-B816-A52823FC299B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "framework", "framework", "{77B949E9-530E-45A5-9657-20F7D5C6875C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "module", "module", "{2317227D-7796-4E7B-BEDB-7CD1CAE7B853}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.SqlSugarCore", "src\Yi.Abp.SqlSugarCore\Yi.Abp.SqlSugarCore.csproj", "{9A7BBA40-28D6-4900-9E1D-D627A516EE72}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Application", "src\Yi.Abp.Application\Yi.Abp.Application.csproj", "{746DBBD6-23E8-4D5D-9D23-E2902BE338BD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Application.Contracts", "src\Yi.Abp.Application.Contracts\Yi.Abp.Application.Contracts.csproj", "{51EEBF59-3D37-4681-981D-56F8D8F8968D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Domain", "src\Yi.Abp.Domain\Yi.Abp.Domain.csproj", "{7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Domain.Shared", "src\Yi.Abp.Domain.Shared\Yi.Abp.Domain.Shared.csproj", "{F4D5A496-BFBE-470B-A05B-CB5823B47E72}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6A5375C6-1D55-4E93-9B19-736F1C68CBC3}" + ProjectSection(SolutionItems) = preProject + common.props = common.props + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.SqlSugarCore.Abstractions", "framework\Yi.Framework.SqlSugarCore.Abstractions\Yi.Framework.SqlSugarCore.Abstractions.csproj", "{FD6D6860-3753-4747-8A26-977E4A3001F9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Core", "framework\Yi.Framework.Core\Yi.Framework.Core.csproj", "{ECE874D4-F882-4EF4-84A6-A842D9B8FBC5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Mapster", "framework\Yi.Framework.Mapster\Yi.Framework.Mapster.csproj", "{1995A019-C8AE-467E-B427-ED57D6CBF44F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.AspNetCore", "framework\Yi.Framework.AspNetCore\Yi.Framework.AspNetCore.csproj", "{F5011C0D-209B-4A98-BBE3-68157503EEF8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Ddd.Application.Contracts", "framework\Yi.Framework.Ddd.Application.Contracts\Yi.Framework.Ddd.Application.Contracts.csproj", "{0A8296A3-C11F-4F13-8E49-6BC8188D4804}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Ddd.Application", "framework\Yi.Framework.Ddd.Application\Yi.Framework.Ddd.Application.csproj", "{F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "rbac", "rbac", "{9CC7A457-1236-40BA-B47B-E7B710A3F061}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Application.Contracts", "module\rbac\Yi.Framework.Rbac.Application.Contracts\Yi.Framework.Rbac.Application.Contracts.csproj", "{1C360956-8CD8-407E-B87F-D0BD57068EB9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Application", "module\rbac\Yi.Framework.Rbac.Application\Yi.Framework.Rbac.Application.csproj", "{4F02B08D-5FE2-460D-BCA5-DA565151AE30}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Domain", "module\rbac\Yi.Framework.Rbac.Domain\Yi.Framework.Rbac.Domain.csproj", "{C04D3F71-1557-46D0-B810-97B1FBB6AB73}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.Domain.Shared", "module\rbac\Yi.Framework.Rbac.Domain.Shared\Yi.Framework.Rbac.Domain.Shared.csproj", "{A2BB899D-4F9A-4184-81BD-94B938E2AB03}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Rbac.SqlSugarCore", "module\rbac\Yi.Framework.Rbac.SqlSugarCore\Yi.Framework.Rbac.SqlSugarCore.csproj", "{4503A2F9-139D-4CBC-AF11-689C34F0D77B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bbs", "bbs", "{E902A945-4F41-4E96-A0DA-9F66CDA22261}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Bbs.Domain.Shared", "module\bbs\Yi.Framework.Bbs.Domain.Shared\Yi.Framework.Bbs.Domain.Shared.csproj", "{EB9349E2-256D-41EB-A345-21635A1361B3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Bbs.Domain", "module\bbs\Yi.Framework.Bbs.Domain\Yi.Framework.Bbs.Domain.csproj", "{4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Bbs.Application.Contracts", "module\bbs\Yi.Framework.Bbs.Application.Contracts\Yi.Framework.Bbs.Application.Contracts.csproj", "{7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Bbs.Application", "module\bbs\Yi.Framework.Bbs.Application\Yi.Framework.Bbs.Application.csproj", "{AD4EE9E6-F4A3-4139-AF05-71388167DE5B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Bbs.SqlSugarCore", "module\bbs\Yi.Framework.Bbs.SqlSugarCore\Yi.Framework.Bbs.SqlSugarCore.csproj", "{6C86BA71-9F87-4E2C-B467-2950D77DCDFA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {15913E44-DA92-44B9-9AC5-E9457EA34BF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15913E44-DA92-44B9-9AC5-E9457EA34BF5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15913E44-DA92-44B9-9AC5-E9457EA34BF5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15913E44-DA92-44B9-9AC5-E9457EA34BF5}.Release|Any CPU.Build.0 = Release|Any CPU + {DC431ECC-C75D-4B01-8B79-4861948179BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DC431ECC-C75D-4B01-8B79-4861948179BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC431ECC-C75D-4B01-8B79-4861948179BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DC431ECC-C75D-4B01-8B79-4861948179BB}.Release|Any CPU.Build.0 = Release|Any CPU + {9A7BBA40-28D6-4900-9E1D-D627A516EE72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A7BBA40-28D6-4900-9E1D-D627A516EE72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A7BBA40-28D6-4900-9E1D-D627A516EE72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A7BBA40-28D6-4900-9E1D-D627A516EE72}.Release|Any CPU.Build.0 = Release|Any CPU + {746DBBD6-23E8-4D5D-9D23-E2902BE338BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {746DBBD6-23E8-4D5D-9D23-E2902BE338BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {746DBBD6-23E8-4D5D-9D23-E2902BE338BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {746DBBD6-23E8-4D5D-9D23-E2902BE338BD}.Release|Any CPU.Build.0 = Release|Any CPU + {51EEBF59-3D37-4681-981D-56F8D8F8968D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51EEBF59-3D37-4681-981D-56F8D8F8968D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51EEBF59-3D37-4681-981D-56F8D8F8968D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51EEBF59-3D37-4681-981D-56F8D8F8968D}.Release|Any CPU.Build.0 = Release|Any CPU + {7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD}.Release|Any CPU.Build.0 = Release|Any CPU + {F4D5A496-BFBE-470B-A05B-CB5823B47E72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F4D5A496-BFBE-470B-A05B-CB5823B47E72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4D5A496-BFBE-470B-A05B-CB5823B47E72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F4D5A496-BFBE-470B-A05B-CB5823B47E72}.Release|Any CPU.Build.0 = Release|Any CPU + {FD6D6860-3753-4747-8A26-977E4A3001F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD6D6860-3753-4747-8A26-977E4A3001F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD6D6860-3753-4747-8A26-977E4A3001F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD6D6860-3753-4747-8A26-977E4A3001F9}.Release|Any CPU.Build.0 = Release|Any CPU + {ECE874D4-F882-4EF4-84A6-A842D9B8FBC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECE874D4-F882-4EF4-84A6-A842D9B8FBC5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECE874D4-F882-4EF4-84A6-A842D9B8FBC5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECE874D4-F882-4EF4-84A6-A842D9B8FBC5}.Release|Any CPU.Build.0 = Release|Any CPU + {1995A019-C8AE-467E-B427-ED57D6CBF44F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1995A019-C8AE-467E-B427-ED57D6CBF44F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1995A019-C8AE-467E-B427-ED57D6CBF44F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1995A019-C8AE-467E-B427-ED57D6CBF44F}.Release|Any CPU.Build.0 = Release|Any CPU + {F5011C0D-209B-4A98-BBE3-68157503EEF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5011C0D-209B-4A98-BBE3-68157503EEF8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5011C0D-209B-4A98-BBE3-68157503EEF8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5011C0D-209B-4A98-BBE3-68157503EEF8}.Release|Any CPU.Build.0 = Release|Any CPU + {0A8296A3-C11F-4F13-8E49-6BC8188D4804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A8296A3-C11F-4F13-8E49-6BC8188D4804}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A8296A3-C11F-4F13-8E49-6BC8188D4804}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A8296A3-C11F-4F13-8E49-6BC8188D4804}.Release|Any CPU.Build.0 = Release|Any CPU + {F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE}.Release|Any CPU.Build.0 = Release|Any CPU + {1C360956-8CD8-407E-B87F-D0BD57068EB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C360956-8CD8-407E-B87F-D0BD57068EB9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C360956-8CD8-407E-B87F-D0BD57068EB9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C360956-8CD8-407E-B87F-D0BD57068EB9}.Release|Any CPU.Build.0 = Release|Any CPU + {4F02B08D-5FE2-460D-BCA5-DA565151AE30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F02B08D-5FE2-460D-BCA5-DA565151AE30}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F02B08D-5FE2-460D-BCA5-DA565151AE30}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F02B08D-5FE2-460D-BCA5-DA565151AE30}.Release|Any CPU.Build.0 = Release|Any CPU + {C04D3F71-1557-46D0-B810-97B1FBB6AB73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C04D3F71-1557-46D0-B810-97B1FBB6AB73}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C04D3F71-1557-46D0-B810-97B1FBB6AB73}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C04D3F71-1557-46D0-B810-97B1FBB6AB73}.Release|Any CPU.Build.0 = Release|Any CPU + {A2BB899D-4F9A-4184-81BD-94B938E2AB03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A2BB899D-4F9A-4184-81BD-94B938E2AB03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A2BB899D-4F9A-4184-81BD-94B938E2AB03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A2BB899D-4F9A-4184-81BD-94B938E2AB03}.Release|Any CPU.Build.0 = Release|Any CPU + {4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4503A2F9-139D-4CBC-AF11-689C34F0D77B}.Release|Any CPU.Build.0 = Release|Any CPU + {EB9349E2-256D-41EB-A345-21635A1361B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB9349E2-256D-41EB-A345-21635A1361B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB9349E2-256D-41EB-A345-21635A1361B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB9349E2-256D-41EB-A345-21635A1361B3}.Release|Any CPU.Build.0 = Release|Any CPU + {4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4EABBC84-BCED-46C1-8CF1-62A7B8081ED7}.Release|Any CPU.Build.0 = Release|Any CPU + {7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20}.Release|Any CPU.Build.0 = Release|Any CPU + {AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD4EE9E6-F4A3-4139-AF05-71388167DE5B}.Release|Any CPU.Build.0 = Release|Any CPU + {6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C86BA71-9F87-4E2C-B467-2950D77DCDFA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {15913E44-DA92-44B9-9AC5-E9457EA34BF5} = {B782C78B-6C17-49E6-A237-3383BA720766} + {DC431ECC-C75D-4B01-8B79-4861948179BB} = {77B949E9-530E-45A5-9657-20F7D5C6875C} + {9A7BBA40-28D6-4900-9E1D-D627A516EE72} = {B782C78B-6C17-49E6-A237-3383BA720766} + {746DBBD6-23E8-4D5D-9D23-E2902BE338BD} = {B782C78B-6C17-49E6-A237-3383BA720766} + {51EEBF59-3D37-4681-981D-56F8D8F8968D} = {B782C78B-6C17-49E6-A237-3383BA720766} + {7B15C198-538A-44ED-A6AA-3A0FEAA1D2BD} = {B782C78B-6C17-49E6-A237-3383BA720766} + {F4D5A496-BFBE-470B-A05B-CB5823B47E72} = {B782C78B-6C17-49E6-A237-3383BA720766} + {FD6D6860-3753-4747-8A26-977E4A3001F9} = {77B949E9-530E-45A5-9657-20F7D5C6875C} + {ECE874D4-F882-4EF4-84A6-A842D9B8FBC5} = {77B949E9-530E-45A5-9657-20F7D5C6875C} + {1995A019-C8AE-467E-B427-ED57D6CBF44F} = {77B949E9-530E-45A5-9657-20F7D5C6875C} + {F5011C0D-209B-4A98-BBE3-68157503EEF8} = {77B949E9-530E-45A5-9657-20F7D5C6875C} + {0A8296A3-C11F-4F13-8E49-6BC8188D4804} = {77B949E9-530E-45A5-9657-20F7D5C6875C} + {F0141C17-0EBD-4261-98D5-1C5B7BC1DFEE} = {77B949E9-530E-45A5-9657-20F7D5C6875C} + {9CC7A457-1236-40BA-B47B-E7B710A3F061} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853} + {1C360956-8CD8-407E-B87F-D0BD57068EB9} = {9CC7A457-1236-40BA-B47B-E7B710A3F061} + {4F02B08D-5FE2-460D-BCA5-DA565151AE30} = {9CC7A457-1236-40BA-B47B-E7B710A3F061} + {C04D3F71-1557-46D0-B810-97B1FBB6AB73} = {9CC7A457-1236-40BA-B47B-E7B710A3F061} + {A2BB899D-4F9A-4184-81BD-94B938E2AB03} = {9CC7A457-1236-40BA-B47B-E7B710A3F061} + {4503A2F9-139D-4CBC-AF11-689C34F0D77B} = {9CC7A457-1236-40BA-B47B-E7B710A3F061} + {E902A945-4F41-4E96-A0DA-9F66CDA22261} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853} + {EB9349E2-256D-41EB-A345-21635A1361B3} = {E902A945-4F41-4E96-A0DA-9F66CDA22261} + {4EABBC84-BCED-46C1-8CF1-62A7B8081ED7} = {E902A945-4F41-4E96-A0DA-9F66CDA22261} + {7E569FD9-B1AB-4848-8AB7-FD9EFA1DBA20} = {E902A945-4F41-4E96-A0DA-9F66CDA22261} + {AD4EE9E6-F4A3-4139-AF05-71388167DE5B} = {E902A945-4F41-4E96-A0DA-9F66CDA22261} + {6C86BA71-9F87-4E2C-B467-2950D77DCDFA} = {E902A945-4F41-4E96-A0DA-9F66CDA22261} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {23D6FBC9-C970-4641-BC1E-2AEA59F51C18} + EndGlobalSection +EndGlobal diff --git a/Yi.Abp.Net8/common.props b/Yi.Abp.Net8/common.props new file mode 100644 index 00000000..f4ca2b1e --- /dev/null +++ b/Yi.Abp.Net8/common.props @@ -0,0 +1,20 @@ + + + latest + 1.0.0 + $(NoWarn);CS1591;CS8618;CS1998;CS8604;CS8620;CS8600;CS8602 + app + $(AssemblyName).xml + + + + + $(NoWarn);0436 + + + + + + + + \ No newline at end of file diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/ApiInfoBuilderExtensions.cs b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/ApiInfoBuilderExtensions.cs new file mode 100644 index 00000000..e94d369a --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/ApiInfoBuilderExtensions.cs @@ -0,0 +1,16 @@ +using JetBrains.Annotations; +using Microsoft.AspNetCore.Builder; +using Yi.Framework.AspNetCore.Microsoft.AspNetCore.Middlewares; + +namespace Yi.Framework.AspNetCore.Microsoft.AspNetCore.Builder +{ + public static class ApiInfoBuilderExtensions + { + public static IApplicationBuilder UseYiApiHandlinge([NotNull] this IApplicationBuilder app) + { + app.UseMiddleware(); + return app; + + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/SwaggerBuilderExtensons.cs b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/SwaggerBuilderExtensons.cs new file mode 100644 index 00000000..d92b19a0 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/SwaggerBuilderExtensons.cs @@ -0,0 +1,45 @@ +using Microsoft.AspNetCore.Builder; + +namespace Yi.Framework.AspNetCore.Microsoft.AspNetCore.Builder +{ + public static class SwaggerBuilderExtensons + { + public static IApplicationBuilder UseYiSwagger(this IApplicationBuilder app, params SwaggerModel[] swaggerModels) + { + app.UseSwagger(); + app.UseSwaggerUI(c => + { + if (swaggerModels.Length == 0) + { + c.SwaggerEndpoint("/swagger/v1/swagger.json", "Yi.Framework"); + } + else + { + foreach (var k in swaggerModels) + { + + c.SwaggerEndpoint(k.Url, k.Name); + } + } + + }); + return app; + } + + } + public class SwaggerModel + { + public SwaggerModel(string name) + { + this.Name = name; + this.Url = "/swagger/v1/swagger.json"; + } + public SwaggerModel(string url, string name) + { + this.Url = url; + this.Name = name; + } + public string Url { get; set; } + public string Name { get; set; } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Middlewares/ApiInfoMiddleware.cs b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Middlewares/ApiInfoMiddleware.cs new file mode 100644 index 00000000..dca67aee --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Middlewares/ApiInfoMiddleware.cs @@ -0,0 +1,16 @@ +using System.Net.Http; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Json; + +namespace Yi.Framework.AspNetCore.Microsoft.AspNetCore.Middlewares +{ + public class ApiInfoMiddleware : IMiddleware, ITransientDependency + { + public async Task InvokeAsync(HttpContext context, RequestDelegate next) + { + await next(context); + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/Extensions/DependencyInjection/SwaggerAddExtensions.cs b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/Extensions/DependencyInjection/SwaggerAddExtensions.cs new file mode 100644 index 00000000..3a54bc11 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Microsoft/Extensions/DependencyInjection/SwaggerAddExtensions.cs @@ -0,0 +1,55 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; + +namespace Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection +{ + public static class SwaggerAddExtensions + { + public static IServiceCollection AddYiSwaggerGen(this IServiceCollection services, Action? action) + { + services.AddAbpSwaggerGen( + options => + { + options.DocInclusionPredicate((docName, description) => true); + options.CustomSchemaIds(type => type.FullName); + var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location); + if (basePath is not null) + { + foreach (var item in Directory.GetFiles(basePath, "*.xml")) + { + options.IncludeXmlComments(item, true); + } + } + + options.AddSecurityDefinition("JwtBearer", new OpenApiSecurityScheme() + { + Description = "直接输入Token即可", + Name = "Authorization", + In = ParameterLocation.Header, + Type = SecuritySchemeType.Http, + Scheme = "bearer" + }); + var scheme = new OpenApiSecurityScheme() + { + Reference = new OpenApiReference() { Type = ReferenceType.SecurityScheme, Id = "JwtBearer" } + }; + options.AddSecurityRequirement(new OpenApiSecurityRequirement() + { + [scheme] = new string[0] + }); + + + if (action is not null) + { + action.Invoke(options); + } + } + ); + + + + return services; + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiConventionalRouteBuilder.cs b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiConventionalRouteBuilder.cs new file mode 100644 index 00000000..3ee0cb31 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiConventionalRouteBuilder.cs @@ -0,0 +1,73 @@ +using JetBrains.Annotations; +using Microsoft.AspNetCore.Mvc.ApplicationModels; +using System.Reflection; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Mvc.Conventions; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Reflection; + +namespace Yi.Framework.AspNetCore.Mvc +{ + [Dependency(ServiceLifetime.Transient, ReplaceServices = true)] + [ExposeServices(typeof(IConventionalRouteBuilder))] + public class YiConventionalRouteBuilder : ConventionalRouteBuilder + { + public YiConventionalRouteBuilder(IOptions options) : base(options) + { + } + public override string Build( + string rootPath, + string controllerName, + ActionModel action, + string httpMethod, + [CanBeNull] ConventionalControllerSetting configuration) + { + + var apiRoutePrefix = GetApiRoutePrefix(action, configuration); + var controllerNameInUrl = + NormalizeUrlControllerName(rootPath, controllerName, action, httpMethod, configuration); + + var url = $"{apiRoutePrefix}/{rootPath}/{NormalizeControllerNameCase(controllerNameInUrl, configuration)}"; + + //Add {id} path if needed + var idParameterModel = action.Parameters.FirstOrDefault(p => p.ParameterName == "id"); + if (idParameterModel != null) + { + if (TypeHelper.IsPrimitiveExtended(idParameterModel.ParameterType, includeEnums: true)) + { + url += "/{id}"; + } + else + { + var properties = idParameterModel + .ParameterType + .GetProperties(BindingFlags.Instance | BindingFlags.Public); + + foreach (var property in properties) + { + url += "/{" + NormalizeIdPropertyNameCase(property, configuration) + "}"; + } + } + } + + //Add action name if needed + var actionNameInUrl = NormalizeUrlActionName(rootPath, controllerName, action, httpMethod, configuration); + if (!actionNameInUrl.IsNullOrEmpty()) + { + url += $"/{NormalizeActionNameCase(actionNameInUrl, configuration)}"; + + //Add secondary Id + var secondaryIds = action.Parameters + .Where(p => p.ParameterName.EndsWith("Id", StringComparison.Ordinal)).ToList(); + if (secondaryIds.Count == 1) + { + url += $"/{{{NormalizeSecondaryIdNameCase(secondaryIds[0], configuration)}}}"; + } + } + + return url; + } + + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiServiceConvention.cs b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiServiceConvention.cs new file mode 100644 index 00000000..a1932cf4 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiServiceConvention.cs @@ -0,0 +1,99 @@ +using JetBrains.Annotations; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ActionConstraints; +using Microsoft.AspNetCore.Mvc.ApplicationModels; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using Volo.Abp; +using Volo.Abp.AspNetCore; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.Conventions; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Reflection; + +namespace Yi.Framework.AspNetCore.Mvc +{ + [Dependency(ServiceLifetime.Transient, ReplaceServices = true)] + [ExposeServices(typeof(IAbpServiceConvention))] + public class YiServiceConvention : AbpServiceConvention + { + public YiServiceConvention(IOptions options, IConventionalRouteBuilder conventionalRouteBuilder) : base(options, conventionalRouteBuilder) + { + } + + protected override void ConfigureSelector(string rootPath, string controllerName, ActionModel action, ConventionalControllerSetting? configuration) + { + RemoveEmptySelectors(action.Selectors); + + var remoteServiceAtt = ReflectionHelper.GetSingleAttributeOrDefault(action.ActionMethod); + if (remoteServiceAtt != null && !remoteServiceAtt.IsEnabledFor(action.ActionMethod)) + { + return; + } + + if (!action.Selectors.Any()) + { + AddAbpServiceSelector(rootPath, controllerName, action, configuration); + } + else + { + NormalizeSelectorRoutes(rootPath, controllerName, action, configuration); + } + } + + + protected override void AddAbpServiceSelector(string rootPath, string controllerName, ActionModel action, ConventionalControllerSetting? configuration) + { + if (action.ActionName.ToLower().Contains("vue")) + { + } + base.AddAbpServiceSelector(rootPath, controllerName, action, configuration); + } + + protected override void NormalizeSelectorRoutes(string rootPath, string controllerName, ActionModel action, ConventionalControllerSetting? configuration) + { + foreach (var selector in action.Selectors) + { + var httpMethod = selector.ActionConstraints + .OfType() + .FirstOrDefault()? + .HttpMethods? + .FirstOrDefault(); + + if (httpMethod == null) + { + httpMethod = SelectHttpMethod(action, configuration); + } + + if (selector.AttributeRouteModel == null) + { + selector.AttributeRouteModel = CreateAbpServiceAttributeRouteModel(rootPath, controllerName, action, httpMethod, configuration); + } + else + { + + var template = selector.AttributeRouteModel.Template; + if (!template.StartsWith("/")) + { + var route = $"{AbpAspNetCoreConsts.DefaultApiPrefix}/{rootPath}/{template}"; + selector.AttributeRouteModel.Template = route; + + } + + } + + + + if (!selector.ActionConstraints.OfType().Any()) + { + selector.ActionConstraints.Add(new HttpMethodActionConstraint(new[] { httpMethod })); + } + + + } + } + + + + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/RemoteServiceSuccessInfo.cs b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/RemoteServiceSuccessInfo.cs new file mode 100644 index 00000000..297c82aa --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/RemoteServiceSuccessInfo.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Yi.Framework.AspNetCore +{ + [Serializable] + public class RemoteServiceSuccessInfo + { + /// + /// Creates a new instance of . + /// + public RemoteServiceSuccessInfo() + { + + } + + /// + /// Creates a new instance of . + /// + /// Error code + /// Error details + /// Error message + /// Error data + public RemoteServiceSuccessInfo(string message, string? details = null, string? code = null, object? data = null) + { + Message = message; + Details = details; + Code = code; + Data = data; + } + + /// + /// code. + /// + public string? Code { get; set; } + + /// + /// message. + /// + public string? Message { get; set; } + + /// + /// details. + /// + public string? Details { get; set; } + + /// + /// data. + /// + public object? Data { get; set; } + + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.csproj b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.csproj new file mode 100644 index 00000000..f554f347 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.csproj @@ -0,0 +1,22 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.xml b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.xml new file mode 100644 index 00000000..db1b7d18 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.xml @@ -0,0 +1,42 @@ + + + + Yi.Framework.AspNetCore + + + + + Creates a new instance of . + + + + + Creates a new instance of . + + Error code + Error details + Error message + Error data + + + + code. + + + + + message. + + + + + details. + + + + + data. + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/YiFrameworkAspNetCoreModule.cs b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/YiFrameworkAspNetCoreModule.cs new file mode 100644 index 00000000..702a0729 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/YiFrameworkAspNetCoreModule.cs @@ -0,0 +1,17 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Volo.Abp.Modularity; +using Yi.Framework.AspNetCore.Mvc; +using Yi.Framework.Core; + +namespace Yi.Framework.AspNetCore +{ + [DependsOn(typeof(YiFrameworkCoreModule) + )] + public class YiFrameworkAspNetCoreModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + } + } +} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/FileTypeEnum.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/FileTypeEnum.cs similarity index 87% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/FileTypeEnum.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/FileTypeEnum.cs index 1885e14a..1776d35f 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/FileTypeEnum.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/FileTypeEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Enums +namespace Yi.Framework.Core.Enums { /// /// 定义公共文件路径 diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/OrderByEnum.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/OrderByEnum.cs similarity index 81% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/OrderByEnum.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/OrderByEnum.cs index 5856cf3b..b1edac3a 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/OrderByEnum.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/OrderByEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Enums +namespace Yi.Framework.Core.Enums { public enum OrderByEnum { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/QueryOperatorEnum.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/QueryOperatorEnum.cs similarity index 97% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/QueryOperatorEnum.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/QueryOperatorEnum.cs index 7f959c2f..13439675 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/QueryOperatorEnum.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/QueryOperatorEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Enums +namespace Yi.Framework.Core.Enums { public enum QueryOperatorEnum { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/ResultCodeEnum.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/ResultCodeEnum.cs similarity index 92% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/ResultCodeEnum.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/ResultCodeEnum.cs index 76a76221..e4197867 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Enums/ResultCodeEnum.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Enums/ResultCodeEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Enums +namespace Yi.Framework.Core.Enums { public enum ResultCodeEnum { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/HttpContextExtensions.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Extensions/HttpContextExtensions.cs similarity index 90% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/HttpContextExtensions.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Extensions/HttpContextExtensions.cs index 10aff64b..e83cdf8c 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/HttpContextExtensions.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Extensions/HttpContextExtensions.cs @@ -1,12 +1,8 @@ -using Microsoft.AspNetCore.Http; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; -namespace Yi.Framework.Infrastructure.AspNetCore +namespace Yi.Framework.Core.Extensions { public static class HttpContextExtensions { @@ -95,5 +91,10 @@ namespace Yi.Framework.Infrastructure.AspNetCore { return context.Request.Headers["User-Agent"]; } + + public static string[]? GetUserPermissions(this HttpContext context, string permissionsName) + { + return context.User.Claims.Where(x => x.Type == permissionsName).Select(x => x.Value).ToArray(); + } } } diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/AssemblyHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/AssemblyHelper.cs similarity index 98% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/AssemblyHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/AssemblyHelper.cs index a88f371e..7f646689 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/AssemblyHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/AssemblyHelper.cs @@ -5,7 +5,7 @@ using System.Reflection; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class AssemblyHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/Base32Helper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/Base32Helper.cs similarity index 98% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/Base32Helper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/Base32Helper.cs index b503bd3d..288bee5b 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/Base32Helper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/Base32Helper.cs @@ -1,7 +1,7 @@ using System; using System.Text; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public sealed class Base32Helper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ComputerHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ComputerHelper.cs similarity index 73% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ComputerHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ComputerHelper.cs index 1ab82a26..2c0acec4 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ComputerHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ComputerHelper.cs @@ -1,11 +1,84 @@ using System.Runtime.InteropServices; using Newtonsoft.Json; -using Yi.Framework.Infrastructure.Extensions; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class ComputerHelper { + + /// + /// 将object转换为long,若转换失败,则返回0。不抛出异常。 + /// + /// + /// + private static long ParseToLong( object obj) + { + try + { + return long.Parse(obj.ToString()); + } + catch + { + return 0L; + } + } + + /// + /// 将string转换为DateTime,若转换失败,则返回日期最小值。不抛出异常。 + /// + /// + /// + private static DateTime ParseToDateTime( string str) + { + try + { + if (string.IsNullOrWhiteSpace(str)) + { + return DateTime.MinValue; + } + if (str.Contains("-") || str.Contains("/")) + { + return DateTime.Parse(str); + } + else + { + int length = str.Length; + switch (length) + { + case 4: + return DateTime.ParseExact(str, "yyyy", System.Globalization.CultureInfo.CurrentCulture); + case 6: + return DateTime.ParseExact(str, "yyyyMM", System.Globalization.CultureInfo.CurrentCulture); + case 8: + return DateTime.ParseExact(str, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture); + case 10: + return DateTime.ParseExact(str, "yyyyMMddHH", System.Globalization.CultureInfo.CurrentCulture); + case 12: + return DateTime.ParseExact(str, "yyyyMMddHHmm", System.Globalization.CultureInfo.CurrentCulture); + case 14: + return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture); + default: + return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture); + } + } + } + catch + { + return DateTime.MinValue; + } + } + private static double ParseToDouble(object obj) + { + try + { + return double.Parse(obj.ToString()); + } + catch + { + return 0; + } + } + /// /// 内存使用情况 /// @@ -21,7 +94,7 @@ namespace Yi.Framework.Infrastructure.Helper memoryMetrics.UsedRam = Math.Round(memoryMetrics.Used / 1024, 2) + "GB"; memoryMetrics.TotalRAM = Math.Round(memoryMetrics.Total / 1024, 2) + "GB"; memoryMetrics.RAMRate = Math.Ceiling(100 * memoryMetrics.Used / memoryMetrics.Total).ToString() + "%"; - memoryMetrics.CPURate = Math.Ceiling(GetCPURate().ParseToDouble()) + "%"; + memoryMetrics.CPURate = Math.Ceiling(ParseToDouble(GetCPURate())) + "%"; return memoryMetrics; } catch (Exception ex) @@ -130,7 +203,7 @@ namespace Yi.Framework.Infrastructure.Helper if (IsUnix()) { string output = ShellHelper.Bash("uptime -s").Trim(); - runTime = DateTimeHelper.FormatTime((DateTime.Now - output.ParseToDateTime()).TotalMilliseconds.ToString().Split('.')[0].ParseToLong()); + runTime = DateTimeHelper.FormatTime(ParseToLong((DateTime.Now - ParseToDateTime(output)).TotalMilliseconds.ToString().Split('.')[0])); } else { @@ -138,7 +211,7 @@ namespace Yi.Framework.Infrastructure.Helper string[] outputArr = output.Split('=', (char)StringSplitOptions.RemoveEmptyEntries); if (outputArr.Length == 2) { - runTime = DateTimeHelper.FormatTime((DateTime.Now - outputArr[1].Split('.')[0].ParseToDateTime()).TotalMilliseconds.ToString().Split('.')[0].ParseToLong()); + runTime = DateTimeHelper.FormatTime(ParseToLong((DateTime.Now - ParseToDateTime( outputArr[1].Split('.')[0])).TotalMilliseconds.ToString().Split('.')[0])); } } } diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ConsoleHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ConsoleHelper.cs similarity index 97% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ConsoleHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ConsoleHelper.cs index 66c2252c..dfd6a8ab 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ConsoleHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ConsoleHelper.cs @@ -1,6 +1,6 @@ using System; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class ConsoleHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/DateHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DateHelper.cs similarity index 97% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/DateHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DateHelper.cs index 44495f82..620da6d1 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/DateHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DateHelper.cs @@ -1,6 +1,6 @@ using System; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class DateHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/DateTimeHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DateTimeHelper.cs similarity index 99% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/DateTimeHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DateTimeHelper.cs index 206da822..41b069c1 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/DateTimeHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DateTimeHelper.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class DateTimeHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/DistinctHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DistinctHelper.cs similarity index 96% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/DistinctHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DistinctHelper.cs index 32444dda..0f630bc1 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/DistinctHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/DistinctHelper.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class Compare : IEqualityComparer { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/EnumHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/EnumHelper.cs similarity index 93% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/EnumHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/EnumHelper.cs index af984a8f..eaef0d79 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/EnumHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/EnumHelper.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class EnumHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ExpressionHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ExpressionHelper.cs similarity index 98% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ExpressionHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ExpressionHelper.cs index 734e6e62..bac80dc0 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ExpressionHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ExpressionHelper.cs @@ -5,7 +5,7 @@ using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class ExpressionHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/FileHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/FileHelper.cs similarity index 99% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/FileHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/FileHelper.cs index 80c331ed..906b7253 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/FileHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/FileHelper.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System.Text; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class FileHelper : IDisposable { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/HtmlHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/HtmlHelper.cs similarity index 93% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/HtmlHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/HtmlHelper.cs index 893253b9..857de345 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/HtmlHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/HtmlHelper.cs @@ -1,4 +1,4 @@ -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class HtmlHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/HttpHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/HttpHelper.cs similarity index 99% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/HttpHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/HttpHelper.cs index 8abcc5b1..9e95b6e7 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/HttpHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/HttpHelper.cs @@ -10,7 +10,7 @@ using System.Text.Json; using System.Text.RegularExpressions; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class HttpHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/IdHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/IdHelper.cs similarity index 87% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/IdHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/IdHelper.cs index ed4e7821..17f60534 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/IdHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/IdHelper.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class IdHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/IpHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/IpHelper.cs similarity index 97% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/IpHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/IpHelper.cs index 888f9db1..f5d45956 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/IpHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/IpHelper.cs @@ -3,7 +3,7 @@ using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class IpHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/JsonHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/JsonHelper.cs similarity index 98% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/JsonHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/JsonHelper.cs index 2daf839f..4c15038a 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/JsonHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/JsonHelper.cs @@ -1,10 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; -using System; -using System.Collections.Generic; -using System.Text.Json; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class JsonHelper { @@ -37,7 +34,6 @@ namespace Yi.Framework.Infrastructure.Helper string result = string.Empty; try { - System.Text.Json.JsonSerializer.Serialize(""); System.Runtime.Serialization.Json.DataContractJsonSerializer serializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(T)); using (MemoryStream ms = new MemoryStream()) @@ -454,7 +450,7 @@ namespace Yi.Framework.Infrastructure.Helper { return; } - //示例 ["aa",{"bbbb":123,"fff","ddd"}] + //示例 ["aa",{"bbbb":123,"fff","Ddd"}] switch (c) { case '{'://[{ "[{A}]":[{"[{B}]":3,"m":"C"}]}] diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/MD5Hepler.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/MD5Hepler.cs similarity index 99% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/MD5Hepler.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/MD5Hepler.cs index e7c2c000..d6ce9ab7 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/MD5Hepler.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/MD5Hepler.cs @@ -3,7 +3,7 @@ using System.IO; using System.Security.Cryptography; using System.Text; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class MD5Helper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/MimeHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/MimeHelper.cs similarity index 99% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/MimeHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/MimeHelper.cs index 50398493..4489545b 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/MimeHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/MimeHelper.cs @@ -4,9 +4,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Enums; +using Yi.Framework.Core.Enums; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class MimeHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/RSAFileHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RSAFileHelper.cs similarity index 95% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/RSAFileHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RSAFileHelper.cs index 45457292..dbf31516 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/RSAFileHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RSAFileHelper.cs @@ -6,7 +6,7 @@ using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class RSAFileHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/RSAHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RSAHelper.cs similarity index 99% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/RSAHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RSAHelper.cs index fe171e12..b315147c 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/RSAHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RSAHelper.cs @@ -3,7 +3,7 @@ using System.IO; using System.Security.Cryptography; using System.Text; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { /// /// RSA加解密 使用OpenSSL的公钥加密/私钥解密 diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/RandomHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RandomHelper.cs similarity index 98% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/RandomHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RandomHelper.cs index 5846e9b8..36c72a86 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/RandomHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/RandomHelper.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class RandomHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ReflexHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ReflexHelper.cs similarity index 97% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ReflexHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ReflexHelper.cs index 8ad4300d..33316b1d 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ReflexHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ReflexHelper.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class ReflexHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ShellHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ShellHelper.cs similarity index 97% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ShellHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ShellHelper.cs index 2c078810..e9ffc4af 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/ShellHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/ShellHelper.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Text; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class ShellHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/StringHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/StringHelper.cs similarity index 98% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/StringHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/StringHelper.cs index c6b21cb0..95e20458 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/StringHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/StringHelper.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System.Text; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class StringHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/TreeHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/TreeHelper.cs similarity index 91% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/TreeHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/TreeHelper.cs index 1e972eec..55d47b7d 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/TreeHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/TreeHelper.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class TreeHelper { @@ -13,7 +13,7 @@ namespace Yi.Framework.Infrastructure.Helper if (list is not null && list.Count > 0) { IList result = new List(); - long pid = list.Min(m => (m as ITreeModel)!.ParentId); + Guid pid = list.Min(m => (m as ITreeModel)!.ParentId); IList t = list.Where(m => (m as ITreeModel)!.ParentId == pid).ToList(); foreach (T model in t) { @@ -57,8 +57,8 @@ namespace Yi.Framework.Infrastructure.Helper public interface ITreeModel { - public long Id { get; set; } - public long ParentId { get; set; } + public Guid Id { get; set; } + public Guid ParentId { get; set; } public int OrderNum { get; set; } public List? Children { get; set; } diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/UnicodeHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/UnicodeHelper.cs similarity index 97% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/UnicodeHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/UnicodeHelper.cs index 45023aca..0d8e737f 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/UnicodeHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/UnicodeHelper.cs @@ -2,7 +2,7 @@ using System.Text; using System.Text.RegularExpressions; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public static class UnicodeHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/UrlHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/UrlHelper.cs similarity index 93% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/UrlHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/UrlHelper.cs index 62f227d9..f213c4c6 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/UrlHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/UrlHelper.cs @@ -1,4 +1,4 @@ -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class UrlHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/XmlHelper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/XmlHelper.cs similarity index 96% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/XmlHelper.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/XmlHelper.cs index 952a2959..8ed7379b 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/XmlHelper.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Helper/XmlHelper.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Xml.Serialization; -namespace Yi.Framework.Infrastructure.Helper +namespace Yi.Framework.Core.Helper { public class XmlHelper { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/IOrderNum.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/IOrderNum.cs similarity index 79% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/IOrderNum.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/IOrderNum.cs index 4da6f86e..15f55d19 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/IOrderNum.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/IOrderNum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Data.Entities +namespace Yi.Framework.Core { public interface IOrderNum { diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/IState.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/IState.cs similarity index 79% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/IState.cs rename to Yi.Abp.Net8/framework/Yi.Framework.Core/IState.cs index 2f393315..627c0cd5 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/IState.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/IState.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Data.Entities +namespace Yi.Framework.Core { public interface IState { diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Core/Yi.Framework.Core.csproj b/Yi.Abp.Net8/framework/Yi.Framework.Core/Yi.Framework.Core.csproj new file mode 100644 index 00000000..3ef2921b --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Yi.Framework.Core.csproj @@ -0,0 +1,15 @@ + + + + net7.0 + enable + enable + + + + + + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Core/Yi.Framework.Core.xml b/Yi.Abp.Net8/framework/Yi.Framework.Core/Yi.Framework.Core.xml new file mode 100644 index 00000000..8182b339 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Yi.Framework.Core.xml @@ -0,0 +1,847 @@ + + + + Yi.Framework.Core + + + + + 定义公共文件路径 + + + + + 相等 + + + + + 匹配 + + + + + 大于 + + + + + 大于或等于 + + + + + 小于 + + + + + 小于或等于 + + + + + 等于集合 + + + + + 不等于集合 + + + + + 左边匹配 + + + + + 右边匹配 + + + + + 不相等 + + + + + 为空或空 + + + + + 不为空 + + + + + 不匹配 + + + + + 时间段 值用 "|" 隔开 + + + + + 操作成功。 + + + + + 操作不成功 + + + + + 无权限 + + + + + 被拒绝 + + + + + 设置文件下载名称 + + + + + + + 设置文件附件名称 + + + + + + + 获取语言种类 + + + + + + + 判断是否为异步请求 + + + + + + + 获取客户端IP + + + + + + + 获取浏览器标识 + + + + + + + 此处统一获取程序集,排除微软内部相关 + + + + + + Converts an array of bytes to a Base32-k string. + + + + + Converts a Base32-k string into an array of bytes. + + + Input string s contains invalid Base32-k characters. + + + + + 将object转换为long,若转换失败,则返回0。不抛出异常。 + + + + + + + 将string转换为DateTime,若转换失败,则返回日期最小值。不抛出异常。 + + + + + + + 内存使用情况 + + + + + + 获取内存大小 + + + + + + 获取系统运行时间 + + + + + + 内存信息 + + + + + CPU使用率% + + + + + 总内存 GB + + + + + 内存使用率 % + + + + + 空闲内存 + + + + + 磁盘名 + + + + + 已使用 + + + + + 可使用 + + + + + windows系统获取内存信息 + + + + + + Unix系统获取 + + + + + + 打印错误信息 + + 待打印的字符串 + 想要打印的颜色 + + + + 打印警告信息 + + 待打印的字符串 + 想要打印的颜色 + + + + 打印正常信息 + + 待打印的字符串 + 想要打印的颜色 + + + + 打印成功的信息 + + 待打印的字符串 + 想要打印的颜色 + + + + 时间戳转本地时间-时间戳精确到秒 + + + + + 时间转时间戳Unix-时间戳精确到秒 + + + + + 时间戳转本地时间-时间戳精确到毫秒 + + + + + 时间转时间戳Unix-时间戳精确到毫秒 + + + + + + + + + + + + 时间戳转本地时间-时间戳精确到秒 + + + + + 时间转时间戳Unix-时间戳精确到秒 + + + + + 时间戳转本地时间-时间戳精确到毫秒 + + + + + 时间转时间戳Unix-时间戳精确到毫秒 + + + + + 毫秒转天时分秒 + + + + + + + 获取unix时间戳 + + + + + + + 自定义Distinct扩展方法 + + 要去重的对象类 + 自定义去重的字段类型 + 要去重的对象 + 获取自定义去重字段的委托 + + + + + Expression表达式树lambda参数拼接组合 + + + + + + + + + + Expression表达式树lambda参数拼接--false + + + + + + + Expression表达式树lambda参数拼接-true + + + + + + + Expression表达式树lambda参数拼接--and + + + + + + + + + Expression表达式树lambda参数拼接--or + + + + + + + + + 存放表达式树的参数的字典 + + + + + 构造函数 + + + + + + 重载参数访问的方法,访问表达式树参数,如果字典中包含,则取出 + + 表达式树参数 + + + + + 取后缀名 + + 文件名 + .gif|.html格式 + + + + 写文件 + + 文件路径 + 文件内容 + + + + 写文件 + + 文件路径 + 文件内容 + 编码格式 + + + + 读文件 + + 文件路径 + + + + + 读文件 + + 文件路径 + 编码格式 + + + + + 追加文件 + + 文件路径 + 内容 + + + + 拷贝文件 + + 原始文件 + 新文件路径 + + + + 删除文件 + + 路径 + + + + 移动文件 + + 原始路径 + 新路径 + + + + 在当前目录下创建目录 + + 当前目录 + 新目录 + + + + 递归删除文件夹目录及文件 + + + + + + + 指定文件夹下面的所有内容copy到目标文件夹下面 + + 原始路径 + 目标文件夹 + + + + 获取目录下全部文件名 + + + + + + + + 文件内容替换 + + + + + 文件名称 + + + + + 目录名替换 + + + + + 全部信息递归替换 + + + + + + + + 去除富文本中的HTML标签 + + + + + + + + 获取当前IP地址 + + + + + + + 转换对象为JSON格式数据 + + + 对象 + 字符格式的JSON数据 + + + + + JSON格式字符转换为T类型的对象 + + + + + + + + 获取值的长度(当Json值嵌套以"{"或"["开头时) + + + + + 设置字符状态(返回true则为关键词,返回false则当为普通字符处理) + + + + + 字符状态 + + + + + 数组开始【仅第一开头才算】,值嵌套的以【childrenStart】来标识。 + + + + + 【0 初始状态,或 遇到“,”逗号】;【1 遇到“:”冒号】 + + + + + 【-1 取值结束】【0 未开始】【1 无引号开始】【2 单引号开始】【3 双引号开始】 + + + + + 【-1 取值结束】【0 未开始】【1 无引号开始】【2 单引号开始】【3 双引号开始】 + + + + + 生成PasswordSalt + + 返回string + + + + 加密密码 + + 密码 + 加密类型 + PasswordSalt + 加密后的密码 + + + + 16位MD5加密 + + + + + + + 32位MD5加密 + + + + + + + 64位MD5加密 + + + + + + + 随机生成字母 + + + + + + + 随机生成数字 + + + + + + + 此函数为生成指定数目的汉字 + + 汉字数目 + 所有汉字 + + + + 取对象属性值 + + + + + + + + 设置对象属性值 + + + + + + + + + RSA加解密 使用OpenSSL的公钥加密/私钥解密 + 公私钥请使用openssl生成 + + + + + 实例化RSAHelper + + 加密算法类型 RSA SHA1;RSA2 SHA256 密钥长度至少为2048 + 编码类型 + 私钥 + 公钥 + + + + 使用私钥签名 + + 原始数据 + + + + + 使用公钥验签 + + 原始数据 + 签名 + + + + + 私钥解密(支持大量数据) + + + + + + + 公钥加密(支持大量数据) + + + + + + + 使用私钥创建RSA实例 + + + + + + + 使用公钥创建RSA实例 + + + + + + + RSA算法类型 + + + + + SHA1 + + + + + RSA2 密钥长度至少为2048 + SHA256 + + + + + linux 系统命令 + + + + + + + windows系统命令 + + + + + + + + 根据分隔符返回前n条数据 + + 数据内容 + 分隔符 + 前n条 + 是否倒序(默认false) + + + + + 根据字段拼接get参数 + + + + + + + 根据字段拼接get参数 + + + + + + + 获取一个GUID + + 格式-默认为N + + + + + 根据GUID获取19位的唯一数字序列 + + + + + + 获取字符串最后X行 + + + + + + + + 字符串转Unicode码 + + The to unicode. + Value. + + + + Unicode转字符串 + + The to string. + Unicode. + + + + UrlEncode编码 + + url + + + + + UrlEncode解码 + + 数据 + + + + + 转换对象为JSON格式数据 + + + 对象 + 字符格式的JSON数据 + + + + Xml格式字符转换为T类型的对象 + + + + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs new file mode 100644 index 00000000..653c3911 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs @@ -0,0 +1,9 @@ +using Volo.Abp.Modularity; + +namespace Yi.Framework.Core +{ + public class YiFrameworkCoreModule:AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IDeletesAppService.cs b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IDeletesAppService.cs new file mode 100644 index 00000000..e5e3fc95 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IDeletesAppService.cs @@ -0,0 +1,10 @@ +using Volo.Abp; +using Volo.Abp.Application.Services; + +namespace Yi.Framework.Ddd.Application.Contracts +{ + public interface IDeletesAppService : IDeleteAppService< TKey> , IApplicationService, IRemoteService + { + Task DeleteAsync(IEnumerable ids); + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IPageTimeResultRequestDto.cs b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IPageTimeResultRequestDto.cs new file mode 100644 index 00000000..a2e816fd --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IPageTimeResultRequestDto.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Ddd.Application.Contracts +{ + public interface IPageTimeResultRequestDto : IPagedAndSortedResultRequest + { + DateTime? StartTime { get; set; } + DateTime? EndTime { get; set; } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IPagedAllResultRequestDto.cs b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IPagedAllResultRequestDto.cs new file mode 100644 index 00000000..283b4530 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IPagedAllResultRequestDto.cs @@ -0,0 +1,8 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Ddd.Application.Contracts +{ + public interface IPagedAllResultRequestDto : IPageTimeResultRequestDto, IPagedAndSortedResultRequest + { + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IYiCrudAppService.cs b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IYiCrudAppService.cs new file mode 100644 index 00000000..71e1fc89 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/IYiCrudAppService.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Yi.Framework.Ddd.Application.Contracts +{ + public interface IYiCrudAppService : ICrudAppService + { + } + + public interface IYiCrudAppService : ICrudAppService + { + } + + public interface IYiCrudAppService : ICrudAppService + { + } + + public interface IYiCrudAppService : ICrudAppService + { + } + + public interface IYiCrudAppService : ICrudAppService, IDeletesAppService + { + + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/PagedAllResultRequestDto.cs b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/PagedAllResultRequestDto.cs new file mode 100644 index 00000000..a4e90f33 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/PagedAllResultRequestDto.cs @@ -0,0 +1,17 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Ddd.Application.Contracts +{ + public class PagedAllResultRequestDto : PagedAndSortedResultRequestDto, IPagedAllResultRequestDto + { + /// + /// 查询开始时间条件 + /// + public DateTime? StartTime { get; set; } + + /// + /// 查询结束时间条件 + /// + public DateTime? EndTime { get; set; } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/Yi.Framework.Ddd.Application.Contracts.csproj b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/Yi.Framework.Ddd.Application.Contracts.csproj new file mode 100644 index 00000000..65da436e --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/Yi.Framework.Ddd.Application.Contracts.csproj @@ -0,0 +1,17 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/Yi.Framework.Ddd.Application.Contracts.xml b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/Yi.Framework.Ddd.Application.Contracts.xml new file mode 100644 index 00000000..9f8e6a3d --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/Yi.Framework.Ddd.Application.Contracts.xml @@ -0,0 +1,18 @@ + + + + Yi.Framework.Ddd.Application.Contracts + + + + + 查询开始时间条件 + + + + + 查询结束时间条件 + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/YiFrameworkDddApplicationContractsModule.cs b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/YiFrameworkDddApplicationContractsModule.cs new file mode 100644 index 00000000..63e7758f --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application.Contracts/YiFrameworkDddApplicationContractsModule.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Application; +using Volo.Abp.Modularity; + +namespace Yi.Framework.Ddd.Application.Contracts +{ + [DependsOn(typeof(AbpDddApplicationContractsModule))] + public class YiFrameworkDddApplicationContractsModule : AbpModule + { + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/Yi.Framework.Ddd.Application.csproj b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/Yi.Framework.Ddd.Application.csproj new file mode 100644 index 00000000..2d4fe351 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/Yi.Framework.Ddd.Application.csproj @@ -0,0 +1,17 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/Yi.Framework.Ddd.Application.xml b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/Yi.Framework.Ddd.Application.xml new file mode 100644 index 00000000..67e076c4 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/Yi.Framework.Ddd.Application.xml @@ -0,0 +1,15 @@ + + + + Yi.Framework.Ddd.Application + + + + + 偷梁换柱 + + + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/YiCrudAppService.cs b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/YiCrudAppService.cs new file mode 100644 index 00000000..31700d81 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/YiCrudAppService.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Repositories; + +namespace Yi.Framework.Ddd.Application +{ + public abstract class YiCrudAppService : YiCrudAppService + where TEntity : class, IEntity + where TEntityDto : IEntityDto + { + protected YiCrudAppService(IRepository repository) : base(repository) + { + } + } + + public abstract class YiCrudAppService + : YiCrudAppService + where TEntity : class, IEntity + where TEntityDto : IEntityDto + { + protected YiCrudAppService(IRepository repository) : base(repository) + { + } + } + + + public abstract class YiCrudAppService + : YiCrudAppService + where TEntity : class, IEntity + where TEntityDto : IEntityDto + { + protected YiCrudAppService(IRepository repository) : base(repository) + { + } + } + + public abstract class YiCrudAppService + : YiCrudAppService + where TEntity : class, IEntity + where TEntityDto : IEntityDto + { + protected YiCrudAppService(IRepository repository) : base(repository) + { + } + } + + + public abstract class YiCrudAppService + : CrudAppService + where TEntity : class, IEntity + where TGetOutputDto : IEntityDto + where TGetListOutputDto : IEntityDto + { + protected YiCrudAppService(IRepository repository) : base(repository) + { + } + + /// + /// 偷梁换柱 + /// + /// + /// + [RemoteService(isEnabled: true)] + public async Task DeleteAsync(IEnumerable id) + { + await Repository.DeleteManyAsync(id); + } + [RemoteService(isEnabled:false)] + public override Task DeleteAsync(TKey id) + { + return base.DeleteAsync(id); + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/YiFrameworkDddApplicationModule.cs b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/YiFrameworkDddApplicationModule.cs new file mode 100644 index 00000000..46b83722 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Ddd.Application/YiFrameworkDddApplicationModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Application; +using Volo.Abp.Modularity; +using Yi.Framework.Ddd.Application.Contracts; + +namespace Yi.Framework.Ddd.Application +{ + [DependsOn(typeof(AbpDddApplicationModule), + typeof(YiFrameworkDddApplicationContractsModule))] + public class YiFrameworkDddApplicationModule : AbpModule + { + + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Mapster/MapsterAutoObjectMappingProvider.cs b/Yi.Abp.Net8/framework/Yi.Framework.Mapster/MapsterAutoObjectMappingProvider.cs new file mode 100644 index 00000000..3c6b73eb --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Mapster/MapsterAutoObjectMappingProvider.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Mapster; +using Volo.Abp.ObjectMapping; + +namespace Yi.Framework.Mapster +{ + public class MapsterAutoObjectMappingProvider : IAutoObjectMappingProvider + { + public TDestination Map(object source) + { + var sss = typeof(TDestination).Name; + return source.Adapt(); + } + + public TDestination Map(TSource source, TDestination destination) + { + return source.Adapt(destination); + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Mapster/MapsterObjectMapper.cs b/Yi.Abp.Net8/framework/Yi.Framework.Mapster/MapsterObjectMapper.cs new file mode 100644 index 00000000..7cbe8804 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Mapster/MapsterObjectMapper.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.ObjectMapping; + +namespace Yi.Framework.Mapster +{ + public class MapsterObjectMapper : IObjectMapper + { + public IAutoObjectMappingProvider AutoObjectMappingProvider => throw new NotImplementedException(); + + public TDestination Map(TSource source) + { + throw new NotImplementedException(); + } + + public TDestination Map(TSource source, TDestination destination) + { + throw new NotImplementedException(); + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Mapster/Yi.Framework.Mapster.csproj b/Yi.Abp.Net8/framework/Yi.Framework.Mapster/Yi.Framework.Mapster.csproj new file mode 100644 index 00000000..72fe909f --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Mapster/Yi.Framework.Mapster.csproj @@ -0,0 +1,18 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Mapster/Yi.Framework.Mapster.xml b/Yi.Abp.Net8/framework/Yi.Framework.Mapster/Yi.Framework.Mapster.xml new file mode 100644 index 00000000..61ee3fb2 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Mapster/Yi.Framework.Mapster.xml @@ -0,0 +1,8 @@ + + + + Yi.Framework.Mapster + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Mapster/YiFrameworkMapsterModule.cs b/Yi.Abp.Net8/framework/Yi.Framework.Mapster/YiFrameworkMapsterModule.cs new file mode 100644 index 00000000..5df08b25 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.Mapster/YiFrameworkMapsterModule.cs @@ -0,0 +1,21 @@ +using MapsterMapper; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Volo.Abp.Modularity; +using Volo.Abp.ObjectMapping; +using Yi.Framework.Core; + +namespace Yi.Framework.Mapster +{ + [DependsOn(typeof(YiFrameworkCoreModule), + + typeof(AbpObjectMappingModule) + )] + public class YiFrameworkMapsterModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddTransient(); + } + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/ISqlSugarDbContext.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/ISqlSugarDbContext.cs new file mode 100644 index 00000000..a76d9a51 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/ISqlSugarDbContext.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SqlSugar; +using Volo.Abp.DependencyInjection; + +namespace Yi.Framework.SqlSugarCore.Abstractions +{ + public interface ISqlSugarDbContext + { + // IAbpLazyServiceProvider LazyServiceProvider { get; set; } + ISqlSugarClient SqlSugarClient { get; } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/ISqlSugarRepository.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/ISqlSugarRepository.cs new file mode 100644 index 00000000..ba7d9f8b --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/ISqlSugarRepository.cs @@ -0,0 +1,88 @@ +using System.Linq.Expressions; +using SqlSugar; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Repositories; + +namespace Yi.Framework.SqlSugarCore.Abstractions +{ + + public interface ISqlSugarRepository:IRepository where TEntity : class, IEntity,new () + { + ISqlSugarClient _Db { get; } + ISugarQueryable _DbQueryable { get; } + + Task GetDbContextAsync(); + Task> AsDeleteable(); + Task> AsInsertable(List insertObjs); + Task> AsInsertable(TEntity insertObj); + Task> AsInsertable(TEntity[] insertObjs); + Task> AsQueryable(); + Task AsSugarClient(); + Task AsTenant(); + Task> AsUpdateable(List updateObjs); + Task> AsUpdateable(TEntity updateObj); + Task> AsUpdateable(); + Task> AsUpdateable(TEntity[] updateObjs); + + #region 单查 + //单查 + Task GetByIdAsync(dynamic id); + Task GetSingleAsync(Expression> whereExpression); + Task GetFirstAsync(Expression> whereExpression); + Task IsAnyAsync(Expression> whereExpression); + Task CountAsync(Expression> whereExpression); + + #endregion + + + #region 多查 + //多查 + Task> GetListAsync(); + Task> GetListAsync(Expression> whereExpression); + #endregion + + + #region 分页查 + //分页查 + Task> GetPageListAsync(Expression> whereExpression, int pageNum, int pageSize); + Task> GetPageListAsync(Expression> whereExpression, int pageNum, int pageSize, Expression>? orderByExpression = null, OrderByType orderByType = OrderByType.Asc); + #endregion + + #region 插入 + //插入 + Task InsertAsync(TEntity insertObj); + Task InsertOrUpdateAsync(TEntity data); + Task InsertOrUpdateAsync(List datas); + Task InsertReturnIdentityAsync(TEntity insertObj); + Task InsertReturnBigIdentityAsync(TEntity insertObj); + Task InsertReturnSnowflakeIdAsync(TEntity insertObj); + Task InsertReturnEntityAsync(TEntity insertObj); + Task InsertRangeAsync(List insertObjs); + #endregion + + + #region 更新 + //更新 + Task UpdateAsync(TEntity updateObj); + Task UpdateRangeAsync(List updateObjs); + Task UpdateAsync(Expression> columns, Expression> whereExpression); + #endregion + + #region 删除 + //删除 + Task DeleteAsync(TEntity deleteObj); + Task DeleteAsync(List deleteObjs); + Task DeleteAsync(Expression> whereExpression); + Task DeleteByIdAsync(dynamic id); + Task DeleteByIdsAsync(dynamic[] ids); + #endregion + + } + + + public interface ISqlSugarRepository : ISqlSugarRepository,IRepository where TEntity : class, IEntity, new() + { + + + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/ISugarDbContextProvider.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/ISugarDbContextProvider.cs new file mode 100644 index 00000000..49c18b08 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/ISugarDbContextProvider.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Yi.Framework.SqlSugarCore.Abstractions +{ + public interface ISugarDbContextProvider + where TDbContext : ISqlSugarDbContext + { + + Task GetDbContextAsync(); + + } + +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/Yi.Framework.SqlSugarCore.Abstractions.csproj b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/Yi.Framework.SqlSugarCore.Abstractions.csproj new file mode 100644 index 00000000..1509f96c --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/Yi.Framework.SqlSugarCore.Abstractions.csproj @@ -0,0 +1,18 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/Yi.Framework.SqlSugarCore.Abstractions.xml b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/Yi.Framework.SqlSugarCore.Abstractions.xml new file mode 100644 index 00000000..b16dc7e4 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/Yi.Framework.SqlSugarCore.Abstractions.xml @@ -0,0 +1,8 @@ + + + + Yi.Framework.SqlSugarCore.Abstractions + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/YiFrameworkSqlSugarCoreAbstractionsModule.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/YiFrameworkSqlSugarCoreAbstractionsModule.cs new file mode 100644 index 00000000..1bb1e91f --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore.Abstractions/YiFrameworkSqlSugarCoreAbstractionsModule.cs @@ -0,0 +1,11 @@ +using Volo.Abp.Modularity; +using Yi.Framework.Core; + +namespace Yi.Framework.SqlSugarCore.Abstractions +{ + [DependsOn(typeof(YiFrameworkCoreModule))] + public class YiFrameworkSqlSugarCoreAbstractionsModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/DbConnOptions.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/DbConnOptions.cs similarity index 85% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/DbConnOptions.cs rename to Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/DbConnOptions.cs index 075bea51..a31abf1d 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/DbConnOptions.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/DbConnOptions.cs @@ -1,11 +1,6 @@ using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Sqlsugar +namespace Yi.Framework.SqlSugarCore { public class DbConnOptions { @@ -34,6 +29,11 @@ namespace Yi.Framework.Infrastructure.Sqlsugar /// public bool EnabledCodeFirst { get; set; } = false; + /// + /// 开启sql日志 + /// + public bool EnabledSqlLog { get; set; } = true; + /// /// 实体程序集 /// diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Repositories/SqlSugarRepository.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Repositories/SqlSugarRepository.cs new file mode 100644 index 00000000..f58417fb --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Repositories/SqlSugarRepository.cs @@ -0,0 +1,362 @@ +using System.Linq.Expressions; +using SqlSugar; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Linq; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.SqlSugarCore.Repositories +{ + public class SqlSugarRepository : ISqlSugarRepository, IRepository where TEntity : class, IEntity, new() + { + public ISqlSugarClient _Db => GetDbContextAsync().Result; + + public ISugarQueryable _DbQueryable => GetDbContextAsync().Result.Queryable(); + + private ISugarDbContextProvider _sugarDbContextProvider; + public IAsyncQueryableExecuter AsyncExecuter { get; } + + public SqlSugarRepository(ISugarDbContextProvider sugarDbContextProvider) + { + _sugarDbContextProvider = sugarDbContextProvider; + } + + /// + /// 获取DB + /// + /// + public virtual async Task GetDbContextAsync() + { + + var db = (await _sugarDbContextProvider.GetDbContextAsync()).SqlSugarClient; + await Console.Out.WriteLineAsync("获取的id:" + db.ContextID); + return db; + } + + /// + /// 获取简单Db + /// + /// + public virtual async Task> GetDbSimpleClientAsync() + { + var db = await GetDbContextAsync(); + return new SimpleClient(db); + } + + #region Abp模块 + + public async Task FindAsync(Expression> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) + { + return await GetFirstAsync(predicate); + } + + public async Task GetAsync(Expression> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) + { + return await GetFirstAsync(predicate); + } + + public async Task DeleteAsync(Expression> predicate, bool autoSave = false, CancellationToken cancellationToken = default) + { + await DeleteAsync(predicate); + } + + public async Task DeleteDirectAsync(Expression> predicate, CancellationToken cancellationToken = default) + { + await DeleteAsync(predicate); + } + + public IQueryable WithDetails() + { + throw new NotImplementedException(); + } + + public IQueryable WithDetails(params Expression>[] propertySelectors) + { + throw new NotImplementedException(); + } + + public Task> WithDetailsAsync() + { + throw new NotImplementedException(); + } + + public Task> WithDetailsAsync(params Expression>[] propertySelectors) + { + throw new NotImplementedException(); + } + + public Task> GetQueryableAsync() + { + throw new NotImplementedException(); + } + + public async Task> GetListAsync(Expression> predicate, bool includeDetails = false, CancellationToken cancellationToken = default) + { + return await GetListAsync(predicate); + } + + public async Task InsertAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) + { + return await InsertReturnEntityAsync(entity); + } + + public async Task InsertManyAsync(IEnumerable entities, bool autoSave = false, CancellationToken cancellationToken = default) + { + await InsertRangeAsync(entities.ToList()); + } + + public async Task UpdateAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) + { + await UpdateAsync(entity); + return entity; + } + + public async Task UpdateManyAsync(IEnumerable entities, bool autoSave = false, CancellationToken cancellationToken = default) + { + await UpdateRangeAsync(entities.ToList()); + } + + public async Task DeleteAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) + { + await DeleteAsync(entity); + } + + public async Task DeleteManyAsync(IEnumerable entities, bool autoSave = false, CancellationToken cancellationToken = default) + { + await DeleteAsync(entities.ToList()); + } + + public async Task> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default) + { + return await GetListAsync(); + } + + public async Task GetCountAsync(CancellationToken cancellationToken = default) + { + return await this.CountAsync(); + } + + public async Task> GetPagedListAsync(int skipCount, int maxResultCount, string sorting, bool includeDetails = false, CancellationToken cancellationToken = default) + { + return await GetPageListAsync(_ => true, skipCount, maxResultCount); + } + #endregion + + + #region 内置DB快捷操作 + public async Task> AsDeleteable() + { + return (await GetDbSimpleClientAsync()).AsDeleteable(); + } + + public async Task> AsInsertable(List insertObjs) + { + return (await GetDbSimpleClientAsync()).AsInsertable(insertObjs); + } + + public async Task> AsInsertable(TEntity insertObj) + { + return (await GetDbSimpleClientAsync()).AsInsertable(insertObj); + } + + public async Task> AsInsertable(TEntity[] insertObjs) + { + return (await GetDbSimpleClientAsync()).AsInsertable(insertObjs); + } + + public async Task> AsQueryable() + { + return (await GetDbSimpleClientAsync()).AsQueryable(); + } + + public async Task AsSugarClient() + { + return (await GetDbSimpleClientAsync()).AsSugarClient(); + } + + public async Task AsTenant() + { + return (await GetDbSimpleClientAsync()).AsTenant(); + } + + public async Task> AsUpdateable(List updateObjs) + { + return (await GetDbSimpleClientAsync()).AsUpdateable(updateObjs); + } + + public async Task> AsUpdateable(TEntity updateObj) + { + return (await GetDbSimpleClientAsync()).AsUpdateable(updateObj); + } + + public async Task> AsUpdateable() + { + return (await GetDbSimpleClientAsync()).AsUpdateable(); + } + + public async Task> AsUpdateable(TEntity[] updateObjs) + { + return (await GetDbSimpleClientAsync()).AsUpdateable(updateObjs); + } + #endregion + + #region SimpleClient模块 + public async Task CountAsync(Expression> whereExpression) + { + return await (await GetDbSimpleClientAsync()).CountAsync(whereExpression); + } + + public async Task DeleteAsync(TEntity deleteObj) + { + return await (await GetDbSimpleClientAsync()).DeleteAsync(deleteObj); + } + + public async Task DeleteAsync(List deleteObjs) + { + return await (await GetDbSimpleClientAsync()).DeleteAsync(deleteObjs); + } + + public async Task DeleteAsync(Expression> whereExpression) + { + return await (await GetDbSimpleClientAsync()).DeleteAsync(whereExpression); + } + + public async Task DeleteByIdAsync(dynamic id) + { + return await (await GetDbSimpleClientAsync()).DeleteByIdAsync(id); + } + + public async Task DeleteByIdsAsync(dynamic[] ids) + { + return await (await GetDbSimpleClientAsync()).DeleteByIdAsync(ids); + } + + public async Task GetByIdAsync(dynamic id) + { + return await (await GetDbSimpleClientAsync()).GetByIdAsync(id); + } + + + + public async Task GetFirstAsync(Expression> whereExpression) + { + return await (await GetDbSimpleClientAsync()).GetFirstAsync(whereExpression); + } + + public async Task> GetListAsync() + { + return await (await GetDbSimpleClientAsync()).GetListAsync(); + } + + public async Task> GetListAsync(Expression> whereExpression) + { + return await (await GetDbSimpleClientAsync()).GetListAsync(whereExpression); + } + + public async Task> GetPageListAsync(Expression> whereExpression, int pageNum, int pageSize) + { + return await (await GetDbSimpleClientAsync()).GetPageListAsync(whereExpression, new PageModel() { PageIndex = pageNum, PageSize = pageSize }); + } + + public async Task> GetPageListAsync(Expression> whereExpression, int pageNum, int pageSize, Expression>? orderByExpression = null, OrderByType orderByType = OrderByType.Asc) + { + return await (await GetDbSimpleClientAsync()).GetPageListAsync(whereExpression, new PageModel { PageIndex = pageNum, PageSize = pageSize }, orderByExpression, orderByType); + } + + public async Task GetSingleAsync(Expression> whereExpression) + { + return await (await GetDbSimpleClientAsync()).GetSingleAsync(whereExpression); + } + + public async Task InsertAsync(TEntity insertObj) + { + return await (await GetDbSimpleClientAsync()).InsertAsync(insertObj); + } + + public async Task InsertOrUpdateAsync(TEntity data) + { + return await (await GetDbSimpleClientAsync()).InsertOrUpdateAsync(data); + } + + public async Task InsertOrUpdateAsync(List datas) + { + return await (await GetDbSimpleClientAsync()).InsertOrUpdateAsync(datas); + } + + public async Task InsertRangeAsync(List insertObjs) + { + return await (await GetDbSimpleClientAsync()).InsertRangeAsync(insertObjs); + } + + public async Task InsertReturnBigIdentityAsync(TEntity insertObj) + { + return await (await GetDbSimpleClientAsync()).InsertReturnBigIdentityAsync(insertObj); + } + + public async Task InsertReturnEntityAsync(TEntity insertObj) + { + return await (await GetDbSimpleClientAsync()).InsertReturnEntityAsync(insertObj); + } + + public async Task InsertReturnIdentityAsync(TEntity insertObj) + { + return await (await GetDbSimpleClientAsync()).InsertReturnIdentityAsync(insertObj); + } + + public async Task InsertReturnSnowflakeIdAsync(TEntity insertObj) + { + return await (await GetDbSimpleClientAsync()).InsertReturnSnowflakeIdAsync(insertObj); + } + + public async Task IsAnyAsync(Expression> whereExpression) + { + return await (await GetDbSimpleClientAsync()).IsAnyAsync(whereExpression); + } + + public async Task UpdateAsync(TEntity updateObj) + { + return await (await GetDbSimpleClientAsync()).UpdateAsync(updateObj); + } + + public async Task UpdateAsync(Expression> columns, Expression> whereExpression) + { + return await (await GetDbSimpleClientAsync()).UpdateAsync(columns, whereExpression); + } + + + + public async Task UpdateRangeAsync(List updateObjs) + { + return await (await GetDbSimpleClientAsync()).UpdateRangeAsync(updateObjs); + } + + #endregion + } + + public class SqlSugarRepository : SqlSugarRepository, ISqlSugarRepository, IRepository where TEntity : class, IEntity, new() + { + public SqlSugarRepository(ISugarDbContextProvider sugarDbContextProvider) : base(sugarDbContextProvider) + { + } + + public async Task DeleteAsync(TKey id, bool autoSave = false, CancellationToken cancellationToken = default) + { + await DeleteByIdAsync(id); + } + + public async Task DeleteManyAsync(IEnumerable ids, bool autoSave = false, CancellationToken cancellationToken = default) + { + await DeleteByIdsAsync(ids.Select(x => (object)x).ToArray()); + } + + public async Task FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) + { + return await GetByIdAsync(id); + } + + public async Task GetAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) + { + return await GetByIdAsync(id); + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarDbContext.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarDbContext.cs new file mode 100644 index 00000000..90390be8 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarDbContext.cs @@ -0,0 +1,239 @@ +using System.Reflection; +using System.Text; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Entities.Events; +using Volo.Abp.Guids; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Users; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.SqlSugarCore +{ + public class SqlSugarDbContext : ISqlSugarDbContext + { + /// + /// SqlSugar 客户端 + /// + public ISqlSugarClient SqlSugarClient { get; } + public ICurrentUser CurrentUser => LazyServiceProvider.GetRequiredService(); + + private IAbpLazyServiceProvider LazyServiceProvider { get; } + + private IGuidGenerator GuidGenerator => LazyServiceProvider.LazyGetRequiredService(); + protected ILoggerFactory Logger => LazyServiceProvider.LazyGetRequiredService(); + private ICurrentTenant CurrentTenant => LazyServiceProvider.LazyGetRequiredService(); + public IDataFilter DataFilter => LazyServiceProvider.LazyGetRequiredService(); + protected virtual bool IsMultiTenantFilterEnabled => DataFilter?.IsEnabled() ?? false; + + protected virtual bool IsSoftDeleteFilterEnabled => DataFilter?.IsEnabled() ?? false; + + public IEntityChangeEventHelper EntityChangeEventHelper => LazyServiceProvider.LazyGetService(NullEntityChangeEventHelper.Instance); + protected DbConnOptions Options => LazyServiceProvider.LazyGetRequiredService>().Value; + + public SqlSugarDbContext(IAbpLazyServiceProvider lazyServiceProvider) + { + LazyServiceProvider = lazyServiceProvider; + var dbConnOptions = Options; + #region 组装options + if (dbConnOptions.DbType is null) + { + throw new ArgumentException("DbType配置为空"); + } + var slavaConFig = new List(); + if (dbConnOptions.EnabledReadWrite) + { + if (dbConnOptions.ReadUrl is null) + { + throw new ArgumentException("读写分离为空"); + } + + var readCon = dbConnOptions.ReadUrl; + + readCon.ForEach(s => + { + //如果是动态saas分库,这里的连接串都不能写死,需要动态添加,这里只配置共享库的连接 + slavaConFig.Add(new SlaveConnectionConfig() { ConnectionString = s }); + }); + } + #endregion + SqlSugarClient = new SqlSugarClient(new ConnectionConfig() + { + //准备添加分表分库 + DbType = dbConnOptions.DbType ?? DbType.Sqlite, + ConnectionString = dbConnOptions.Url, + IsAutoCloseConnection = true, + SlaveConnectionConfigs = slavaConFig, + //设置codefirst非空值判断 + ConfigureExternalServices = new ConfigureExternalServices + { + EntityService = (c, p) => + { + + if (new NullabilityInfoContext() + .Create(c).WriteState is NullabilityState.Nullable) + { + p.IsNullable = true; + } + } + } + }, + db => + { + + db.Aop.DataExecuting = DataExecuting; + db.Aop.DataExecuted = DataExecuted; + db.Aop.OnLogExecuting = OnLogExecuting; + db.Aop.OnLogExecuted = OnLogExecuted; + //扩展 + OnSqlSugarClientConfig(db); + }); + } + + /// + /// 上下文对象扩展 + /// + /// + protected virtual void OnSqlSugarClientConfig(ISqlSugarClient sqlSugarClient) + { + //需自定义扩展 + if (IsSoftDeleteFilterEnabled) + { + sqlSugarClient.QueryFilter.AddTableFilter(u => u.IsDeleted == false); + } + if (IsMultiTenantFilterEnabled) + { + sqlSugarClient.QueryFilter.AddTableFilter(u => u.TenantId == GuidGenerator.Create()); + } + CustomDataFilter(); + } + protected virtual void CustomDataFilter() + { + + } + protected virtual void DataExecuted(object oldValue, DataAfterModel entityInfo) + { + + } + + /// + /// 数据 + /// + /// + /// + protected virtual void DataExecuting(object oldValue, DataFilterModel entityInfo) + { + //审计日志 + switch (entityInfo.OperationType) + { + case DataFilterType.UpdateByObject: + + if (entityInfo.PropertyName.Equals(nameof(IAuditedObject.LastModificationTime))) + { + if (!DateTime.MinValue.Equals(oldValue)) + { + entityInfo.SetValue(DateTime.Now); + } + } + if (entityInfo.PropertyName.Equals(nameof(IAuditedObject.LastModifierId))) + { + if (CurrentUser != null) + { + entityInfo.SetValue(CurrentUser.Id); + } + } + break; + case DataFilterType.InsertByObject: + if (entityInfo.PropertyName.Equals(nameof(IEntity.Id))) + { + //主键为空或者为默认最小值 + if (Guid.Empty.Equals(oldValue)) + { + entityInfo.SetValue(GuidGenerator.Create()); + } + } + + if (entityInfo.PropertyName.Equals(nameof(IAuditedObject.CreationTime))) + { + //为空或者为默认最小值 + if (oldValue is null || DateTime.MinValue.Equals((DateTime)oldValue)) + { + entityInfo.SetValue(DateTime.Now); + } + } + if (entityInfo.PropertyName.Equals(nameof(IAuditedObject.CreatorId))) + { + if (CurrentUser != null) + { + entityInfo.SetValue(CurrentUser.Id); + } + } + + //插入时,需要租户id,先预留 + if (entityInfo.PropertyName.Equals(nameof(IMultiTenant.TenantId))) + { + if (CurrentTenant is not null) + { + entityInfo.SetValue(CurrentTenant.Id); + } + } + break; + } + + + //领域事件 + switch (entityInfo.OperationType) + { + case DataFilterType.InsertByObject: + if (entityInfo.PropertyName == nameof(IEntity.Id)) + { + EntityChangeEventHelper.PublishEntityCreatedEvent(entityInfo.EntityValue); + } + break; + case DataFilterType.UpdateByObject: + if (entityInfo.PropertyName == nameof(IEntity.Id)) + { + EntityChangeEventHelper.PublishEntityUpdatedEvent(entityInfo.EntityValue); + } + break; + case DataFilterType.DeleteByObject: + if (entityInfo.PropertyName == nameof(IEntity.Id)) + { + EntityChangeEventHelper.PublishEntityDeletedEvent(entityInfo.EntityValue); + } + break; + } + + } + + /// + /// 日志 + /// + /// + /// + protected virtual void OnLogExecuting(string sql , SugarParameter[] pars) + { + if (Options.EnabledSqlLog) + { + Logger.CreateLogger().LogDebug(UtilMethods.GetSqlString(DbType.SqlServer, sql, pars)); + } + + } + + /// + /// 日志 + /// + /// + /// + protected virtual void OnLogExecuted(string sql, SugarParameter[] pars) + { + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarLogAuditingStore.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarLogAuditingStore.cs new file mode 100644 index 00000000..9c49f5bd --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarLogAuditingStore.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Auditing; +using Volo.Abp.DependencyInjection; + +namespace Yi.Framework.SqlSugarCore +{ + public class SqlSugarLogAuditingStore : IAuditingStore, ISingletonDependency + { + public Task SaveAsync(AuditLogInfo auditInfo) + { + Console.WriteLine(auditInfo.ExecutionTime); + return Task.CompletedTask; + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlsugarCoreExtensions.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlsugarCoreExtensions.cs new file mode 100644 index 00000000..70fe0dd4 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlsugarCoreExtensions.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.SqlSugarCore +{ + public static class SqlsugarCoreExtensions + { + public static IServiceCollection AddYiDbContext(this IServiceCollection service) where DbContext : class, ISqlSugarDbContext + { + service.Replace(new ServiceDescriptor(typeof(ISqlSugarDbContext), typeof(DbContext), ServiceLifetime.Scoped)); + return service; + } + + public static IServiceCollection AddYiDbContext(this IServiceCollection service,Action options) where DbContext : class, ISqlSugarDbContext + { + + service.Configure(ops => { + options.Invoke(ops); + }); + service.AddYiDbContext(); + return service; + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Uow/SqlSugarDatabaseApi.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Uow/SqlSugarDatabaseApi.cs new file mode 100644 index 00000000..81d3b34d --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Uow/SqlSugarDatabaseApi.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Uow; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.SqlSugarCore.Uow +{ + public class SqlSugarDatabaseApi : IDatabaseApi + { + public ISqlSugarDbContext DbContext { get; } + + public SqlSugarDatabaseApi(ISqlSugarDbContext dbContext) + { + DbContext = dbContext; + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Uow/SqlSugarTransactionApi.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Uow/SqlSugarTransactionApi.cs new file mode 100644 index 00000000..230292e2 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Uow/SqlSugarTransactionApi.cs @@ -0,0 +1,38 @@ +using Volo.Abp.Uow; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.SqlSugarCore.Uow +{ + public class SqlSugarTransactionApi : ITransactionApi, ISupportsRollback + { + private ISqlSugarDbContext _sqlsugarDbContext; + + public SqlSugarTransactionApi(ISqlSugarDbContext sqlsugarDbContext) + { + _sqlsugarDbContext = sqlsugarDbContext; + + } + + public async Task CommitAsync(CancellationToken cancellationToken = default) + { + + + await Console.Out.WriteLineAsync("事务提交"); + + Console.WriteLine(_sqlsugarDbContext.SqlSugarClient.ContextID + "---------------"); + await _sqlsugarDbContext.SqlSugarClient.Ado.CommitTranAsync(); + } + + public void Dispose() + { + Console.WriteLine("Dispose"); + } + + public async Task RollbackAsync(CancellationToken cancellationToken = default) + { + await Console.Out.WriteLineAsync("事务回滚"); + Console.WriteLine(_sqlsugarDbContext.SqlSugarClient.ContextID); + await _sqlsugarDbContext.SqlSugarClient.Ado.RollbackTranAsync(); + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Uow/UnitOfWorkSqlsugarDbContextProvider.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Uow/UnitOfWorkSqlsugarDbContextProvider.cs new file mode 100644 index 00000000..e407c07a --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Uow/UnitOfWorkSqlsugarDbContextProvider.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.Extensions.Logging; +using Volo.Abp.Data; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Threading; +using Volo.Abp.Uow; +using Volo.Abp; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.SqlSugarCore.Uow +{ + public class UnitOfWorkSqlsugarDbContextProvider : ISugarDbContextProvider where TDbContext : ISqlSugarDbContext + { + + public ILogger> Logger { get; set; } + + protected readonly IUnitOfWorkManager UnitOfWorkManager; + protected readonly IConnectionStringResolver ConnectionStringResolver; + protected readonly ICancellationTokenProvider CancellationTokenProvider; + protected readonly ICurrentTenant CurrentTenant; + + public UnitOfWorkSqlsugarDbContextProvider( + IUnitOfWorkManager unitOfWorkManager, + IConnectionStringResolver connectionStringResolver, + ICancellationTokenProvider cancellationTokenProvider, + ICurrentTenant currentTenant + ) + { + UnitOfWorkManager = unitOfWorkManager; + ConnectionStringResolver = connectionStringResolver; + CancellationTokenProvider = cancellationTokenProvider; + CurrentTenant = currentTenant; + Logger = NullLogger>.Instance; + } + + public virtual async Task GetDbContextAsync() + { + + var unitOfWork = UnitOfWorkManager.Current; + if (unitOfWork == null) + { + throw new AbpException("A DbContext can only be created inside a unit of work!"); + } + //var sss= unitOfWork.ServiceProvider.GetRequiredService(); + //Console.WriteLine("反户的:"+sss.SqlSugarClient.ContextID); + //return sss; + + + var connectionStringName = "Default"; + var connectionString = await ResolveConnectionStringAsync(connectionStringName); + // var dbContextKey = $"{this.GetType().FullName}_{connectionString}"; + var dbContextKey = "Default"; + var databaseApi = unitOfWork.FindDatabaseApi(dbContextKey); + + if (databaseApi == null) + { + databaseApi = new SqlSugarDatabaseApi( + await CreateDbContextAsync(unitOfWork, connectionStringName, connectionString) + ); + unitOfWork.AddDatabaseApi(dbContextKey, databaseApi); + + } + return (TDbContext)((SqlSugarDatabaseApi)databaseApi).DbContext; ; + } + + + + protected virtual async Task CreateDbContextAsync(IUnitOfWork unitOfWork, string connectionStringName, string connectionString) + { + + var dbContext = await CreateDbContextAsync(unitOfWork); + Console.WriteLine("111111:" + dbContext.SqlSugarClient.ContextID); + return dbContext; + } + + protected virtual async Task CreateDbContextAsync(IUnitOfWork unitOfWork) + { + return unitOfWork.Options.IsTransactional + ? await CreateDbContextWithTransactionAsync(unitOfWork) + : unitOfWork.ServiceProvider.GetRequiredService(); + } + protected virtual async Task CreateDbContextWithTransactionAsync(IUnitOfWork unitOfWork) + { + var transactionApiKey = $"Sqlsugar_Default".ToString(); + + var activeTransaction = unitOfWork.FindTransactionApi(transactionApiKey) as SqlSugarDatabaseApi; + if (activeTransaction == null) + { + + var dbContext = unitOfWork.ServiceProvider.GetRequiredService(); + var transaction = new SqlSugarTransactionApi( + dbContext + ); + unitOfWork.AddTransactionApi(transactionApiKey, transaction); + + + await Console.Out.WriteLineAsync("开始新的事务"); + Console.WriteLine(dbContext.SqlSugarClient.ContextID); + await dbContext.SqlSugarClient.Ado.BeginTranAsync(); + return dbContext; + } + else + { + await Console.Out.WriteLineAsync("继续老的事务"); + Console.WriteLine(activeTransaction.DbContext.SqlSugarClient); + await activeTransaction.DbContext.SqlSugarClient.Ado.BeginTranAsync(); + return (TDbContext)activeTransaction.DbContext; + } + + + } + + + protected virtual async Task ResolveConnectionStringAsync(string connectionStringName) + { + if (typeof(TDbContext).IsDefined(typeof(IgnoreMultiTenancyAttribute), false)) + { + using (CurrentTenant.Change(null)) + { + return await ConnectionStringResolver.ResolveAsync(connectionStringName); + } + } + + return await ConnectionStringResolver.ResolveAsync(connectionStringName); + } + } +} diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Yi.Framework.SqlSugarCore.csproj b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Yi.Framework.SqlSugarCore.csproj new file mode 100644 index 00000000..46dcb2fa --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Yi.Framework.SqlSugarCore.csproj @@ -0,0 +1,18 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Yi.Framework.SqlSugarCore.xml b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Yi.Framework.SqlSugarCore.xml new file mode 100644 index 00000000..99a74562 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/Yi.Framework.SqlSugarCore.xml @@ -0,0 +1,92 @@ + + + + Yi.Framework.SqlSugarCore + + + + + 连接字符串,必填 + + + + + 数据库类型 + + + + + 开启种子数据 + + + + + 开启读写分离 + + + + + 开启codefirst + + + + + 开启sql日志 + + + + + 实体程序集 + + + + + 读写分离 + + + + + 获取DB + + + + + + 获取简单Db + + + + + + SqlSugar 客户端 + + + + + 上下文对象扩展 + + + + + + 数据 + + + + + + + 日志 + + + + + + + 日志 + + + + + + diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/YiFrameworkSqlSugarCoreModule.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/YiFrameworkSqlSugarCoreModule.cs new file mode 100644 index 00000000..a8f4d2c7 --- /dev/null +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/YiFrameworkSqlSugarCoreModule.cs @@ -0,0 +1,97 @@ +using System.Reflection; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Options; +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Data; +using Volo.Abp.Domain; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Modularity; +using Yi.Framework.SqlSugarCore.Abstractions; +using Yi.Framework.SqlSugarCore.Repositories; +using Yi.Framework.SqlSugarCore.Uow; + +namespace Yi.Framework.SqlSugarCore +{ + [DependsOn(typeof(AbpDddDomainModule))] + public class YiFrameworkSqlSugarCoreModule : AbpModule + { + public override Task ConfigureServicesAsync(ServiceConfigurationContext context) + { + var service = context.Services; + var configuration = service.GetConfiguration(); + Configure(configuration.GetSection("DbConnOptions")); + + + service.TryAddScoped(); + + //不开放sqlsugarClient + //service.AddTransient(x => x.GetRequiredService().SqlSugarClient); + + + service.AddTransient(typeof(IRepository<>), typeof(SqlSugarRepository<>)); + service.AddTransient(typeof(IRepository<,>), typeof(SqlSugarRepository<,>)); + service.AddTransient(typeof(ISqlSugarRepository<>), typeof(SqlSugarRepository<>)); + service.AddTransient(typeof(ISqlSugarRepository<,>), typeof(SqlSugarRepository<,>)); + + service.AddTransient(); + + service.AddTransient(typeof(ISugarDbContextProvider<>), typeof(UnitOfWorkSqlsugarDbContextProvider<>)); + + + return Task.CompletedTask; + } + + public override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) + { + var service = context.ServiceProvider; + return base.OnApplicationInitializationAsync(context); + } + + + public override async void OnPreApplicationInitialization(ApplicationInitializationContext context) + { + //进行CodeFirst + var service = context.ServiceProvider; + var options = service.GetRequiredService>().Value; + + if (options.EnabledCodeFirst) + { + CodeFirst(service); + } + if (options.EnabledCodeFirst) + { + await DataSeedAsync(service); + } + } + + private void CodeFirst(IServiceProvider service) + { + + var options = service.GetRequiredService>().Value; + if (options.EnabledCodeFirst) + { + var moduleContainer = service.GetRequiredService(); + var db = service.GetRequiredService().SqlSugarClient; + + List types = new List(); + foreach (var module in moduleContainer.Modules) + { + types.AddRange(module.Assembly.GetTypes().Where(x => x.GetCustomAttribute() != null).Where(x => x.GetCustomAttribute() is null)); + } + if (types.Count > 0) + { + db.CodeFirst.InitTables(types.ToArray()); + } + } + } + + private async Task DataSeedAsync(IServiceProvider service) + { + var dataSeeder = service.GetRequiredService(); + await dataSeeder.SeedAsync(); + } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/AccessLog/AccessLogDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/AccessLog/AccessLogDto.cs new file mode 100644 index 00000000..b25b9da4 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/AccessLog/AccessLogDto.cs @@ -0,0 +1,10 @@ +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.AccessLog +{ + public class AccessLogDto + { + public Guid Id { get; set; } + public long Number { get; set; } + public DateTime? LastModificationTime { get; set; } + public DateTime CreationTime { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Argee/AgreeDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Argee/AgreeDto.cs similarity index 72% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Argee/AgreeDto.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Argee/AgreeDto.cs index d3d85119..6b9f8815 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Argee/AgreeDto.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Argee/AgreeDto.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Bbs.Dtos.Argee +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Argee { public class AgreeDto { diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleAllOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleAllOutputDto.cs new file mode 100644 index 00000000..454cf0e7 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleAllOutputDto.cs @@ -0,0 +1,16 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article +{ + public class ArticleAllOutputDto : EntityDto + { + + //批量查询,不给内容,性能考虑 + //public string Content { get; set; } + public string Name { get; set; } + public Guid DiscussId { get; set; } + public Guid ParentId { get; set; } + + public List? Children { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleCreateInputVo.cs similarity index 68% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleCreateInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleCreateInputVo.cs index 3307aa7b..0258a37b 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleCreateInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleCreateInputVo.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Bbs.Dtos.Article +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article { /// /// Article输入创建对象 @@ -13,7 +13,7 @@ namespace Yi.Furion.Core.Bbs.Dtos.Article { public string Content { get; set; } public string Name { get; set; } - public long DiscussId { get; set; } - public long ParentId { get; set; } + public Guid DiscussId { get; set; } + public Guid ParentId { get; set; } } } diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListInputVo.cs new file mode 100644 index 00000000..dec2f195 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListInputVo.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article +{ + public class ArticleGetListInputVo : PagedAndSortedResultRequestDto + { + public string? Content { get; set; } + public string? Name { get; set; } + public Guid? DiscussId { get; set; } + public Guid? ParentId { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListOutputDto.cs new file mode 100644 index 00000000..735dfac5 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetListOutputDto.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article +{ + public class ArticleGetListOutputDto : EntityDto + { + //ѯݣܿ + //public string Content { get; set; } + public string Name { get; set; } + public Guid DiscussId { get; set; } + + public List? Children { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetOutputDto.cs new file mode 100644 index 00000000..85825322 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleGetOutputDto.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article +{ + public class ArticleGetOutputDto : EntityDto + { + public string Content { get; set; } + public string Name { get; set; } + public Guid DiscussId { get; set; } + public Guid ParentId { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleUpdateInputVo.cs new file mode 100644 index 00000000..0e6f6ed0 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Article/ArticleUpdateInputVo.cs @@ -0,0 +1,10 @@ +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Article +{ + public class ArticleUpdateInputVo + { + public string Content { get; set; } + public string Name { get; set; } + public Guid DiscussId { get; set; } + public Guid ParentId { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerCreateInputVo.cs similarity index 61% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerCreateInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerCreateInputVo.cs index b88fdafc..b0e429b8 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerCreateInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerCreateInputVo.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Bbs.Dtos.Banner +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Banner { /// /// Banner输入创建对象 diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListInputVo.cs new file mode 100644 index 00000000..5e496646 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListInputVo.cs @@ -0,0 +1,9 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Banner +{ + public class BannerGetListInputVo : PagedAndSortedResultRequestDto + { + public string? Name { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListOutputDto.cs similarity index 50% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerGetListOutputDto.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListOutputDto.cs index f7623612..a44287af 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetListOutputDto.cs @@ -1,11 +1,9 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Bbs.Dtos.Banner +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Banner { - public class BannerGetListOutputDto : IEntityDto + public class BannerGetListOutputDto : EntityDto { - - public long Id { get; set; } public string Name { get; set; } public string? Logo { get; set; } public string? Color { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetOutputDto.cs similarity index 51% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerGetOutputDto.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetOutputDto.cs index 376b61c1..c31e1861 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerGetOutputDto.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerGetOutputDto.cs @@ -1,11 +1,9 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Bbs.Dtos.Banner +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Banner { - public class BannerGetOutputDto : IEntityDto + public class BannerGetOutputDto : EntityDto { - - public long Id { get; set; } public string Name { get; set; } public string? Logo { get; set; } public string? Color { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerUpdateInputVo.cs similarity index 74% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerUpdateInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerUpdateInputVo.cs index 40845922..369bc283 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Banner/BannerUpdateInputVo.cs @@ -1,4 +1,4 @@ -namespace Yi.Furion.Core.Bbs.Dtos.Banner +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Banner { public class BannerUpdateInputVo { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentCreateInputVo.cs similarity index 56% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentCreateInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentCreateInputVo.cs index 0e6f81c4..6cc4abb1 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentCreateInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentCreateInputVo.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SqlSugar; - -namespace Yi.Furion.Core.Bbs.Dtos.Comment +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment { /// /// Comment输入创建对象 @@ -16,21 +9,21 @@ namespace Yi.Furion.Core.Bbs.Dtos.Comment /// /// 评论id /// - public string Content { get; set; } + public string? Content { get; set; } /// /// 主题id /// - public long DiscussId { get; set; } + public Guid DiscussId { get; set; } /// /// 第一层评论id,第一层为0 /// - public long RootId { get; set; } + public Guid RootId { get; set; } /// /// 被回复的CommentId,第一层为0 /// - public long ParentId { get; set; } + public Guid ParentId { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListInputVo.cs similarity index 63% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentGetListInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListInputVo.cs index 1fec7414..14920c8e 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentGetListInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListInputVo.cs @@ -1,6 +1,4 @@ -using System; - -namespace Yi.Furion.Core.Bbs.Dtos.Comment +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment { public class CommentGetListInputVo { @@ -8,6 +6,6 @@ namespace Yi.Furion.Core.Bbs.Dtos.Comment public string? Content { get; set; } //ӦѡĪѯ - public long? DiscussId { get; set; } + public Guid? DiscussId { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListOutputDto.cs similarity index 64% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentGetListOutputDto.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListOutputDto.cs index 8431aaca..84054303 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListOutputDto.cs @@ -1,17 +1,13 @@ -using System; -using System.Collections.Generic; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Furion.Core.Rbac.Dtos.User; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Rbac.Application.Contracts.Dtos.User; -namespace Yi.Furion.Core.Bbs.Dtos.Comment +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment { /// /// ۶෴ /// - public class CommentGetListOutputDto : IEntityDto + public class CommentGetListOutputDto : EntityDto { - public long Id { get; set; } - public DateTime? CreationTime { get; set; } @@ -24,11 +20,11 @@ namespace Yi.Furion.Core.Bbs.Dtos.Comment /// /// id /// - public long DiscussId { get; set; } + public Guid DiscussId { get; set; } - public long ParentId { get; set; } + public Guid ParentId { get; set; } - public long RootId { get; set; } + public Guid RootId { get; set; } /// /// û,ûϢ diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetOutputDto.cs similarity index 55% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentGetOutputDto.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetOutputDto.cs index aa658a05..cf4550b1 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentGetOutputDto.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetOutputDto.cs @@ -1,20 +1,18 @@ -using System; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Furion.Core.Rbac.Dtos.User; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Rbac.Application.Contracts.Dtos.User; -namespace Yi.Furion.Core.Bbs.Dtos.Comment +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment { /// /// أصۼ /// - public class CommentGetOutputDto : IEntityDto + public class CommentGetOutputDto : EntityDto { - public long Id { get; set; } public DateTime? CreateTime { get; set; } public string Content { get; set; } - public long DiscussId { get; set; } + public Guid DiscussId { get; set; } /// @@ -25,12 +23,12 @@ namespace Yi.Furion.Core.Bbs.Dtos.Comment /// /// ڵid /// - public long RootId { get; set; } + public Guid RootId { get; set; } /// /// ظCommentId /// - public long ParentId { get; set; } + public Guid ParentId { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentUpdateInputVo.cs similarity index 67% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentUpdateInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentUpdateInputVo.cs index b2240db5..02d7fb44 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Comment/CommentUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentUpdateInputVo.cs @@ -1,4 +1,4 @@ -namespace Yi.Furion.Core.Bbs.Dtos.Comment +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment { public class CommentUpdateInputVo { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussCreateInputVo.cs similarity index 75% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussCreateInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussCreateInputVo.cs index 77f792a3..d803b075 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussCreateInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussCreateInputVo.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Furion.Core.Bbs.Enums; +using Yi.Framework.Bbs.Domain.Shared.Enums; -namespace Yi.Furion.Core.Bbs.Dtos.Discuss +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss { /// /// Discuss输入创建对象 @@ -19,7 +14,7 @@ namespace Yi.Furion.Core.Bbs.Dtos.Discuss public string Content { get; set; } public string? Color { get; set; } - public long PlateId { get; set; } + public Guid PlateId { get; set; } /// /// 默认公开 diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListInputVo.cs similarity index 63% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussGetListInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListInputVo.cs index de6693d1..83aeb025 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussGetListInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListInputVo.cs @@ -1,13 +1,13 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Furion.Core.Bbs.Enums; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Bbs.Domain.Shared.Enums; -namespace Yi.Furion.Core.Bbs.Dtos.Discuss +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss { public class DiscussGetListInputVo : PagedAndSortedResultRequestDto { public string Title { get; set; } - public long? PlateId { get; set; } + public Guid? PlateId { get; set; } //Ĭϲѯö public bool IsTop { get; set; } = false; diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListOutputDto.cs similarity index 76% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussGetListOutputDto.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListOutputDto.cs index 92f9478b..40dbd455 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetListOutputDto.cs @@ -1,19 +1,16 @@ -using System; -using System.Collections.Generic; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Furion.Core.Bbs.Consts; -using Yi.Furion.Core.Bbs.Enums; -using Yi.Furion.Core.Rbac.Dtos.User; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Bbs.Domain.Shared.Consts; +using Yi.Framework.Bbs.Domain.Shared.Enums; +using Yi.Framework.Rbac.Application.Contracts.Dtos.User; -namespace Yi.Furion.Core.Bbs.Dtos.Discuss +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss { - public class DiscussGetListOutputDto : IEntityDto + public class DiscussGetListOutputDto : EntityDto { /// /// Ƿѵ /// public bool IsAgree { get; set; } - public long Id { get; set; } public string Title { get; set; } public string Types { get; set; } public string? Introduction { get; set; } @@ -25,7 +22,7 @@ namespace Yi.Furion.Core.Bbs.Dtos.Discuss //public string Content { get; set; } public string? Color { get; set; } - public long PlateId { get; set; } + public Guid PlateId { get; set; } //ǷöĬfalse public bool IsTop { get; set; } @@ -44,17 +41,17 @@ namespace Yi.Furion.Core.Bbs.Dtos.Discuss public string? PrivateCode { get; set; } public DateTime CreationTime { get; set; } - public List PermissionUserIds { get; set; } + public List? PermissionUserIds { get; set; } public UserGetListOutputDto User { get; set; } public void SetBan() { - this.Title = DiscussConst.Privacy; - this.Introduction = ""; - this.Cover = null; + Title = DiscussConst.Privacy; + Introduction = ""; + Cover = null; //ֹ - this.IsBan = true; + IsBan = true; } } @@ -62,9 +59,9 @@ namespace Yi.Furion.Core.Bbs.Dtos.Discuss public static class DiscussGetListOutputDtoExtension { - public static void ApplyPermissionTypeFilter(this List dtos, long userId) + public static void ApplyPermissionTypeFilter(this List dtos, Guid userId) { - dtos?.ForEach(dto => + dtos?.ForEach(dto => { switch (dto.PermissionType) { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetOutputDto.cs similarity index 67% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussGetOutputDto.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetOutputDto.cs index 0bf7aeec..c11ba1d5 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussGetOutputDto.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussGetOutputDto.cs @@ -1,15 +1,11 @@ -using System; -using System.Collections.Generic; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Furion.Core.Bbs.Enums; -using Yi.Furion.Core.Rbac.Dtos.User; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Bbs.Domain.Shared.Enums; +using Yi.Framework.Rbac.Application.Contracts.Dtos.User; -namespace Yi.Furion.Core.Bbs.Dtos.Discuss +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss { - public class DiscussGetOutputDto : IEntityDto + public class DiscussGetOutputDto : EntityDto { - - public long Id { get; set; } public string Title { get; set; } public string? Types { get; set; } public string? Introduction { get; set; } @@ -18,7 +14,7 @@ namespace Yi.Furion.Core.Bbs.Dtos.Discuss public string Content { get; set; } public string? Color { get; set; } - public long PlateId { get; set; } + public Guid PlateId { get; set; } //ǷöĬfalse public bool IsTop { get; set; } @@ -34,7 +30,7 @@ namespace Yi.Furion.Core.Bbs.Dtos.Discuss public DateTime CreationTime { get; set; } public DiscussPermissionTypeEnum PermissionType { get; set; } - public List PermissionUserIds { get; set; } + public List? PermissionUserIds { get; set; } public UserGetListOutputDto User { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussUpdateInputVo.cs similarity index 76% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussUpdateInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussUpdateInputVo.cs index ce4e43e7..d5574786 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Discuss/DiscussUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Discuss/DiscussUpdateInputVo.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; -using Yi.Furion.Core.Bbs.Enums; +using Yi.Framework.Bbs.Domain.Shared.Enums; -namespace Yi.Furion.Core.Bbs.Dtos.Discuss +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss { public class DiscussUpdateInputVo { @@ -13,7 +12,7 @@ namespace Yi.Furion.Core.Bbs.Dtos.Discuss public string Content { get; set; } public string? Color { get; set; } - public List PermissionUserIds { get; set; } + public List PermissionUserIds { get; set; } public DiscussPermissionTypeEnum PermissionType { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeCreateInputVo.cs similarity index 62% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeCreateInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeCreateInputVo.cs index ee121055..9e7a04d6 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeCreateInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeCreateInputVo.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Bbs.Dtos.MyType +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.MyType { /// /// Label输入创建对象 diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeGetListInputVo.cs new file mode 100644 index 00000000..7643e6a8 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeGetListInputVo.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.MyType +{ + public class MyTypeGetListInputVo : PagedAndSortedResultRequestDto + { + public string? Name { get; set; } + public string? Color { get; set; } + public string? BackgroundColor { get; set; } + public Guid? UserId { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeGetListOutputDto.cs new file mode 100644 index 00000000..cbd7125e --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeGetListOutputDto.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.MyType +{ + public class MyTypeGetListOutputDto : EntityDto + { + public string Name { get; set; } + public string? Color { get; set; } + public string? BackgroundColor { get; set; } + public Guid UserId { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeOutputDto.cs new file mode 100644 index 00000000..d020c4e8 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeOutputDto.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.MyType +{ + public class MyTypeOutputDto : EntityDto + { + public string Name { get; set; } + public string? Color { get; set; } + public string? BackgroundColor { get; set; } + public Guid UserId { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeUpdateInputVo.cs new file mode 100644 index 00000000..29c9f921 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/MyType/MyTypeUpdateInputVo.cs @@ -0,0 +1,10 @@ +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.MyType +{ + public class MyTypeUpdateInputVo + { + public string Name { get; set; } + public string? Color { get; set; } + public string? BackgroundColor { get; set; } + public Guid UserId { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateCreateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateCreateInputVo.cs similarity index 56% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateCreateInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateCreateInputVo.cs index 9e4db9a6..0280902b 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateCreateInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateCreateInputVo.cs @@ -1,17 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Bbs.Dtos.Plate +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Plate { /// /// Plate输入创建对象 /// public class PlateCreateInputVo { - public long Id { get; set; } public string Name { get; set; } public string? Logo { get; set; } public string? Introduction { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateGetListInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListInputVo.cs similarity index 52% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateGetListInputVo.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListInputVo.cs index fb7f652d..b7a6ec3d 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateGetListInputVo.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListInputVo.cs @@ -1,11 +1,10 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Bbs.Dtos.Plate +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Plate { public class PlateGetListInputVo : PagedAndSortedResultRequestDto { - public long Id { get; set; } - public string Name { get; set; } + public string? Name { get; set; } public string? Logo { get; set; } public string? Introduction { get; set; } } diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListOutputDto.cs new file mode 100644 index 00000000..1f2970c7 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetListOutputDto.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Plate +{ + public class PlateGetListOutputDto : EntityDto + { + + public string Name { get; set; } + public string? Logo { get; set; } + public string? Introduction { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetOutputDto.cs new file mode 100644 index 00000000..24ba4208 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateGetOutputDto.cs @@ -0,0 +1,11 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Plate +{ + public class PlateGetOutputDto : EntityDto + { + public string Name { get; set; } + public string? Logo { get; set; } + public string? Introduction { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateUpdateInputVo.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateUpdateInputVo.cs new file mode 100644 index 00000000..16a55e14 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Plate/PlateUpdateInputVo.cs @@ -0,0 +1,9 @@ +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Plate +{ + public class PlateUpdateInputVo + { + public string? Name { get; set; } + public string? Logo { get; set; } + public string? Introduction { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IAccessLogService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IAccessLogService.cs similarity index 74% rename from Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IAccessLogService.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IAccessLogService.cs index d845cf51..09af4933 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IAccessLogService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IAccessLogService.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Application.Bbs.Services +namespace Yi.Framework.Bbs.Application.Contracts.IServices { public interface IAccessLogService { diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IArticleService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IArticleService.cs new file mode 100644 index 00000000..04a8bddd --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IArticleService.cs @@ -0,0 +1,13 @@ +using Yi.Framework.Bbs.Application.Contracts.Dtos.Article; +using Yi.Framework.Ddd.Application.Contracts; + +namespace Yi.Framework.Bbs.Application.Contracts.IServices +{ + /// + /// Article服务抽象 + /// + public interface IArticleService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IBannerService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IBannerService.cs new file mode 100644 index 00000000..63c3d2e5 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IBannerService.cs @@ -0,0 +1,13 @@ +using Yi.Framework.Bbs.Application.Contracts.Dtos.Banner; +using Yi.Framework.Ddd.Application.Contracts; + +namespace Yi.Framework.Bbs.Application.Contracts.IServices +{ + /// + /// Banner抽象 + /// + public interface IBannerService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ICommentService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ICommentService.cs new file mode 100644 index 00000000..c3e693c7 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ICommentService.cs @@ -0,0 +1,13 @@ +using Yi.Framework.Bbs.Application.Contracts.Dtos.Comment; +using Yi.Framework.Ddd.Application.Contracts; + +namespace Yi.Framework.Bbs.Application.Contracts.IServices +{ + /// + /// Comment服务抽象 + /// + public interface ICommentService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IDiscussService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IDiscussService.cs new file mode 100644 index 00000000..fec996fd --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IDiscussService.cs @@ -0,0 +1,13 @@ +using Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss; +using Yi.Framework.Ddd.Application.Contracts; + +namespace Yi.Framework.Bbs.Application.Contracts.IServices +{ + /// + /// Discuss服务抽象 + /// + public interface IDiscussService : IYiCrudAppService + { + Task VerifyDiscussPermissionAsync(Guid discussId); + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IMyTypeService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IMyTypeService.cs new file mode 100644 index 00000000..12554e69 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IMyTypeService.cs @@ -0,0 +1,12 @@ +using Yi.Framework.Bbs.Application.Contracts.Dtos.MyType; +using Yi.Framework.Ddd.Application.Contracts; +namespace Yi.Framework.Bbs.Application.Contracts.IServices +{ + /// + /// Label服务抽象 + /// + public interface IMyTypeService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IPlateService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IPlateService.cs new file mode 100644 index 00000000..e2a05217 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/IPlateService.cs @@ -0,0 +1,13 @@ +using Yi.Framework.Bbs.Application.Contracts.Dtos.Plate; +using Yi.Framework.Ddd.Application.Contracts; + +namespace Yi.Framework.Bbs.Application.Contracts.IServices +{ + /// + /// Plate服务抽象 + /// + public interface IPlateService : IYiCrudAppService + { + + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/ISettingService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ISettingService.cs similarity index 73% rename from Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/ISettingService.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ISettingService.cs index 84fc5299..51668a61 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/ISettingService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/IServices/ISettingService.cs @@ -1,6 +1,6 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; +using Volo.Abp.Application.Services; -namespace Yi.Furion.Application.Bbs.Services +namespace Yi.Framework.Bbs.Application.Contracts.IServices { /// /// Setting应用抽象 diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Yi.Framework.Bbs.Application.Contracts.csproj b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Yi.Framework.Bbs.Application.Contracts.csproj new file mode 100644 index 00000000..61e67621 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Yi.Framework.Bbs.Application.Contracts.csproj @@ -0,0 +1,14 @@ + + + + net7.0 + enable + enable + + + + + + + + diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Yi.Framework.Bbs.Application.Contracts.xml b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Yi.Framework.Bbs.Application.Contracts.xml new file mode 100644 index 00000000..b157c748 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Yi.Framework.Bbs.Application.Contracts.xml @@ -0,0 +1,174 @@ + + + + Yi.Framework.Bbs.Application.Contracts + + + + + Article输入创建对象 + + + + + Banner输入创建对象 + + + + + Comment输入创建对象 + + + + + 评论id + + + + + 主题id + + + + + 第一层评论id,第一层为0 + + + + + 被回复的CommentId,第一层为0 + + + + + 评论多反 + + + + + 主题id + + + + + 用户,评论人用户信息 + + + + + 被评论的用户信息 + + + + + 这个不是一个树形,而是存在一个二维数组,该Children只有在顶级时候,只有一层 + + + + + 单返回,返回单条评论即可 + + + + + 用户id联表为用户对象 + + + + + 根节点的评论id + + + + + 被回复的CommentId + + + + + Discuss输入创建对象 + + + + + 默认公开 + + + + + 封面 + + + + + 是否已点赞 + + + + + 封面 + + + + + 封面 + + + + + 封面 + + + + + Label输入创建对象 + + + + + Plate输入创建对象 + + + + + Article服务抽象 + + + + + Banner抽象 + + + + + Comment服务抽象 + + + + + Discuss服务抽象 + + + + + Label服务抽象 + + + + + Plate服务抽象 + + + + + Setting应用抽象 + + + + + 获取配置标题 + + + + + diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/YiFrameworkBbsApplicationContractsModule.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/YiFrameworkBbsApplicationContractsModule.cs new file mode 100644 index 00000000..99753575 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/YiFrameworkBbsApplicationContractsModule.cs @@ -0,0 +1,15 @@ +using Volo.Abp.Modularity; +using Yi.Framework.Bbs.Domain.Shared; +using Yi.Framework.Rbac.Application.Contracts; + +namespace Yi.Framework.Bbs.Application.Contracts +{ + [DependsOn(typeof(YiFrameworkBbsDomainSharedModule), + + typeof(YiFrameworkRbacApplicationContractsModule) + )] + public class YiFrameworkBbsApplicationContractsModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/AccessLogService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AccessLogService.cs similarity index 83% rename from Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/AccessLogService.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AccessLogService.cs index a5326f0f..307a524e 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/AccessLogService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AccessLogService.cs @@ -1,22 +1,17 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using EasyTool.Extension; -using Mapster; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Furion.Core.Bbs.Dtos.AccessLog; -using Yi.Furion.Core.Bbs.Entities; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Application.Services; +using Yi.Framework.Bbs.Application.Contracts.Dtos.AccessLog; +using Yi.Framework.Bbs.Application.Contracts.IServices; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Bbs.Services.Impl +namespace Yi.Framework.Bbs.Application.Services { - [ApiDescriptionSettings("BBS")] - public class AccessLogService : IAccessLogService, IDynamicApiController + public class AccessLogService : ApplicationService, IAccessLogService { - private readonly IRepository _repository; - public AccessLogService(IRepository repository) { _repository = repository; } + private readonly ISqlSugarRepository _repository; + public AccessLogService(ISqlSugarRepository repository) { _repository = repository; } public DateTime GetWeekFirst() { diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/AgreeService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AgreeService.cs similarity index 64% rename from Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/AgreeService.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AgreeService.cs index d1779ef2..df9bcbef 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/AgreeService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AgreeService.cs @@ -1,30 +1,26 @@ -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Framework.Infrastructure.Exceptions; -using Yi.Furion.Core.Bbs.Dtos.Argee; -using Yi.Furion.Core.Bbs.Entities; +using Volo.Abp; +using Volo.Abp.Application.Services; +using Volo.Abp.Uow; +using Yi.Framework.Bbs.Application.Contracts.Dtos.Argee; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Bbs.Services.Impl +namespace Yi.Framework.Bbs.Application.Services { /// /// 点赞功能 /// - [ApiDescriptionSettings("BBS")] - public class AgreeService : ApplicationService, IApplicationService, IDynamicApiController, ITransient + public class AgreeService : ApplicationService, IApplicationService { - public AgreeService(IRepository repository, IRepository discssRepository, ICurrentUser currentUser) + public AgreeService(ISqlSugarRepository repository, ISqlSugarRepository discssRepository) { _repository = repository; - _currentUser = currentUser; _discssRepository = discssRepository; } - private IRepository _repository { get; set; } + private ISqlSugarRepository _repository { get; set; } - private IRepository _discssRepository { get; set; } - private ICurrentUser _currentUser { get; set; } + private ISqlSugarRepository _discssRepository { get; set; } /// @@ -32,9 +28,9 @@ namespace Yi.Furion.Application.Bbs.Services.Impl /// /// [UnitOfWork] - public async Task PostOperateAsync(long discussId) + public async Task PostOperateAsync(Guid discussId) { - var entity = await _repository.GetFirstAsync(x => x.DiscussId == discussId && x.CreatorId == _currentUser.Id); + var entity = await _repository.GetFirstAsync(x => x.DiscussId == discussId && x.CreatorId == this.CurrentUser.Id); //判断是否已经点赞过 if (entity is null) { diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/ArticleService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/ArticleService.cs similarity index 64% rename from Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/ArticleService.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/ArticleService.cs index ab998928..12fa9001 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/ArticleService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/ArticleService.cs @@ -1,39 +1,41 @@ -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Infrastructure.Exceptions; -using Yi.Furion.Core.Bbs.Consts; -using Yi.Furion.Core.Bbs.Dtos.Article; -using Yi.Furion.Core.Bbs.Entities; -using Yi.Furion.Core.Rbac.Consts; -using Yi.Furion.Sqlsugar.Core.Repositories; +using System.Collections.Generic; +using Mapster; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Yi.Framework.Bbs.Application.Contracts.Dtos.Article; +using Yi.Framework.Bbs.Application.Contracts.IServices; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.Bbs.Domain.Repositories; +using Yi.Framework.Bbs.Domain.Shared.Consts; +using Yi.Framework.Core.Extensions; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Domain.Shared.Consts; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Bbs.Services.Impl +namespace Yi.Framework.Bbs.Application.Services { /// /// Article服务实现 /// - [ApiDescriptionSettings("BBS")] - public class ArticleService : CrudAppService, - IArticleService, IDynamicApiController, ITransient + public class ArticleService : YiCrudAppService, + IArticleService { public ArticleService(IArticleRepository articleRepository, - IRepository discussRepository, - ICurrentUser currentUser, - IDiscussService discussService) + ISqlSugarRepository discussRepository, + IDiscussService discussService) : base(articleRepository) { _articleRepository = articleRepository; - _currentUser = currentUser; _discussRepository = discussRepository; _discussService = discussService; } private IArticleRepository _articleRepository { get; set; } - private IRepository _discussRepository { get; set; } - private ICurrentUser _currentUser { get; set; } + private ISqlSugarRepository _discussRepository { get; set; } private IDiscussService _discussService { get; set; } /// /// 获取文章全部平铺信息 @@ -41,15 +43,15 @@ namespace Yi.Furion.Application.Bbs.Services.Impl /// /// /// - [Route("/api/article/all/discuss-id/{discussId}")] - public async Task> GetAllAsync([FromRoute] long discussId) + [Route("article/all/discuss-id/{discussId}")] + public async Task> GetAllAsync([FromRoute] Guid discussId) { await _discussService.VerifyDiscussPermissionAsync(discussId); var entities = await _articleRepository.GetTreeAsync(x => x.DiscussId == discussId); //var result = entities.Tile(); - var items = _mapper.Map>(entities); + var items = entities.Adapt>(); return items; } @@ -59,7 +61,7 @@ namespace Yi.Furion.Application.Bbs.Services.Impl /// /// /// - public async Task> GetDiscussIdAsync([FromRoute] long discussId) + public async Task> GetDiscussIdAsync([FromRoute] Guid discussId) { if (!await _discussRepository.IsAnyAsync(x => x.Id == discussId)) { @@ -84,7 +86,7 @@ namespace Yi.Furion.Application.Bbs.Services.Impl { throw new UserFriendlyException(DiscussConst.No_Exist); } - if (input.ParentId != 0 && !await _repository.IsAnyAsync(x => x.Id == input.ParentId)) + if (input.ParentId != Guid.Empty && !await _articleRepository.IsAnyAsync(x => x.Id == input.ParentId)) { throw new UserFriendlyException(ArticleConst.No_Exist); } @@ -98,14 +100,13 @@ namespace Yi.Furion.Application.Bbs.Services.Impl /// /// /// - public async Task VerifyDiscussCreateIdAsync(long? userId) + public async Task VerifyDiscussCreateIdAsync(Guid? userId) { //只有文章是特殊的,不能在其他主题下创建 //主题的创建者不是当前用户,同时,没有权限或者超级管理 - //false & true & false ,三个条件任意满意一个,即可成功使用||,最后取反,一个都不满足 // - if (userId != _currentUser.Id && !UserConst.Admin.Equals(_currentUser.UserName) && !_currentUser.Permission.Contains("bbs:discuss:add")) + if (userId != CurrentUser.Id && !UserConst.Admin.Equals(this.CurrentUser.UserName) && this.LazyServiceProvider.GetRequiredService().HttpContext.GetUserPermissions(TokenTypeConst.Permission).Contains("bbs:discuss:add")) { throw new UserFriendlyException("无权限在其他用户主题中创建子文章"); } diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/BannerService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/BannerService.cs new file mode 100644 index 00000000..2f298889 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/BannerService.cs @@ -0,0 +1,19 @@ +using Volo.Abp.Domain.Repositories; +using Yi.Framework.Bbs.Application.Contracts.Dtos.Banner; +using Yi.Framework.Bbs.Application.Contracts.IServices; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.Ddd.Application; + +namespace Yi.Framework.Bbs.Application.Services +{ + /// + /// Banner服务实现 + /// + public class BannerService : YiCrudAppService, + IBannerService + { + public BannerService(IRepository repository) : base(repository) + { + } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/CommentService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/CommentService.cs similarity index 63% rename from Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/CommentService.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/CommentService.cs index dc364196..24147049 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/CommentService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/CommentService.cs @@ -1,38 +1,37 @@ +using Microsoft.AspNetCore.Mvc; using SqlSugar; -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Infrastructure.Exceptions; -using Yi.Furion.Application.Bbs.Domain; -using Yi.Furion.Core.Bbs.Consts; -using Yi.Furion.Core.Bbs.Dtos.Comment; -using Yi.Furion.Core.Bbs.Entities; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Bbs.Application.Contracts.Dtos.Comment; +using Yi.Framework.Bbs.Application.Contracts.IServices; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.Bbs.Domain.Managers; +using Yi.Framework.Bbs.Domain.Shared.Consts; +using Yi.Framework.Ddd.Application; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Bbs.Services.Impl +namespace Yi.Framework.Bbs.Application.Services { /// /// 评论 /// - [ApiDescriptionSettings("BBS")] - public class CommentService : CrudAppService, - ICommentService, IDynamicApiController, ITransient + public class CommentService : YiCrudAppService, + ICommentService { - - public CommentService(ForumManager forumManager, ICurrentUser currentUser, IRepository discussRepository, IDiscussService discussService) + private readonly ISqlSugarRepository _repository; + public CommentService(ForumManager forumManager, ISqlSugarRepository discussRepository, IDiscussService discussService, ISqlSugarRepository CommentRepository) :base(CommentRepository) { _forumManager = forumManager; - _currentUser = currentUser; _discussRepository = discussRepository; - _discussService=discussService; + _discussService = discussService; + _repository = CommentRepository; } private ForumManager _forumManager { get; set; } - private ICurrentUser _currentUser { get; set; } - private IRepository _discussRepository { get; set; } + private ISqlSugarRepository _discussRepository { get; set; } private IDiscussService _discussService { get; set; } /// @@ -41,17 +40,17 @@ namespace Yi.Furion.Application.Bbs.Services.Impl /// /// /// - public async Task> GetDiscussIdAsync([FromRoute] long discussId, [FromQuery] CommentGetListInputVo input) + public async Task> GetDiscussIdAsync([FromRoute] Guid discussId, [FromQuery] CommentGetListInputVo input) { await _discussService.VerifyDiscussPermissionAsync(discussId); - var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.Content), x => x.Content.Contains(input.Content)) + var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.Content), x => x.Content.Contains(input.Content)) .Where(x => x.DiscussId == discussId) .Includes(x => x.CreateUser) .ToListAsync(); //结果初始值,第一层等于全部根节点 - var outPut = entities.Where(x => x.ParentId == 0).OrderByDescending(x => x.CreationTime).ToList(); + var outPut = entities.Where(x => x.ParentId ==Guid.Empty).OrderByDescending(x => x.CreationTime).ToList(); //将全部数据进行hash var dic = entities.ToDictionary(x => x.Id); @@ -60,7 +59,7 @@ namespace Yi.Furion.Application.Bbs.Services.Impl foreach (var comment in entities) { //不是根节点,需要赋值 被评论者用户信息等 - if (comment.ParentId != 0) + if (comment.ParentId != Guid.Empty) { var parentComment = dic[comment.ParentId]; comment.CommentedUser = parentComment.CreateUser; @@ -68,7 +67,7 @@ namespace Yi.Furion.Application.Bbs.Services.Impl //root或者parent id,根节点都是等于0的 var id = comment.RootId; - if (id is not 0) + if (id != Guid.Empty) { dic[id].Children.Add(comment); } diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/DiscussService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/DiscussService.cs similarity index 63% rename from Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/DiscussService.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/DiscussService.cs index e07a0780..96edd44e 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/DiscussService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/DiscussService.cs @@ -1,56 +1,52 @@ -using Furion.EventBus; +using Microsoft.AspNetCore.Mvc; using SqlSugar; -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Infrastructure.Exceptions; -using Yi.Furion.Application.Bbs.Domain; -using Yi.Furion.Core.Bbs.Consts; -using Yi.Furion.Core.Bbs.Dtos.Discuss; -using Yi.Furion.Core.Bbs.Entities; -using Yi.Furion.Core.Bbs.Enums; -using Yi.Furion.Core.Bbs.Etos; -using Yi.Furion.Core.Rbac.Dtos.User; -using Yi.Furion.Core.Rbac.Entities; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.EventBus.Local; +using Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss; +using Yi.Framework.Bbs.Application.Contracts.IServices; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.Bbs.Domain.Managers; +using Yi.Framework.Bbs.Domain.Shared.Consts; +using Yi.Framework.Bbs.Domain.Shared.Enums; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.User; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Bbs.Services.Impl +namespace Yi.Framework.Bbs.Application.Services { /// /// Discuss应用服务实现,用于参数效验、领域服务业务组合、日志记录、事务处理、账户信息 /// - [ApiDescriptionSettings("BBS")] - public class DiscussService : CrudAppService, - IDiscussService,IDynamicApiController,ITransient + public class DiscussService : YiCrudAppService, + IDiscussService { - public DiscussService(ICurrentUser currentUser, ForumManager forumManager, IRepository plateEntityRepository, IEventPublisher eventPublisher) + public DiscussService(ForumManager forumManager, ISqlSugarRepository plateEntityRepository, ILocalEventBus localEventBus) : base(forumManager._discussRepository) { - _currentUser = currentUser; _forumManager = forumManager; - _plateEntityRepository= plateEntityRepository; - _eventPublisher= eventPublisher; + _plateEntityRepository = plateEntityRepository; + _localEventBus = localEventBus; } - + private readonly ILocalEventBus _localEventBus; private ForumManager _forumManager { get; set; } - private IRepository _plateEntityRepository { get; set; } - - private IEventPublisher _eventPublisher { get; set; } + private ISqlSugarRepository _plateEntityRepository { get; set; } + + - //[Autowired] - private ICurrentUser _currentUser { get; set; } /// /// 单查 /// /// /// - public async override Task GetAsync(long id) + public async override Task GetAsync(Guid id) { //查询主题发布 浏览主题 事件,浏览数+1 - var item = await _DbQueryable.LeftJoin((discuss, user) => discuss.CreatorId == user.Id) + var item = await _forumManager._discussRepository._DbQueryable.LeftJoin((discuss, user) => discuss.CreatorId == user.Id) .Select((discuss, user) => new DiscussGetOutputDto { User = new UserGetListOutputDto() { UserName = user.UserName, Nick = user.Nick, Icon = user.Icon } @@ -59,7 +55,9 @@ namespace Yi.Furion.Application.Bbs.Services.Impl if (item is not null) { await VerifyDiscussPermissionAsync(item.Id); - _eventPublisher.PublishAsync(new SeeDiscussEventSource(new SeeDiscussEventArgs { DiscussId = item.Id, OldSeeNum = item.SeeNum })); + + throw new NotImplementedException("等待更新消息通知"); + //_eventPublisher.PublishAsync(new SeeDiscussEventSource(new SeeDiscussEventArgs { DiscussId = item.Id, OldSeeNum = item.SeeNum })); } return item; @@ -76,7 +74,7 @@ namespace Yi.Furion.Application.Bbs.Services.Impl { //需要关联创建者用户 RefAsync total = 0; - var items = await _DbQueryable + var items = await _forumManager._discussRepository._DbQueryable .WhereIF(!string.IsNullOrEmpty(input.Title), x => x.Title.Contains(input.Title)) .WhereIF(input.PlateId is not null, x => x.PlateId == input.PlateId) .Where(x => x.IsTop == input.IsTop) @@ -88,15 +86,15 @@ namespace Yi.Furion.Application.Bbs.Services.Impl .Select((discuss, user) => new DiscussGetListOutputDto { Id = discuss.Id, - IsAgree = SqlFunc.Subqueryable().Where(x => x.CreatorId == _currentUser.Id && x.DiscussId == discuss.Id).Any(), + IsAgree = SqlFunc.Subqueryable().Where(x => x.CreatorId == CurrentUser.Id && x.DiscussId == discuss.Id).Any(), User = new UserGetListOutputDto() { Id = user.Id, UserName = user.UserName, Nick = user.Nick, Icon = user.Icon } }, true) - .ToPageListAsync(input.PageNum, input.PageSize, total); + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); //查询完主题之后,要过滤一下私有的主题信息 - items.ApplyPermissionTypeFilter(_currentUser.Id); + items.ApplyPermissionTypeFilter(CurrentUser.Id ?? Guid.Empty); return new PagedResultDto(total, items); } @@ -124,23 +122,23 @@ namespace Yi.Furion.Application.Bbs.Services.Impl /// /// /// - public async Task VerifyDiscussPermissionAsync(long discussId) + public async Task VerifyDiscussPermissionAsync(Guid discussId) { - var discuss = await _repository.GetFirstAsync(x => x.Id == discussId); + var discuss = await _forumManager._discussRepository.GetFirstAsync(x => x.Id == discussId); if (discuss is null) { throw new UserFriendlyException(DiscussConst.No_Exist); } if (discuss.PermissionType == DiscussPermissionTypeEnum.Oneself) { - if (discuss.CreatorId != _currentUser.Id) + if (discuss.CreatorId != CurrentUser.Id) { throw new UserFriendlyException(DiscussConst.Privacy); } } if (discuss.PermissionType == DiscussPermissionTypeEnum.User) { - if (discuss.CreatorId != _currentUser.Id && !discuss.PermissionUserIds.Contains(_currentUser.Id)) + if (discuss.CreatorId != CurrentUser.Id && !discuss.PermissionUserIds.Contains(CurrentUser.Id ?? Guid.Empty)) { throw new UserFriendlyException(DiscussConst.Privacy); } diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/MyTypeService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/MyTypeService.cs new file mode 100644 index 00000000..33f1e953 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/MyTypeService.cs @@ -0,0 +1,54 @@ +using Volo.Abp.Application.Dtos; +using Volo.Abp.Data; +using Yi.Framework.Bbs.Application.Contracts.Dtos.MyType; +using Yi.Framework.Bbs.Application.Contracts.IServices; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.Ddd.Application; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Bbs.Application.Services +{ + /// + /// Label服务实现 + /// + public class MyTypeService : YiCrudAppService, + IMyTypeService + { + private ISqlSugarRepository _repository; + public MyTypeService(ISqlSugarRepository repository, IDataFilter dataFilter):base(repository) + { + _repository= repository; + _dataFilter = dataFilter; + } + + private IDataFilter _dataFilter { get; set; } + + /// + /// 获取当前用户的主题类型 + /// + /// + /// + public Task> GetListCurrentAsync(MyTypeGetListInputVo input) + { + //过滤器需要更换 + //_dataFilter.Enable(x => x.UserId == CurrentUser.Id); + + //_dataFilter.AddFilter(x => x.UserId == CurrentUser.Id); + return base.GetListAsync(input); + } + + /// + /// 创建 + /// + /// + /// + public override async Task CreateAsync(MyTypeCreateInputVo input) + { + var entity = await MapToEntityAsync(input); + entity.UserId = CurrentUser.Id??Guid.Empty; + entity.IsDeleted = false; + var outputEntity = await _repository.InsertReturnEntityAsync(entity); + return await MapToGetOutputDtoAsync(outputEntity); + } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/PlateService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/PlateService.cs new file mode 100644 index 00000000..b438a99a --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/PlateService.cs @@ -0,0 +1,19 @@ +using Volo.Abp.Domain.Repositories; +using Yi.Framework.Bbs.Application.Contracts.Dtos.Plate; +using Yi.Framework.Bbs.Application.Contracts.IServices; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.Ddd.Application; + +namespace Yi.Framework.Bbs.Application.Services +{ + /// + /// Plate服务实现 + /// + public class PlateService : YiCrudAppService, + IPlateService + { + public PlateService(IRepository repository) : base(repository) + { + } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/SettingService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/SettingService.cs similarity index 69% rename from Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/SettingService.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/SettingService.cs index bdc2198b..14ec2213 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/SettingService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/SettingService.cs @@ -1,13 +1,13 @@ -using Yi.Framework.Infrastructure.Ddd.Services; +using Volo.Abp.Application.Services; +using Yi.Framework.Bbs.Application.Contracts.IServices; -namespace Yi.Furion.Application.Bbs.Services.Impl +namespace Yi.Framework.Bbs.Application.Services { /// /// Setting服务实现 /// - [ApiDescriptionSettings("BBS")] public class SettingService : ApplicationService, - ISettingService,IDynamicApiController,ITransient + ISettingService { /// /// 获取配置标题 diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Yi.Framework.Bbs.Application.csproj b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Yi.Framework.Bbs.Application.csproj new file mode 100644 index 00000000..ed1b0a05 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Yi.Framework.Bbs.Application.csproj @@ -0,0 +1,15 @@ + + + + net7.0 + enable + enable + + + + + + + + + diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Yi.Framework.Bbs.Application.xml b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Yi.Framework.Bbs.Application.xml new file mode 100644 index 00000000..e351597f --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Yi.Framework.Bbs.Application.xml @@ -0,0 +1,163 @@ + + + + Yi.Framework.Bbs.Application + + + + + 触发 + + + + + + 获取当前周数据 + + + + + + 点赞功能 + + + + + 点赞,返回true为点赞+1,返回false为点赞-1 + + + + + + Article服务实现 + + + + + 获取文章全部平铺信息 + + + + + + + + 查询文章 + + + + + + + + 发表文章 + + + + + + + + 效验创建权限 + + + + + + + Banner服务实现 + + + + + 评论 + + + + + 获取改主题下的评论,结构为二维列表,该查询无分页 + + + + + + + + 发表评论 + + + + + + + + Discuss应用服务实现,用于参数效验、领域服务业务组合、日志记录、事务处理、账户信息 + + + + + 单查 + + + + + + + 查询 + + + + + + + 创建主题 + + + + + + + 效验主题查询权限 + + + + + + + + Label服务实现 + + + + + 获取当前用户的主题类型 + + + + + + + 创建 + + + + + + + Plate服务实现 + + + + + Setting服务实现 + + + + + 获取配置标题 + + + + + + diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/YiFrameworkBbsApplicationModule.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/YiFrameworkBbsApplicationModule.cs new file mode 100644 index 00000000..c5e8ee20 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/YiFrameworkBbsApplicationModule.cs @@ -0,0 +1,18 @@ +using Volo.Abp.Modularity; +using Yi.Framework.Bbs.Application.Contracts; +using Yi.Framework.Bbs.Domain; +using Yi.Framework.Rbac.Application; + +namespace Yi.Framework.Bbs.Application +{ + [DependsOn(typeof(YiFrameworkBbsDomainModule), + typeof(YiFrameworkBbsApplicationContractsModule), + + + typeof(YiFrameworkRbacApplicationModule) + )] + public class YiFrameworkBbsApplicationModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/ArticleConst.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/ArticleConst.cs similarity index 88% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/ArticleConst.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/ArticleConst.cs index 16e9c1e6..b55d8c59 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/ArticleConst.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/ArticleConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Bbs.Consts +namespace Yi.Framework.Bbs.Domain.Shared.Consts { /// /// 常量定义 diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/CommentConst.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/CommentConst.cs similarity index 82% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/CommentConst.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/CommentConst.cs index 392b6d25..b5719756 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/CommentConst.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/CommentConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Bbs.Consts +namespace Yi.Framework.Bbs.Domain.Shared.Consts { /// /// 常量定义 diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/DiscussConst.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/DiscussConst.cs similarity index 89% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/DiscussConst.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/DiscussConst.cs index 7a240a77..bd90b72f 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/DiscussConst.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/DiscussConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Bbs.Consts +namespace Yi.Framework.Bbs.Domain.Shared.Consts { /// /// 常量定义 diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/LabelConst.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/LabelConst.cs similarity index 82% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/LabelConst.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/LabelConst.cs index e69dee95..a0cfac28 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/LabelConst.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/LabelConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Bbs.Consts +namespace Yi.Framework.Bbs.Domain.Shared.Consts { /// /// 常量定义 diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/PlateConst.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/PlateConst.cs similarity index 85% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/PlateConst.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/PlateConst.cs index 35bf309b..cc8bbe00 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Consts/PlateConst.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/PlateConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Bbs.Consts +namespace Yi.Framework.Bbs.Domain.Shared.Consts { /// /// 常量定义 diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Enums/DiscussPermissionTypeEnum.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Enums/DiscussPermissionTypeEnum.cs similarity index 90% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Enums/DiscussPermissionTypeEnum.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Enums/DiscussPermissionTypeEnum.cs index 73063a0c..b0930e7e 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Enums/DiscussPermissionTypeEnum.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Enums/DiscussPermissionTypeEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Bbs.Enums +namespace Yi.Framework.Bbs.Domain.Shared.Enums { public enum DiscussPermissionTypeEnum { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Enums/QueryDiscussTypeEnum.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Enums/QueryDiscussTypeEnum.cs similarity index 82% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Enums/QueryDiscussTypeEnum.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Enums/QueryDiscussTypeEnum.cs index 4a2f3c91..d0b6ae43 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Enums/QueryDiscussTypeEnum.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Enums/QueryDiscussTypeEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Bbs.Enums +namespace Yi.Framework.Bbs.Domain.Shared.Enums { public enum QueryDiscussTypeEnum { diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Yi.Framework.Bbs.Domain.Shared.csproj b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Yi.Framework.Bbs.Domain.Shared.csproj new file mode 100644 index 00000000..d87b5bb4 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Yi.Framework.Bbs.Domain.Shared.csproj @@ -0,0 +1,13 @@ + + + + net7.0 + enable + enable + + + + + + + diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Yi.Framework.Bbs.Domain.Shared.xml b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Yi.Framework.Bbs.Domain.Shared.xml new file mode 100644 index 00000000..6278f49e --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Yi.Framework.Bbs.Domain.Shared.xml @@ -0,0 +1,48 @@ + + + + Yi.Framework.Bbs.Domain.Shared + + + + + 常量定义 + + + + + 常量定义 + + + + + 常量定义 + + + + + 常量定义 + + + + + 常量定义 + + + + + 默认:公开 + + + + + 仅自己可见 + + + + + 部分用户可见 + + + + diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/YiFrameworkBbsDomainSharedModule.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/YiFrameworkBbsDomainSharedModule.cs new file mode 100644 index 00000000..3851fc70 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/YiFrameworkBbsDomainSharedModule.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Modularity; +using Yi.Framework.Rbac.Domain.Shared; + +namespace Yi.Framework.Bbs.Domain.Shared +{ + [DependsOn( + typeof(YiFrameworkRbacDomainSharedModule))] + public class YiFrameworkBbsDomainSharedModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/AccessLogEntity.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/AccessLogEntity.cs new file mode 100644 index 00000000..8e56ce4a --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/AccessLogEntity.cs @@ -0,0 +1,16 @@ +using SqlSugar; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; + +namespace Yi.Framework.Bbs.Domain.Entities +{ + [SugarTable("AccessLog")] + public class AccessLogEntity : Entity, IHasModificationTime, IHasCreationTime + { + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + public long Number { get; set; } + public DateTime? LastModificationTime { get; set; } + public DateTime CreationTime { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/AgreeEntity .cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/AgreeEntity .cs new file mode 100644 index 00000000..281a7742 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/AgreeEntity .cs @@ -0,0 +1,34 @@ +using SqlSugar; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; + +namespace Yi.Framework.Bbs.Domain.Entities +{ + [SugarTable("Agree")] + public class AgreeEntity : Entity, ICreationAuditedObject + { + public AgreeEntity() + { + } + + public AgreeEntity(Guid discussId) + { + DiscussId = discussId; + } + + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + public DateTime CreationTime { get; set; } + + /// + /// 主题id + /// + public Guid DiscussId { get; set; } + + /// + /// 创建者 + /// + public Guid? CreatorId { get; set; } + + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/ArticleEntity.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/ArticleEntity.cs similarity index 69% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/ArticleEntity.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/ArticleEntity.cs index 880fdb56..58eef9c5 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/ArticleEntity.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/ArticleEntity.cs @@ -1,30 +1,28 @@ -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Domain.Entities; -namespace Yi.Furion.Core.Bbs.Entities +namespace Yi.Framework.Bbs.Domain.Entities { [SugarTable("Article")] - public class ArticleEntity : IEntity, ISoftDelete + public class ArticleEntity : Entity, ISoftDelete { - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } public bool IsDeleted { get; set; } - [SugarColumn(Length = 999999)] + [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)] public string Content { get; set; } public string Name { get; set; } - public long DiscussId { get; set; } + public Guid DiscussId { get; set; } - public long ParentId { get; set; } + public Guid ParentId { get; set; } [SugarColumn(IsIgnore = true)] - public List Children { get; set; } + public List? Children { get; set; } } public static class ArticleEntityExtensions diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/BannerEntity.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/BannerEntity.cs new file mode 100644 index 00000000..aea6379f --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/BannerEntity.cs @@ -0,0 +1,25 @@ +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; + +namespace Yi.Framework.Bbs.Domain.Entities +{ + [SugarTable("Banner")] + public class BannerEntity : Entity, ISoftDelete, IAuditedObject + { + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + public string Name { get; set; } + public string? Logo { get; set; } + public string? Color { get; set; } + public bool IsDeleted { get; set; } + public DateTime CreationTime { get; set; } + + public Guid? CreatorId { get; set; } + + public Guid? LastModifierId { get; set; } + + public DateTime? LastModificationTime { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/CommentEntity.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/CommentEntity.cs similarity index 60% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/CommentEntity.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/CommentEntity.cs index 293fb0d7..19a86355 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/CommentEntity.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/CommentEntity.cs @@ -1,19 +1,17 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Furion.Core.Rbac.Entities; +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Rbac.Domain.Entities; -namespace Yi.Furion.Core.Bbs.Entities +namespace Yi.Framework.Bbs.Domain.Entities { /// /// 评论表 /// [SugarTable("Comment")] - public class CommentEntity : IEntity, ISoftDelete, IAuditedObject + public class CommentEntity : Entity, ISoftDelete, IAuditedObject { /// /// 采用二维数组方式,不使用树形方式 @@ -22,25 +20,25 @@ namespace Yi.Furion.Core.Bbs.Entities { } - public CommentEntity(long discussId) + public CommentEntity(Guid discussId) { DiscussId = discussId; } - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } public bool IsDeleted { get; set; } public string Content { get; set; } - public long DiscussId { get; set; } + public Guid DiscussId { get; set; } /// /// 被回复的CommentId /// - public long ParentId { get; set; } + public Guid ParentId { get; set; } public DateTime CreationTime { get; set; } - public long RootId { get; set; } + public Guid RootId { get; set; } [SugarColumn(IsIgnore = true)] public List Children { get; set; } = new(); @@ -58,9 +56,9 @@ namespace Yi.Furion.Core.Bbs.Entities [SugarColumn(IsIgnore = true)] public UserEntity CommentedUser { get; set; } - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } - public long? LastModifierId { get; set; } + public Guid? LastModifierId { get; set; } public DateTime? LastModificationTime { get; set; } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/DiscussEntity.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/DiscussEntity.cs similarity index 60% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/DiscussEntity.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/DiscussEntity.cs index 46b8c96c..26c842b6 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/DiscussEntity.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/DiscussEntity.cs @@ -1,26 +1,24 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Furion.Core.Bbs.Enums; +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Bbs.Domain.Shared.Enums; -namespace Yi.Furion.Core.Bbs.Entities +namespace Yi.Framework.Bbs.Domain.Entities { [SugarTable("Discuss")] - public class DiscussEntity : IEntity, ISoftDelete, IAuditedObject + public class DiscussEntity : Entity, ISoftDelete, IAuditedObject { public DiscussEntity() { } - public DiscussEntity(long plateId) + public DiscussEntity(Guid plateId) { PlateId = plateId; } - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } public string? Title { get; set; } public string? Types { get; set; } public string? Introduction { get; set; } @@ -31,7 +29,7 @@ namespace Yi.Furion.Core.Bbs.Entities /// public string? Cover { get; set; } - [SugarColumn(Length = 999999)] + [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)] public string Content { get; set; } public string? Color { get; set; } @@ -44,12 +42,12 @@ namespace Yi.Furion.Core.Bbs.Entities public DiscussPermissionTypeEnum PermissionType { get; set; } - public long PlateId { get; set; } + public Guid PlateId { get; set; } public DateTime CreationTime { get; set; } - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } - public long? LastModifierId { get; set; } + public Guid? LastModifierId { get; set; } public DateTime? LastModificationTime { get; set; } @@ -58,6 +56,6 @@ namespace Yi.Furion.Core.Bbs.Entities /// 当PermissionType为部分用户时候,以下列表中的用户+创建者 代表拥有权限 /// [SugarColumn(IsJson = true)]//使用json处理 - public List? PermissionUserIds { get; set; } + public List? PermissionUserIds { get; set; } } } diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/DiscussMyTypeEntity.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/DiscussMyTypeEntity.cs new file mode 100644 index 00000000..cc8b85e3 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/DiscussMyTypeEntity.cs @@ -0,0 +1,16 @@ +using SqlSugar; +using Volo.Abp.Domain.Entities; + +namespace Yi.Framework.Bbs.Domain.Entities +{ + [SugarTable("DiscussMyType")] + public class DiscussMyTypeEntity : Entity + { + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + + public Guid DiscussId { get; set; } + + public Guid MyTypeId { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/MyTypeEntity.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/MyTypeEntity.cs new file mode 100644 index 00000000..b25fe547 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/MyTypeEntity.cs @@ -0,0 +1,20 @@ +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Domain.Entities; + +namespace Yi.Framework.Bbs.Domain.Entities +{ + [SugarTable("MyType")] + public class MyTypeEntity : Entity, ISoftDelete + { + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + public bool IsDeleted { get; set; } + + public string Name { get; set; } + public string? Color { get; set; } + public string? BackgroundColor { get; set; } + + public Guid UserId { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/PlateEntity.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/PlateEntity.cs new file mode 100644 index 00000000..693690ff --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/PlateEntity.cs @@ -0,0 +1,18 @@ +using SqlSugar; +using Volo.Abp.Domain.Entities; +using Volo.Abp; + +namespace Yi.Framework.Bbs.Domain.Entities +{ + [SugarTable("Plate")] + public class PlateEntity : Entity, ISoftDelete + { + + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + public string Name { get; set; } + public string? Logo { get; set; } + public string? Introduction { get; set; } + public bool IsDeleted { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/SettingEntity.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/SettingEntity.cs similarity index 55% rename from Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/SettingEntity.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/SettingEntity.cs index f345a1b8..7567365c 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/SettingEntity.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Entities/SettingEntity.cs @@ -1,14 +1,14 @@ using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Entities; +using Volo.Abp.Domain.Entities; -namespace Yi.Furion.Core.Bbs.Entities +namespace Yi.Framework.Bbs.Domain.Entities { [SugarTable("Setting")] - public class SettingEntity : IEntity + public class SettingEntity : Entity { - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } public int CommentPage { get; set; } public int DiscussPage { get; set; } public int CommentExperience { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Domain/ForumManager.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Managers/ForumManager.cs similarity index 52% rename from Yi.Furion.Net6/Yi.Furion.Application/Bbs/Domain/ForumManager.cs rename to Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Managers/ForumManager.cs index 3546b7d1..44b28d15 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Domain/ForumManager.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Managers/ForumManager.cs @@ -1,18 +1,18 @@ -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Bbs.Entities; +using Volo.Abp.Domain.Services; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Bbs.Domain +namespace Yi.Framework.Bbs.Domain.Managers { /// /// 论坛模块的领域服务 /// - public class ForumManager:ITransient + public class ForumManager : DomainService { - private readonly IRepository _discussRepository; - private readonly IRepository _plateEntityRepository; - private readonly IRepository _commentRepository; - public ForumManager(IRepository discussRepository, IRepository plateEntityRepository, IRepository commentRepository) + public readonly ISqlSugarRepository _discussRepository; + public readonly ISqlSugarRepository _plateEntityRepository; + public readonly ISqlSugarRepository _commentRepository; + public ForumManager(ISqlSugarRepository discussRepository, ISqlSugarRepository plateEntityRepository, ISqlSugarRepository commentRepository) { _discussRepository = discussRepository; _plateEntityRepository = plateEntityRepository; @@ -22,17 +22,15 @@ namespace Yi.Furion.Application.Bbs.Domain //主题是不能直接创建的,需要由领域服务统一创建 public async Task CreateDiscussAsync(DiscussEntity entity) { - entity.Id = SnowflakeHelper.NextId; entity.CreationTime = DateTime.Now; entity.AgreeNum = 0; entity.SeeNum = 0; return await _discussRepository.InsertReturnEntityAsync(entity); } - public async Task CreateCommentAsync(long discussId, long parentId, long rootId, string content) + public async Task CreateCommentAsync(Guid discussId, Guid parentId, Guid rootId, string content) { var entity = new CommentEntity(discussId); - entity.Id = SnowflakeHelper.NextId; entity.Content = content; entity.ParentId = parentId; entity.RootId = rootId; diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Repositories/IArticleRepository.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Repositories/IArticleRepository.cs new file mode 100644 index 00000000..6e974751 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Repositories/IArticleRepository.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Bbs.Domain.Repositories +{ + public interface IArticleRepository: ISqlSugarRepository + { + Task> GetTreeAsync(Expression> where); + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Yi.Framework.Bbs.Domain.csproj b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Yi.Framework.Bbs.Domain.csproj new file mode 100644 index 00000000..8feefd4e --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Yi.Framework.Bbs.Domain.csproj @@ -0,0 +1,14 @@ + + + + net7.0 + enable + enable + + + + + + + + diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Yi.Framework.Bbs.Domain.xml b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Yi.Framework.Bbs.Domain.xml new file mode 100644 index 00000000..fb073da9 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Yi.Framework.Bbs.Domain.xml @@ -0,0 +1,65 @@ + + + + Yi.Framework.Bbs.Domain + + + + + 主题id + + + + + 创建者 + + + + + 平铺自己 + + + + + + + 评论表 + + + + + 采用二维数组方式,不使用树形方式 + + + + + 被回复的CommentId + + + + + 用户,评论人用户信息 + + + + + 被评论的用户信息 + + + + + 封面 + + + + + 当PermissionType为部分用户时候,以下列表中的用户+创建者 代表拥有权限 + + + + + 论坛模块的领域服务 + + + + diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/YiFrameworkBbsDomainModule.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/YiFrameworkBbsDomainModule.cs new file mode 100644 index 00000000..8696c1e4 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/YiFrameworkBbsDomainModule.cs @@ -0,0 +1,16 @@ +using Volo.Abp.Modularity; +using Yi.Framework.Bbs.Domain.Shared; +using Yi.Framework.Rbac.Domain; + +namespace Yi.Framework.Bbs.Domain +{ + [DependsOn( + typeof(YiFrameworkBbsDomainSharedModule), + + typeof(YiFrameworkRbacDomainModule) + )] + public class YiFrameworkBbsDomainModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/Repositories/ArticleRepository.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/Repositories/ArticleRepository.cs new file mode 100644 index 00000000..7ba47774 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/Repositories/ArticleRepository.cs @@ -0,0 +1,21 @@ +using System.Linq.Expressions; +using Volo.Abp.DependencyInjection; +using Yi.Framework.Bbs.Domain.Entities; +using Yi.Framework.Bbs.Domain.Repositories; +using Yi.Framework.SqlSugarCore.Abstractions; +using Yi.Framework.SqlSugarCore.Repositories; + +namespace Yi.Framework.Bbs.SqlSugarCore.Repositories +{ + public class ArticleRepository : SqlSugarRepository, IArticleRepository,ITransientDependency + { + public ArticleRepository(ISugarDbContextProvider sugarDbContextProvider) : base(sugarDbContextProvider) + { + } + + public async Task> GetTreeAsync(Expression> where) + { + return await _DbQueryable.Where(where).ToTreeAsync(x => x.Children, x => x.ParentId, 0); + } + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/Yi.Framework.Bbs.SqlSugarCore.csproj b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/Yi.Framework.Bbs.SqlSugarCore.csproj new file mode 100644 index 00000000..1203d359 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/Yi.Framework.Bbs.SqlSugarCore.csproj @@ -0,0 +1,14 @@ + + + + net7.0 + enable + enable + + + + + + + + diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/Yi.Framework.Bbs.SqlSugarCore.xml b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/Yi.Framework.Bbs.SqlSugarCore.xml new file mode 100644 index 00000000..54c0be30 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/Yi.Framework.Bbs.SqlSugarCore.xml @@ -0,0 +1,8 @@ + + + + Yi.Framework.Bbs.SqlSugarCore + + + + diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/YiFrameworkBbsSqlSugarCoreModule.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/YiFrameworkBbsSqlSugarCoreModule.cs new file mode 100644 index 00000000..1c67372e --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.SqlSugarCore/YiFrameworkBbsSqlSugarCoreModule.cs @@ -0,0 +1,15 @@ +using Volo.Abp.Modularity; +using Yi.Framework.Bbs.Domain; +using Yi.Framework.Rbac.SqlSugarCore; + +namespace Yi.Framework.Bbs.SqlSugarCore +{ + [DependsOn( + typeof(YiFrameworkBbsDomainModule), + + typeof(YiFrameworkRbacSqlSugarCoreModule))] + public class YiFrameworkBbsSqlSugarCoreModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/CaptchaImageDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/CaptchaImageDto.cs new file mode 100644 index 00000000..26254018 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/CaptchaImageDto.cs @@ -0,0 +1,8 @@ +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account +{ + public class CaptchaImageDto + { + public Guid Uuid { get; set; } = Guid.Empty; + public byte[] Img { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/LoginInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/LoginInputVo.cs similarity index 60% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/LoginInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/LoginInputVo.cs index bd5c3d99..2675531c 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/LoginInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/LoginInputVo.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Account +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account { public class LoginInputVo { diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/PhoneCaptchaImageDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/PhoneCaptchaImageDto.cs new file mode 100644 index 00000000..331dcec3 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/PhoneCaptchaImageDto.cs @@ -0,0 +1,7 @@ +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account +{ + public class PhoneCaptchaImageDto + { + public string Phone { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/RegisterDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/RegisterDto.cs similarity index 80% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/RegisterDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/RegisterDto.cs index a9eef12d..40fa0561 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/RegisterDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/RegisterDto.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Account +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account { public class RegisterDto { diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/RestPasswordDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/RestPasswordDto.cs new file mode 100644 index 00000000..427ad27e --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/RestPasswordDto.cs @@ -0,0 +1,7 @@ +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account +{ + public class RestPasswordDto + { + public string Password { get; set; } = string.Empty; + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/UpdateIconDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/UpdateIconDto.cs new file mode 100644 index 00000000..5342b7eb --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/UpdateIconDto.cs @@ -0,0 +1,7 @@ +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account +{ + public class UpdateIconDto + { + public string? Icon { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/UpdatePasswordDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/UpdatePasswordDto.cs similarity index 52% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/UpdatePasswordDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/UpdatePasswordDto.cs index 46e03bb4..b8738741 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/UpdatePasswordDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Account/UpdatePasswordDto.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Account +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account { public class UpdatePasswordDto { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigCreateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigCreateInputVo.cs similarity index 83% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigCreateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigCreateInputVo.cs index f90b943a..356ec498 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigCreateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigCreateInputVo.cs @@ -1,11 +1,11 @@ -namespace Yi.Furion.Core.Rbac.Dtos.Config +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Config { /// /// Config输入创建对象 /// public class ConfigCreateInputVo { - public long Id { get; set; } + public Guid Id { get; set; } public string ConfigName { get; set; } = string.Empty; public string ConfigKey { get; set; } = string.Empty; public string ConfigValue { get; set; } = string.Empty; diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigGetListInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigGetListInputVo.cs similarity index 73% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigGetListInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigGetListInputVo.cs index 5c98c99e..e31d1ff1 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigGetListInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigGetListInputVo.cs @@ -1,6 +1,7 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Yi.Framework.Ddd; +using Yi.Framework.Ddd.Application.Contracts; -namespace Yi.Furion.Core.Rbac.Dtos.Config +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Config { /// /// òѯ diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigGetListOutputDto.cs similarity index 81% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigGetListOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigGetListOutputDto.cs index a73cef0c..c91cf3ad 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigGetListOutputDto.cs @@ -1,10 +1,10 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Rbac.Dtos.Config +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Config { - public class ConfigGetListOutputDto : IEntityDto + public class ConfigGetListOutputDto : EntityDto { - public long Id { get; set; } + public Guid Id { get; set; } /// /// /// diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigGetOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigGetOutputDto.cs similarity index 67% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigGetOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigGetOutputDto.cs index b1b3eb91..6f693fd8 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigGetOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigGetOutputDto.cs @@ -1,10 +1,9 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Rbac.Dtos.Config +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Config { - public class ConfigGetOutputDto : IEntityDto + public class ConfigGetOutputDto : EntityDto { - public long Id { get; set; } public string ConfigName { get; set; } = string.Empty; public string ConfigKey { get; set; } = string.Empty; public string ConfigValue { get; set; } = string.Empty; diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigUpdateInputVo.cs similarity index 81% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigUpdateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigUpdateInputVo.cs index 23b18ac1..76abeb58 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Config/ConfigUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Config/ConfigUpdateInputVo.cs @@ -1,8 +1,8 @@ -namespace Yi.Furion.Core.Rbac.Dtos.Config +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Config { public class ConfigUpdateInputVo { - public long Id { get; set; } + public Guid Id { get; set; } public string ConfigName { get; set; } = string.Empty; public string ConfigKey { get; set; } = string.Empty; public string ConfigValue { get; set; } = string.Empty; diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptCreateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptCreateInputVo.cs similarity index 60% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptCreateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptCreateInputVo.cs index e1f684ff..0b3b6d7d 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptCreateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptCreateInputVo.cs @@ -1,24 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Dept +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dept { /// /// Dept输入创建对象 /// public class DeptCreateInputVo { - public long Id { get; set; } + public Guid Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public bool State { get; set; } public string DeptName { get; set; } = string.Empty; public string DeptCode { get; set; } = string.Empty; public string? Leader { get; set; } - public long ParentId { get; set; } + public Guid ParentId { get; set; } public string? Remark { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptGetListInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptGetListInputVo.cs similarity index 60% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptGetListInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptGetListInputVo.cs index 089fe2c3..fad20df8 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptGetListInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptGetListInputVo.cs @@ -1,10 +1,11 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Yi.Framework.Ddd; +using Yi.Framework.Ddd.Application.Contracts; -namespace Yi.Furion.Core.Rbac.Dtos.Dept +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dept { public class DeptGetListInputVo : PagedAllResultRequestDto { - public long Id { get; set; } + public Guid Id { get; set; } public bool? State { get; set; } public string? DeptName { get; set; } public string? DeptCode { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptGetListOutputDto.cs similarity index 56% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptGetListOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptGetListOutputDto.cs index 92eac656..522e1eed 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptGetListOutputDto.cs @@ -1,18 +1,16 @@ -using System; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Rbac.Dtos.Dept +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dept { - public class DeptGetListOutputDto : IEntityDto + public class DeptGetListOutputDto : EntityDto { - public long Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public bool State { get; set; } public string DeptName { get; set; } = string.Empty; public string DeptCode { get; set; } = string.Empty; public string? Leader { get; set; } - public long ParentId { get; set; } + public Guid ParentId { get; set; } public string? Remark { get; set; } public int OrderNum { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptGetOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptGetOutputDto.cs similarity index 53% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptGetOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptGetOutputDto.cs index 63c98736..d122e67c 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptGetOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptGetOutputDto.cs @@ -1,20 +1,19 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Rbac.Dtos.Dept +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dept { - public class DeptGetOutputDto : IEntityDto + public class DeptGetOutputDto : EntityDto { - public long Id { get; set; } public bool State { get; set; } public string DeptName { get; set; } = string.Empty; public string DeptCode { get; set; } = string.Empty; public string? Leader { get; set; } public string? Remark { get; set; } - public long? deptId { get; set; } + public Guid? deptId { get; set; } public int OrderNum { get; set; } - public long ParentId { get; set; } + public Guid ParentId { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptUpdateInputVo.cs similarity index 56% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptUpdateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptUpdateInputVo.cs index ed2e61df..8b5c9002 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Dept/DeptUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dept/DeptUpdateInputVo.cs @@ -1,21 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Dept +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dept { public class DeptUpdateInputVo { - public long Id { get; set; } + public Guid Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public bool State { get; set; } public string DeptName { get; set; } = string.Empty; public string DeptCode { get; set; } = string.Empty; public string? Leader { get; set; } - public long ParentId { get; set; } + public Guid ParentId { get; set; } public string? Remark { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryCreateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryCreateInputVo.cs similarity index 61% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryCreateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryCreateInputVo.cs index af4ffdb2..f4d9f21f 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryCreateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryCreateInputVo.cs @@ -1,19 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.DictionaryManager.Dtos.Dictionary +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary { /// /// Dictionary输入创建对象 /// public class DictionaryCreateInputVo { - public long Id { get; set; } - public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } public string? Remark { get; set; } public string? ListClass { get; set; } public string? CssClass { get; set; } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryGetListInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetListInputVo.cs similarity index 67% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryGetListInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetListInputVo.cs index bf0b2635..c099f0b8 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryGetListInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetListInputVo.cs @@ -1,6 +1,6 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Volo.Abp.Application.Dtos; -namespace Yi.Framework.Module.DictionaryManager.Dtos.Dictionary +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary { public class DictionaryGetListInputVo : PagedAndSortedResultRequestDto { diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetListOutputDto.cs similarity index 64% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryGetListOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetListOutputDto.cs index e8144abf..a9479a82 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetListOutputDto.cs @@ -1,12 +1,11 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Framework.Module.DictionaryManager.Dtos.Dictionary +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary { - public class DictionaryGetListOutputDto : IEntityDto + public class DictionaryGetListOutputDto : EntityDto { - public long Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public string? Remark { get; set; } public string? ListClass { get; set; } public string? CssClass { get; set; } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryGetOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetOutputDto.cs similarity index 64% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryGetOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetOutputDto.cs index 0cebc834..4171e9f3 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryGetOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetOutputDto.cs @@ -1,12 +1,11 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Framework.Module.DictionaryManager.Dtos.Dictionary +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary { - public class DictionaryGetOutputDto : IEntityDto + public class DictionaryGetOutputDto : EntityDto { - public long Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public string? Remark { get; set; } public string? ListClass { get; set; } public string? CssClass { get; set; } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryUpdateInputVo.cs similarity index 57% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryUpdateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryUpdateInputVo.cs index 0a70fd25..8c98c57b 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/Dictionary/DictionaryUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryUpdateInputVo.cs @@ -1,16 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.DictionaryManager.Dtos.Dictionary +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary { public class DictionaryUpdateInputVo { - public long Id { get; set; } - public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } public string? Remark { get; set; } public string? ListClass { get; set; } public string? CssClass { get; set; } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeCreateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeCreateInputVo.cs similarity index 50% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeCreateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeCreateInputVo.cs index f46000e4..2d350c32 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeCreateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeCreateInputVo.cs @@ -1,19 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.DictionaryManager.Dtos.DictionaryType +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType { /// /// DictionaryType输入创建对象 /// public class DictionaryTypeCreateInputVo { - public long Id { get; set; } - public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } public string DictName { get; set; } = string.Empty; public string DictType { get; set; } = string.Empty; public string? Remark { get; set; } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeGetListInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeGetListInputVo.cs similarity index 69% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeGetListInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeGetListInputVo.cs index bb656301..4ccfe80f 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeGetListInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeGetListInputVo.cs @@ -1,6 +1,6 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Yi.Framework.Ddd.Application.Contracts; -namespace Yi.Framework.Module.DictionaryManager.Dtos.DictionaryType +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType { public class DictionaryTypeGetListInputVo : PagedAllResultRequestDto { diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeGetOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeGetListOutputDto.cs similarity index 52% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeGetOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeGetListOutputDto.cs index 693342f6..60d7c738 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeGetOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeGetListOutputDto.cs @@ -1,12 +1,11 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Framework.Module.DictionaryManager.Dtos.DictionaryType +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType { - public class DictionaryTypeGetOutputDto : IEntityDto + public class DictionaryTypeGetListOutputDto : EntityDto { - public long Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public string DictName { get; set; } = string.Empty; public string DictType { get; set; } = string.Empty; public string? Remark { get; set; } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeGetOutputDto.cs similarity index 57% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeUpdateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeGetOutputDto.cs index 7470ef57..c54141db 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeGetOutputDto.cs @@ -1,13 +1,15 @@ -namespace Yi.Framework.Module.DictionaryManager.Dtos.DictionaryType +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType { - public class DictionaryTypeUpdateInputVo + public class DictionaryTypeGetOutputDto : EntityDto { - public long Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public string DictName { get; set; } = string.Empty; public string DictType { get; set; } = string.Empty; public string? Remark { get; set; } + public bool State { get; set; } } } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeUpdateInputVo.cs new file mode 100644 index 00000000..8ccce28d --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/DictionaryType/DictionaryTypeUpdateInputVo.cs @@ -0,0 +1,10 @@ +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType +{ + public class DictionaryTypeUpdateInputVo + { + public string DictName { get; set; } = string.Empty; + public string DictType { get; set; } = string.Empty; + public string? Remark { get; set; } + public bool State { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/LoginLog/LoginLogGetListInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/LoginLog/LoginLogGetListInputVo.cs similarity index 56% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/LoginLog/LoginLogGetListInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/LoginLog/LoginLogGetListInputVo.cs index 8f12bfe1..315fb34d 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/LoginLog/LoginLogGetListInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/LoginLog/LoginLogGetListInputVo.cs @@ -1,6 +1,7 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Yi.Framework.Ddd; +using Yi.Framework.Ddd.Application.Contracts; -namespace Yi.Furion.Core.Rbac.Dtos.LoginLog +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.LoginLog { public class LoginLogGetListInputVo : PagedAllResultRequestDto { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/LoginLog/LoginLogGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/LoginLog/LoginLogGetListOutputDto.cs similarity index 75% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/LoginLog/LoginLogGetListOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/LoginLog/LoginLogGetListOutputDto.cs index b0148404..d5ddb75f 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/LoginLog/LoginLogGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/LoginLog/LoginLogGetListOutputDto.cs @@ -1,8 +1,8 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Rbac.Dtos.LoginLog +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.LoginLog { - public class LoginLogGetListOutputDto : EntityDto + public class LoginLogGetListOutputDto : EntityDto { public DateTime CreationTime { get; set; } @@ -26,6 +26,6 @@ namespace Yi.Furion.Core.Rbac.Dtos.LoginLog /// public string? LogMsg { get; set; } - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuCreateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuCreateInputVo.cs similarity index 77% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuCreateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuCreateInputVo.cs index f29df7f1..823f2710 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuCreateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuCreateInputVo.cs @@ -1,21 +1,20 @@ -using System; -using Yi.Furion.Core.Rbac.Enums; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.Menu +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu { /// /// Menu输入创建对象 /// public class MenuCreateInputVo { - public long Id { get; set; } + public Guid Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public bool State { get; set; } public string MenuName { get; set; } = string.Empty; public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu; public string? PermissionCode { get; set; } - public long ParentId { get; set; } + public Guid ParentId { get; set; } public string? MenuIcon { get; set; } public string? Router { get; set; } public bool IsLink { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuGetListInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuGetListInputVo.cs similarity index 65% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuGetListInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuGetListInputVo.cs index e5d3bf91..376aefa7 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuGetListInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuGetListInputVo.cs @@ -1,6 +1,6 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Rbac.Dtos.Menu +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu { public class MenuGetListInputVo : PagedAndSortedResultRequestDto { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuGetListOutputDto.cs similarity index 73% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuUpdateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuGetListOutputDto.cs index 52271add..a97c34af 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuGetListOutputDto.cs @@ -1,18 +1,17 @@ -using System; -using Yi.Furion.Core.Rbac.Enums; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.Menu +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu { - public class MenuUpdateInputVo + public class MenuGetListOutputDto : EntityDto { - public long Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public bool State { get; set; } public string MenuName { get; set; } = string.Empty; public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu; public string? PermissionCode { get; set; } - public long ParentId { get; set; } + public Guid ParentId { get; set; } public string? MenuIcon { get; set; } public string? Router { get; set; } public bool IsLink { get; set; } @@ -21,8 +20,8 @@ namespace Yi.Furion.Core.Rbac.Dtos.Menu public string? Remark { get; set; } public string? Component { get; set; } public string? Query { get; set; } - public int OrderNum { get; set; } + public int OrderNum { get; set; } //public List? Children { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuGetOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuGetOutputDto.cs similarity index 70% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuGetOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuGetOutputDto.cs index 89973aaa..764bdeda 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuGetOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuGetOutputDto.cs @@ -1,19 +1,18 @@ -using System; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Furion.Core.Rbac.Enums; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.Menu +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu { - public class MenuGetOutputDto : IEntityDto + public class MenuGetOutputDto : EntityDto { - public long Id { get; set; } + public Guid Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public bool State { get; set; } public string MenuName { get; set; } = string.Empty; public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu; public string? PermissionCode { get; set; } - public long ParentId { get; set; } + public Guid ParentId { get; set; } public string? MenuIcon { get; set; } public string? Router { get; set; } public bool IsLink { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuUpdateInputVo.cs similarity index 64% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuGetListOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuUpdateInputVo.cs index 7de6c8bc..70bf6c29 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Menu/MenuGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Menu/MenuUpdateInputVo.cs @@ -1,19 +1,16 @@ -using System; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Furion.Core.Rbac.Enums; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.Menu +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu { - public class MenuGetListOutputDto : IEntityDto + public class MenuUpdateInputVo { - public long Id { get; set; } - public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid Id { get; set; } + public Guid? CreatorId { get; set; } public bool State { get; set; } public string MenuName { get; set; } = string.Empty; public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu; public string? PermissionCode { get; set; } - public long ParentId { get; set; } + public Guid ParentId { get; set; } public string? MenuIcon { get; set; } public string? Router { get; set; } public bool IsLink { get; set; } @@ -22,8 +19,8 @@ namespace Yi.Furion.Core.Rbac.Dtos.Menu public string? Remark { get; set; } public string? Component { get; set; } public string? Query { get; set; } - public int OrderNum { get; set; } + //public List? Children { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/MonitorCache/MonitorCacheGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/MonitorCache/MonitorCacheGetListOutputDto.cs similarity index 59% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/MonitorCache/MonitorCacheGetListOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/MonitorCache/MonitorCacheGetListOutputDto.cs index 3f1fcd5f..7b3c368a 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/MonitorCache/MonitorCacheGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/MonitorCache/MonitorCacheGetListOutputDto.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.MonitorCache +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.MonitorCache { public class MonitorCacheGetListOutputDto { diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/MonitorCache/MonitorCacheNameGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/MonitorCache/MonitorCacheNameGetListOutputDto.cs new file mode 100644 index 00000000..974ad4dd --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/MonitorCache/MonitorCacheNameGetListOutputDto.cs @@ -0,0 +1,8 @@ +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.MonitorCache +{ + public class MonitorCacheNameGetListOutputDto + { + public string CacheName { get; set; } + public string? Remark { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogGetListInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/OperLog/OperationLogGetListInputVo.cs similarity index 53% rename from Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogGetListInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/OperLog/OperationLogGetListInputVo.cs index e290d334..b2cb5f76 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogGetListInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/OperLog/OperationLogGetListInputVo.cs @@ -1,6 +1,7 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Domain.Shared.OperLog; -namespace Yi.Framework.Module.OperLogManager +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.OperLog { public class OperationLogGetListInputVo : PagedAllResultRequestDto { diff --git a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/OperLog/OperationLogGetListOutputDto.cs similarity index 70% rename from Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogGetListOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/OperLog/OperationLogGetListOutputDto.cs index 69cbf559..2d904107 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/OperLog/OperationLogGetListOutputDto.cs @@ -1,10 +1,10 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Rbac.Domain.Shared.OperLog; -namespace Yi.Framework.Module.OperLogManager +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.OperLog { - public class OperationLogGetListOutputDto : IEntityDto + public class OperationLogGetListOutputDto : EntityDto { - public long Id { get; set; } public string? Title { get; set; } public OperEnum OperType { get; set; } public string? RequestMethod { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostCreateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostCreateInputVo.cs similarity index 62% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostCreateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostCreateInputVo.cs index 23bcf11d..2d50b107 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostCreateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostCreateInputVo.cs @@ -1,20 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Post +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post { /// /// Post输入创建对象 /// public class PostCreateInputVo { - public long Id { get; set; } + public Guid Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; public long? CreatorId { get; set; } - public bool State { get; set; } + public Guid State { get; set; } public string PostCode { get; set; } = string.Empty; public string PostName { get; set; } = string.Empty; public string? Remark { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostGetListInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostGetListInputVo.cs similarity index 72% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostGetListInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostGetListInputVo.cs index 022569d0..903b96a6 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostGetListInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostGetListInputVo.cs @@ -1,6 +1,6 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Rbac.Dtos.Post +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post { public class PostGetListInputVo : PagedAndSortedResultRequestDto { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostGetListOutputDto.cs similarity index 64% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostGetListOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostGetListOutputDto.cs index bbe01fab..1fb81996 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostGetListOutputDto.cs @@ -1,10 +1,9 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Rbac.Dtos.Post +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post { - public class PostGetListOutputDto : IEntityDto + public class PostGetListOutputDto : EntityDto { - public long Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; public bool State { get; set; } public string PostCode { get; set; } = string.Empty; diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostGetOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostGetOutputDto.cs similarity index 57% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostGetOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostGetOutputDto.cs index 2ac195f0..87e2e53b 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostGetOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostGetOutputDto.cs @@ -1,13 +1,11 @@ -using System; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; +using Volo.Abp.Application.Dtos; -namespace Yi.Furion.Core.Rbac.Dtos.Post +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post { - public class PostGetOutputDto : IEntityDto + public class PostGetOutputDto : EntityDto { - public long Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public bool State { get; set; } public string PostCode { get; set; } = string.Empty; public string PostName { get; set; } = string.Empty; diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostUpdateInputVo.cs similarity index 69% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostUpdateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostUpdateInputVo.cs index 97460faa..d789ba0f 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Post/PostUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Post/PostUpdateInputVo.cs @@ -1,12 +1,10 @@ -using System; - -namespace Yi.Furion.Core.Rbac.Dtos.Post +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post { public class PostUpdateInputVo { - public long Id { get; set; } + public Guid Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public bool State { get; set; } public string PostCode { get; set; } = string.Empty; public string PostName { get; set; } = string.Empty; diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleAuthUserCreateOrDeleteInput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleAuthUserCreateOrDeleteInput.cs new file mode 100644 index 00000000..dc895742 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleAuthUserCreateOrDeleteInput.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role +{ + public class RoleAuthUserCreateOrDeleteInput + { + [Required] + public Guid RoleId { get; set; } + + [Required] + public List UserIds { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleAuthUserGetListInput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleAuthUserGetListInput.cs new file mode 100644 index 00000000..d45bf9ac --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleAuthUserGetListInput.cs @@ -0,0 +1,11 @@ +using Volo.Abp.Application.Dtos; + +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role +{ + public class RoleAuthUserGetListInput : PagedAndSortedResultRequestDto + { + public string? UserName { get; set; } + + public long? Phone { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleCreateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleCreateInputVo.cs similarity index 67% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleCreateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleCreateInputVo.cs index 90ce4b6f..42aebb71 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleCreateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleCreateInputVo.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; -using Yi.Furion.Core.Rbac.Enums; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.Role +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role { /// /// Role输入创建对象 @@ -16,8 +15,8 @@ namespace Yi.Furion.Core.Rbac.Dtos.Role public int OrderNum { get; set; } - public List DeptIds { get; set; } + public List DeptIds { get; set; } - public List MenuIds { get; set; } + public List MenuIds { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleGetListInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetListInputVo.cs similarity index 62% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleGetListInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetListInputVo.cs index 0d441b44..3ace0238 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleGetListInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetListInputVo.cs @@ -1,6 +1,7 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Yi.Framework.Ddd; +using Yi.Framework.Ddd.Application.Contracts; -namespace Yi.Furion.Core.Rbac.Dtos.Role +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role { public class RoleGetListInputVo : PagedAllResultRequestDto { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetListOutputDto.cs similarity index 58% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleGetListOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetListOutputDto.cs index 20f83fd5..ec632a86 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetListOutputDto.cs @@ -1,13 +1,12 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Furion.Core.Rbac.Enums; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.Role +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role { - public class RoleGetListOutputDto : IEntityDto + public class RoleGetListOutputDto : EntityDto { - public long Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public string? RoleName { get; set; } public string? RoleCode { get; set; } public string? Remark { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleGetOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetOutputDto.cs similarity index 59% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleGetOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetOutputDto.cs index 30c165d9..923af325 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleGetOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetOutputDto.cs @@ -1,13 +1,12 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Furion.Core.Rbac.Enums; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.Role +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role { - public class RoleGetOutputDto : IEntityDto + public class RoleGetOutputDto : EntityDto { - public long Id { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public string? RoleName { get; set; } public string? RoleCode { get; set; } public string? Remark { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleUpdateInputVo.cs similarity index 63% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleUpdateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleUpdateInputVo.cs index 6fb8a8b0..c7ca6040 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleUpdateInputVo.cs @@ -1,6 +1,6 @@ -using Yi.Furion.Core.Rbac.Enums; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.Role +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role { public class RoleUpdateInputVo { @@ -12,8 +12,8 @@ namespace Yi.Furion.Core.Rbac.Dtos.Role public int OrderNum { get; set; } - public List DeptIds { get; set; } + public List? DeptIds { get; set; } - public List MenuIds { get; set; } + public List? MenuIds { get; set; } } } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/UpdateDataScpoceInput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/UpdateDataScpoceInput.cs new file mode 100644 index 00000000..4ef0c9c1 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/UpdateDataScpoceInput.cs @@ -0,0 +1,13 @@ +using Yi.Framework.Rbac.Domain.Shared.Enums; + +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role +{ + public class UpdateDataScpoceInput + { + public Guid RoleId { get; set; } + + public List? DeptIds { get; set; } + + public DataScopeEnum DataScope { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskCreateInput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskCreateInput.cs similarity index 73% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskCreateInput.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskCreateInput.cs index 63ac23dc..36023b4f 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskCreateInput.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskCreateInput.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Furion.Core.Rbac.Enums; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.Task +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Task { public class TaskCreateInput { diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskGetListInput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskGetListInput.cs new file mode 100644 index 00000000..799db9d7 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskGetListInput.cs @@ -0,0 +1,10 @@ +using Yi.Framework.Ddd.Application.Contracts; + +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Task +{ + public class TaskGetListInput : PagedAllResultRequestDto + { + public string JobId { get; set; } + public string GroupName { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskGetListOutput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskGetListOutput.cs similarity index 91% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskGetListOutput.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskGetListOutput.cs index f8305159..518e6df2 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskGetListOutput.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskGetListOutput.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json.Serialization; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Task +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Task { public class TaskGetListOutput { @@ -18,7 +11,7 @@ namespace Yi.Furion.Core.Rbac.Dtos.Task /// /// 作业组名称 /// - + public string GroupName { get; internal set; } /// diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskGetOutput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskGetOutput.cs similarity index 93% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskGetOutput.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskGetOutput.cs index 97ce54c3..824e3e7b 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskGetOutput.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskGetOutput.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Task +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Task { public class TaskGetOutput { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskUpdateInput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskUpdateInput.cs similarity index 61% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskUpdateInput.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskUpdateInput.cs index 9803bf4b..9ebfe125 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskUpdateInput.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Task/TaskUpdateInput.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Furion.Core.Rbac.Enums; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.Task +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Task { public class TaskUpdateInput { @@ -23,7 +18,7 @@ namespace Yi.Furion.Core.Rbac.Dtos.Task public bool Concurrent { get; set; } - // public Dictionary? Properties { get; set; } + // public Dictionary? Properties { get; set; } public string? Description { get; set; } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/ProfileUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/ProfileUpdateInputVo.cs similarity index 80% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/ProfileUpdateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/ProfileUpdateInputVo.cs index 7768e596..f67e9d62 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/ProfileUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/ProfileUpdateInputVo.cs @@ -1,6 +1,6 @@ -using Yi.Furion.Core.Rbac.Enums; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.User +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User { public class ProfileUpdateInputVo { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserCreateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserCreateInputVo.cs similarity index 74% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserCreateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserCreateInputVo.cs index 3325a2ef..96b95d8e 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserCreateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserCreateInputVo.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; -using Yi.Furion.Core.Rbac.Enums; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.User +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User { /// /// User输入创建对象 @@ -20,9 +19,9 @@ namespace Yi.Furion.Core.Rbac.Dtos.User public string? Introduction { get; set; } public string? Remark { get; set; } public SexEnum Sex { get; set; } = SexEnum.Unknown; - public List? RoleIds { get; set; } - public List? PostIds { get; set; } - public long? DeptId { get; set; } + public List? RoleIds { get; set; } + public List? PostIds { get; set; } + public Guid? DeptId { get; set; } public bool State { get; set; } = true; } - } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserGetListInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserGetListInputVo.cs similarity index 63% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserGetListInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserGetListInputVo.cs index 8a73f56c..7c320f83 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserGetListInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserGetListInputVo.cs @@ -1,6 +1,7 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; +using Yi.Framework.Ddd; +using Yi.Framework.Ddd.Application.Contracts; -namespace Yi.Furion.Core.Rbac.Dtos.User +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User { public class UserGetListInputVo : PagedAllResultRequestDto { @@ -10,7 +11,7 @@ namespace Yi.Furion.Core.Rbac.Dtos.User public bool? State { get; set; } - public long? DeptId { get; set; } + public Guid? DeptId { get; set; } public string? Ids { get; set; } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserGetListOutputDto.cs similarity index 70% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserGetListOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserGetListOutputDto.cs index 63cb59ee..504476db 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserGetListOutputDto.cs @@ -1,11 +1,10 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Furion.Core.Rbac.Enums; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.User +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User { - public class UserGetListOutputDto : IEntityDto + public class UserGetListOutputDto : EntityDto { - public long Id { get; set; } public string? Name { get; set; } public int? Age { get; set; } public string UserName { get; set; } = string.Empty; @@ -18,9 +17,9 @@ namespace Yi.Furion.Core.Rbac.Dtos.User public string? Introduction { get; set; } public string? Remark { get; set; } public SexEnum Sex { get; set; } = SexEnum.Unknown; - public long? DeptId { get; set; } + public Guid? DeptId { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } public bool State { get; set; } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserGetOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserGetOutputDto.cs similarity index 53% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserGetOutputDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserGetOutputDto.cs index 8930fe43..d0e55186 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserGetOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserGetOutputDto.cs @@ -1,14 +1,13 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Furion.Core.Rbac.Dtos.Dept; -using Yi.Furion.Core.Rbac.Dtos.Post; -using Yi.Furion.Core.Rbac.Dtos.Role; -using Yi.Furion.Core.Rbac.Enums; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Dept; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Post; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Role; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.User +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User { - public class UserGetOutputDto : IEntityDto + public class UserGetOutputDto : EntityDto { - public long Id { get; set; } public string? Name { get; set; } public int? Age { get; set; } public string UserName { get; set; } = string.Empty; @@ -24,12 +23,12 @@ namespace Yi.Furion.Core.Rbac.Dtos.User public bool State { get; set; } public DateTime CreationTime { get; set; } - public long DeptId { get; set; } + public Guid? DeptId { get; set; } - public DeptGetOutputDto Dept { get; set; } + public DeptGetOutputDto? Dept { get; set; } - public List Posts { get; set; } + public List? Posts { get; set; } - public List Roles { get; set; } + public List? Roles { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserUpdateInputVo.cs similarity index 67% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserUpdateInputVo.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserUpdateInputVo.cs index 312e9100..ae6b6826 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/User/UserUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/User/UserUpdateInputVo.cs @@ -1,6 +1,7 @@ -using Yi.Furion.Core.Rbac.Enums; +using Mapster; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Dtos.User +namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User { public class UserUpdateInputVo { @@ -8,6 +9,9 @@ namespace Yi.Furion.Core.Rbac.Dtos.User public int? Age { get; set; } public string? UserName { get; set; } + /// + /// óԱ + /// [AdaptIgnore] public string? Password { get; set; } public string? Icon { get; set; } @@ -19,10 +23,10 @@ namespace Yi.Furion.Core.Rbac.Dtos.User public string? Introduction { get; set; } public string? Remark { get; set; } public SexEnum? Sex { get; set; } - public long? DeptId { get; set; } - public List? PostIds { get; set; } + public Guid? DeptId { get; set; } + public List? PostIds { get; set; } - public List? RoleIds { get; set; } + public List? RoleIds { get; set; } public bool? State { get; set; } } } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IAccountService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IAccountService.cs new file mode 100644 index 00000000..ad1f80a7 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IAccountService.cs @@ -0,0 +1,6 @@ +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + public interface IAccountService + { + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IConfigService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IConfigService.cs new file mode 100644 index 00000000..6f49058a --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IConfigService.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Application.Services; +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Config; + +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + /// + /// Config服务抽象 + /// + public interface IConfigService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IDeptService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IDeptService.cs new file mode 100644 index 00000000..ced23b9f --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IDeptService.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Application.Services; +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Dept; + +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + /// + /// Dept服务抽象 + /// + public interface IDeptService : IYiCrudAppService + { + Task> GetChildListAsync(Guid deptId); + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IDictionaryService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IDictionaryService.cs new file mode 100644 index 00000000..f2fc25cb --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IDictionaryService.cs @@ -0,0 +1,13 @@ +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary; + +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + /// + /// Dictionary服务抽象 + /// + public interface IDictionaryService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IDictionaryTypeService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IDictionaryTypeService.cs new file mode 100644 index 00000000..581584cb --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IDictionaryTypeService.cs @@ -0,0 +1,13 @@ +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType; + +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + /// + /// DictionaryType服务抽象 + /// + public interface IDictionaryTypeService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IMenuService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IMenuService.cs new file mode 100644 index 00000000..26980101 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IMenuService.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Application.Services; +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Menu; + +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + /// + /// Menu服务抽象 + /// + public interface IMenuService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IMonitorCacheService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IMonitorCacheService.cs new file mode 100644 index 00000000..05ffb60b --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IMonitorCacheService.cs @@ -0,0 +1,6 @@ +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + public interface IMonitorCacheService + { + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IMonitorServerService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IMonitorServerService.cs new file mode 100644 index 00000000..1b33d1a6 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IMonitorServerService.cs @@ -0,0 +1,6 @@ +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + public interface IMonitorServerService + { + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IOnlineService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IOnlineService.cs new file mode 100644 index 00000000..3a0a0202 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IOnlineService.cs @@ -0,0 +1,6 @@ +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + public interface IOnlineService + { + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IOperationLogService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IOperationLogService.cs new file mode 100644 index 00000000..cad5f7bc --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IOperationLogService.cs @@ -0,0 +1,13 @@ +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Application.Contracts.Dtos.OperLog; + +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + /// + /// OperationLog服务抽象 + /// + public interface IOperationLogService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IPostService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IPostService.cs new file mode 100644 index 00000000..a2851068 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IPostService.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Application.Services; +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Post; + +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + /// + /// Post服务抽象 + /// + public interface IPostService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IRoleService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IRoleService.cs new file mode 100644 index 00000000..ac94d752 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IRoleService.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Application.Services; +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Role; + +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + /// + /// Role服务抽象 + /// + public interface IRoleService : IYiCrudAppService + { + + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/ITaskService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/ITaskService.cs new file mode 100644 index 00000000..027eac90 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/ITaskService.cs @@ -0,0 +1,6 @@ +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + public interface ITaskService + { + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IUserService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IUserService.cs new file mode 100644 index 00000000..343765e4 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/IUserService.cs @@ -0,0 +1,12 @@ +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Application.Contracts.Dtos.User; + +namespace Yi.Framework.Rbac.Application.Contracts.IServices +{ + /// + /// User服务抽象 + /// + public interface IUserService : IYiCrudAppService + { + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Yi.Framework.Rbac.Application.Contracts.csproj b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Yi.Framework.Rbac.Application.Contracts.csproj new file mode 100644 index 00000000..d4287acf --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Yi.Framework.Rbac.Application.Contracts.csproj @@ -0,0 +1,13 @@ + + + + net7.0 + enable + enable + + + + + + + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Yi.Framework.Rbac.Application.Contracts.xml b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Yi.Framework.Rbac.Application.Contracts.xml new file mode 100644 index 00000000..023974f8 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Yi.Framework.Rbac.Application.Contracts.xml @@ -0,0 +1,326 @@ + + + + Yi.Framework.Rbac.Application.Contracts + + + + + 账号 + + + + + 密码 + + + + + 唯一标识码 + + + + + 电话 + + + + + 验证码 + + + + + Config输入创建对象 + + + + + 配置查询参数 + + + + + 配置名称 + + + + + 配置键 + + + + + 配置名称 + + + + + 配置主键 + + + + + 配置值 + + + + + 配置类型 + + + + + 排序字段 + + + + + 备注 + + + + + 创建时间 + + + + + Dept输入创建对象 + + + + + DictionaryType输入创建对象 + + + + + Dictionary输入创建对象 + + + + + 登录Ip + + + + + 浏览器 + + + + + 操作系统 + + + + + 登录信息 + + + + + Menu输入创建对象 + + + + + Post输入创建对象 + + + + + Role输入创建对象 + + + + + 作业 Id + + + + + 作业组名称 + + + + + 作业处理程序类型 + + 存储的是类型的 FullName + + + + 作业处理程序类型所在程序集 + + 存储的是程序集 Name + + + + 描述信息 + + + + + 是否采用并行执行 + + 如果设置为 false,那么使用串行执行 + + + + 是否扫描 IJob 实现类 [Trigger] 特性触发器 + + + + + 作业信息额外数据 + + + + + 作业更新时间 + + + + + 标记其他作业正在执行 + + 为 false 时有效,也就是串行执行 + + + + 作业处理程序运行时类型 + + + + + 作业信息额外数据运行时实例 + + + + + 触发器参数 + + + + + 作业 Id + + + + + 作业组名称 + + + + + 作业处理程序类型 + + 存储的是类型的 FullName + + + + 作业处理程序类型所在程序集 + + 存储的是程序集 Name + + + + 描述信息 + + + + + 是否采用并行执行 + + 如果设置为 false,那么使用串行执行 + + + + 是否扫描 IJob 实现类 [Trigger] 特性触发器 + + + + + 作业信息额外数据 + + + + + 作业更新时间 + + + + + 标记其他作业正在执行 + + 为 false 时有效,也就是串行执行 + + + + 作业处理程序运行时类型 + + + + + 作业信息额外数据运行时实例 + + + + + User输入创建对象 + + + + + 该成员需忽略 + + + + + Config服务抽象 + + + + + Dept服务抽象 + + + + + Dictionary服务抽象 + + + + + DictionaryType服务抽象 + + + + + Menu服务抽象 + + + + + OperationLog服务抽象 + + + + + Post服务抽象 + + + + + Role服务抽象 + + + + + User服务抽象 + + + + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/YiFrameworkRbacApplicationContractsModule.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/YiFrameworkRbacApplicationContractsModule.cs new file mode 100644 index 00000000..2294590b --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/YiFrameworkRbacApplicationContractsModule.cs @@ -0,0 +1,16 @@ +using Volo.Abp.Modularity; +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Domain.Shared; + +namespace Yi.Framework.Rbac.Application.Contracts +{ + [DependsOn( + typeof(YiFrameworkRbacDomainSharedModule), + + + typeof(YiFrameworkDddApplicationContractsModule))] + public class YiFrameworkRbacApplicationContractsModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Events/LoginEventHandler.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Events/LoginEventHandler.cs new file mode 100644 index 00000000..d735c65c --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Events/LoginEventHandler.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Mapster; +using Microsoft.Extensions.Logging; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.EventBus; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Shared.Etos; + +namespace Yi.Framework.Rbac.Application.Events +{ + public class LoginEventHandler : ILocalEventHandler, + ITransientDependency + { + private readonly ILogger _logger; + private readonly IRepository _loginLogRepository; + public LoginEventHandler(ILogger logger, IRepository loginLogRepository) { _logger = logger; _loginLogRepository = loginLogRepository; } + public Task HandleEventAsync(LoginEventArgs eventData) + { + _logger.LogInformation($"用户【{eventData.UserId}:{eventData.UserName}】登入系统"); + var loginLogEntity = eventData.Adapt(); + loginLogEntity.LogMsg = eventData.UserName + "登录系统"; + loginLogEntity.LoginUser = eventData.UserName; + loginLogEntity.CreatorId = eventData.UserId; + //异步插入 + _loginLogRepository.InsertAsync(loginLogEntity); + return Task.CompletedTask; + } + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Jobs/TestJob.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Jobs/TestJob.cs new file mode 100644 index 00000000..f69659fc --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Jobs/TestJob.cs @@ -0,0 +1,19 @@ +using Quartz; +using Volo.Abp.BackgroundWorkers.Quartz; + +namespace Yi.Framework.Rbac.Application.Jobs +{ + public class TestJob : QuartzBackgroundWorkerBase + { + public TestJob() + { + JobDetail = JobBuilder.Create().WithIdentity(nameof(TestJob)).Build(); + Trigger = TriggerBuilder.Create().WithIdentity(nameof(TestJob)).WithCronSchedule("* * * * * ? *").Build(); + } + public override Task Execute(IJobExecutionContext context) + { + Console.WriteLine("你好,世界"); + return Task.CompletedTask; + } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/AccountService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs similarity index 53% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/AccountService.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs index 9951bfaf..2ab74c3d 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/AccountService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs @@ -1,89 +1,89 @@ -using System.Text.RegularExpressions; -using Furion.EventBus; -using IPTools.Core; +using System.IdentityModel.Tokens.Jwt; +using System.Security.Claims; +using System.Text; +using System.Text.RegularExpressions; +using Lazy.Captcha.Core; +using Mapster; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Caching.Memory; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Caching.Distributed; using Microsoft.Extensions.Options; +using Microsoft.IdentityModel.Tokens; using SqlSugar; -using UAParser; -using Yi.Framework.Infrastructure.AspNetCore; -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Infrastructure.Exceptions; -using Yi.Framework.Module.ImageSharp.HeiCaptcha; -using Yi.Framework.Module.Sms.Aliyun; -using Yi.Furion.Application.Rbac.Domain; -using Yi.Furion.Core.Rbac.Consts; -using Yi.Furion.Core.Rbac.Dtos; -using Yi.Furion.Core.Rbac.Dtos.Account; -using Yi.Furion.Core.Rbac.Entities; -using Yi.Furion.Core.Rbac.Etos; -using Yi.Furion.Sqlsugar.Core.Repositories; +using Volo.Abp; +using Volo.Abp.Application.Services; +using Volo.Abp.Authorization; +using Volo.Abp.Caching; +using Volo.Abp.EventBus.Local; +using Volo.Abp.Guids; +using Volo.Abp.Uow; +using Volo.Abp.Users; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Account; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Managers; +using Yi.Framework.Rbac.Domain.Repositories; +using Yi.Framework.Rbac.Domain.Shared.Caches; +using Yi.Framework.Rbac.Domain.Shared.Consts; +using Yi.Framework.Rbac.Domain.Shared.Dtos; +using Yi.Framework.Rbac.Domain.Shared.Etos; +using Yi.Framework.Rbac.Domain.Shared.Options; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Rbac.Services.Impl +namespace Yi.Framework.Rbac.Application.Services { - [ApiDescriptionSettings("RBAC")] - public class AccountService : ApplicationService, IAccountService, ITransient, IDynamicApiController + + public class AccountService : ApplicationService, IAccountService { - - public AccountService(IUserRepository userRepository, ICurrentUser currentUser, AccountManager accountManager, IRepository menuRepository, SmsAliyunManager smsAliyunManager, IOptions smsAliyunManagerOptions, SecurityCodeHelper securityCode, IMemoryCache memoryCache, IEventPublisher eventPublisher, IHttpContextAccessor httpContextAccessor) => - (_userRepository, _currentUser, _accountManager, _menuRepository, _smsAliyunManager, _smsAliyunManagerOptions, _securityCode, _memoryCache, _eventPublisher, _httpContextAccessor) = - (userRepository, currentUser, accountManager, menuRepository, smsAliyunManager, smsAliyunManagerOptions, securityCode, memoryCache, eventPublisher, httpContextAccessor); + private readonly ILocalEventBus _localEventBus; + private readonly JwtOptions _jwtOptions; + private IDistributedCache _phoneCache; + private readonly ICaptcha _captcha; + private readonly IGuidGenerator _guidGenerator; + public AccountService(IUserRepository userRepository, + ICurrentUser currentUser, + AccountManager accountManager, + ISqlSugarRepository menuRepository, + IHttpContextAccessor httpContextAccessor, + ILocalEventBus localEventBus, + IOptions jwtOptions, + IDistributedCache phoneCache, + ICaptcha captcha, + IGuidGenerator guidGenerator) + { + _userRepository = userRepository; + _currentUser = currentUser; + _accountManager = accountManager; + _menuRepository = menuRepository; + _httpContextAccessor = httpContextAccessor; + _localEventBus = localEventBus; + _jwtOptions = jwtOptions.Value; + _phoneCache = phoneCache; + _captcha = captcha; + _guidGenerator = guidGenerator; + } - private IUserRepository _userRepository { get; set; } - - private ICurrentUser _currentUser { get; set; } - - private AccountManager _accountManager { get; set; } - - - private IRepository _menuRepository { get; set; } - - - private SecurityCodeHelper _securityCode { get; set; } - - - private IEventPublisher _eventPublisher { get; set; } - - - - - private IUserService _userService { get; set; } - - - - private UserManager _userManager { get; set; } - - - - - private IRepository _roleRepository { get; set; } - - - private IMemoryCache _memoryCache { get; set; } - - - private SmsAliyunManager _smsAliyunManager { get; set; } - - private IHttpContextAccessor _httpContextAccessor { get; set; } - - private IOptions _smsAliyunManagerOptions { get; set; } + private IUserRepository _userRepository; + private ICurrentUser _currentUser; + private AccountManager _accountManager; + private ISqlSugarRepository _menuRepository; + private IUserService _userService; + private UserManager _userManager; + private ISqlSugarRepository _roleRepository; + private IHttpContextAccessor _httpContextAccessor; /// /// 效验图片登录验证码,无需和账号绑定 /// private void ValidationImageCaptcha(LoginInputVo input) { - //登录不想要验证码 ,不效验 - return; - var value = _memoryCache.Get($"Yi:Captcha:{input.Code}"); - if (value is not null && value.Equals(input.Uuid)) + //登录不想要验证码 ,可不效验 + if (!_captcha.Validate(input.Uuid, input.Code)) { - return; + throw new UserFriendlyException("验证码错误"); } - throw new UserFriendlyException("验证码错误"); } /// @@ -91,14 +91,14 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// private void ValidationPhoneCaptcha(RegisterDto input) { - var value = _memoryCache.Get($"Yi:Phone:{input.Phone}"); - if (value is not null && value.Equals($"{input.Code}")) - { - //成功,需要清空 - _memoryCache.Remove($"Yi:Phone:{input.Phone}"); - return; - } - throw new UserFriendlyException("验证码错误"); + //var value = _memoryCache.Get($"Yi:Phone:{input.Phone}"); + //if (value is not null && value.Equals($"{input.Code}")) + //{ + // //成功,需要清空 + // _memoryCache.Remove($"Yi:Phone:{input.Phone}"); + // return; + //} + //throw new UserFriendlyException("验证码错误"); } /// @@ -114,7 +114,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl } //效验验证码 - ValidationImageCaptcha(input); + // ValidationImageCaptcha(input); UserEntity user = new(); //登录成功 @@ -127,42 +127,55 @@ namespace Yi.Furion.Application.Rbac.Services.Impl { throw new UserFriendlyException(UserConst.No_Role); } - if (userInfo.PermissionCodes.Count == 0) - { - throw new UserFriendlyException(UserConst.No_Permission); - } - //这里抛出一个登录的事件 - var loginLogEntity = _httpContextAccessor.HttpContext.GetLoginLogInfo(); - await _eventPublisher.PublishAsync(new LoginEventSource(new LoginEventArgs - { - UserId = userInfo.User.Id, - UserName = user.UserName, - LoginLogEntity = loginLogEntity - }) - ); + var loginEntity = new LoginLogEntity().GetInfoByHttpContext(_httpContextAccessor.HttpContext); + var loginEto = loginEntity.Adapt(); + loginEto.UserName = input.UserName; + loginEto.UserId = userInfo.User.Id; + await _localEventBus.PublishAsync(loginEto); + //将用户信息添加到缓存中,需要考虑的是更改了用户、角色、菜单等整个体系都需要将缓存进行刷新,看具体业务进行选择 + //创建token - var accessToken = JWTEncryption.Encrypt(_accountManager.UserInfoToClaim(userInfo)); + var accessToken = CreateToken(_accountManager.UserInfoToClaim(userInfo)); return new { Token = accessToken }; } + /// + /// 创建令牌 + /// + /// + /// + private string CreateToken(Dictionary dic) + { + var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_jwtOptions.SecurityKey)); + var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256); + var claims = dic.Select(x => new Claim(x.Key, x.Value.ToString())).ToList(); + var token = new JwtSecurityToken( + issuer: _jwtOptions.Issuer, + audience: _jwtOptions.Audience, + claims: claims, + expires: DateTime.Now.AddSeconds(_jwtOptions.ExpiresMinuteTime), + notBefore: DateTime.Now, + signingCredentials: creds); + string returnToken = new JwtSecurityTokenHandler().WriteToken(token); + + return returnToken; + } + + /// /// 生成验证码 /// /// [AllowAnonymous] - public CaptchaImageDto GetCaptchaImage() + public async Task GetCaptchaImageAsync() { - var uuid = Guid.NewGuid(); - var code = _securityCode.GetRandomEnDigitalText(4); - //将uuid与code,Redis缓存中心化保存起来,登录根据uuid比对即可 - //10分钟过期 - _memoryCache.Set($"Yi:Captcha:{code}", uuid, new TimeSpan(0, 10, 0)); - var imgbyte = _securityCode.GetEnDigitalCodeByte(code); - return new CaptchaImageDto { Img = imgbyte, Code = code, Uuid = uuid }; + var uuid = _guidGenerator.Create(); + var captcha = _captcha.Generate(uuid.ToString()); + return new CaptchaImageDto { Img = captcha.Bytes, Uuid = uuid }; } /// @@ -193,7 +206,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl public async Task PostCaptchaPhone(PhoneCaptchaImageDto input) { await ValidationPhone(input.Phone); - var value = _memoryCache.Get($"Yi:Phone:{input.Phone}"); + var value = await _phoneCache.GetAsync(new CaptchaPhoneCacheKey(input.Phone)); //防止暴刷 if (value is not null) @@ -202,23 +215,26 @@ namespace Yi.Furion.Application.Rbac.Services.Impl } //生成一个4位数的验证码 //发送短信,同时生成uuid - //key: 电话号码 value:验证码+uuid - var code = _securityCode.GetRandomEnDigitalText(4); + ////key: 电话号码 value:验证码+uuid + //var code = _securityCode.GetRandomEnDigitalText(4); var uuid = Guid.NewGuid(); //未开启短信验证,默认8888 - if (_smsAliyunManagerOptions.Value.EnableFeature) - { - await _smsAliyunManager.Send(input.Phone, code); - } - else - { - code = "8888"; - } - _memoryCache.Set($"Yi:Phone:{input.Phone}", $"{code}", new TimeSpan(0, 10, 0)); + //if (_smsAliyunManagerOptions.Value.EnableFeature) + //{ + // await _smsAliyunManager.Send(input.Phone, code); + //} + //else + //{ + var code = "8888"; + //} + //_memoryCache.Set($"Yi:Phone:{input.Phone}", $"{code}", new TimeSpan(0, 10, 0)); - - return new { Uuid = uuid }; + await _phoneCache.SetAsync(new CaptchaPhoneCacheKey(input.Phone), new CaptchaPhoneCacheItem(code), new DistributedCacheEntryOptions { SlidingExpiration = TimeSpan.FromMinutes(10) }); + return new + { + Uuid = uuid + }; } /// @@ -266,7 +282,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl var role = await roleRepository.GetFirstAsync(x => x.RoleCode == UserConst.GuestRoleCode); if (role is not null) { - await _userManager.GiveUserSetRoleAsync(new List { entity.Id }, new List { role.Id }); + await _userManager.GiveUserSetRoleAsync(new List { entity.Id }, new List { role.Id }); } return true; } @@ -276,20 +292,25 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// 查询已登录的账户信息 /// /// - /// - [Route("/api/account")] + [Route("account")] [Authorize] + public async Task Get() { //通过鉴权jwt获取到用户的id var userId = _currentUser.Id; + if (userId is null) + { + throw new UserFriendlyException("用户未登录"); + } //此处从缓存中获取即可 //var data = _cacheManager.Get($"Yi:UserInfo:{userId}"); - var data = await _userRepository.GetUserAllInfoAsync(userId); + await Console.Out.WriteLineAsync(userId.ToString() + "99999999"); + var data = await _userRepository.GetUserAllInfoAsync(userId ?? Guid.Empty); //系统用户数据被重置,老前端访问重新授权 if (data is null) { - throw new AuthException(); + throw new AbpAuthorizationException(); } data.Menus.Clear(); @@ -302,20 +323,25 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// [Authorize] - [Route("Vue3Router")] + [Route("account/Vue3Router")] public async Task> GetVue3Router() { var userId = _currentUser.Id; - var data = await _userRepository.GetUserAllInfoAsync(userId); + if (_currentUser.Id is null) + { + throw new AbpAuthorizationException("用户未登录"); + + } + var data = await _userRepository.GetUserAllInfoAsync(userId ?? Guid.Empty); var menus = data.Menus.ToList(); //为超级管理员直接给全部路由 if (UserConst.Admin.Equals(data.User.UserName)) { - menus = await _menuRepository.GetListAsync(); + menus = ObjectMapper.Map, List>(await _menuRepository.GetListAsync()); } //将后端菜单转换成前端路由,组件级别需要过滤 - List routers = menus.Vue3RouterBuild(); + List routers = ObjectMapper.Map, List>(menus).Vue3RouterBuild(); return routers; } @@ -339,7 +365,11 @@ namespace Yi.Furion.Application.Rbac.Services.Impl { throw new UserFriendlyException("无效更新!输入的数据,新密码不能与老密码相同"); } - await _accountManager.UpdatePasswordAsync(_currentUser.Id, input.NewPassword, input.OldPassword); + if (_currentUser.Id is null) + { + throw new UserFriendlyException("用户未登录"); + } + await _accountManager.UpdatePasswordAsync(_currentUser.Id ?? Guid.Empty, input.NewPassword, input.OldPassword); return true; } @@ -350,7 +380,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// [HttpPut] - public async Task RestPasswordAsync(long userId,[FromBody] RestPasswordDto input) + public async Task RestPasswordAsync(Guid userId, RestPasswordDto input) { if (string.IsNullOrEmpty(input.Password)) { diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/ConfigService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/ConfigService.cs new file mode 100644 index 00000000..731a2ebd --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/ConfigService.cs @@ -0,0 +1,40 @@ +using SqlSugar; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Config; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Rbac.Application.Services +{ + /// + /// Config服务实现 + /// + public class ConfigService : YiCrudAppService, + IConfigService + { + private ISqlSugarRepository _repository; + public ConfigService(ISqlSugarRepository repository) : base(repository) + { + _repository = repository; + } + + /// + /// 多查 + /// + /// + /// + public override async Task> GetListAsync(ConfigGetListInputVo input) + { + RefAsync total = 0; + + var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.ConfigKey), x => x.ConfigKey.Contains(input.ConfigKey!)) + .WhereIF(!string.IsNullOrEmpty(input.ConfigName), x => x.ConfigName!.Contains(input.ConfigName!)) + .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); + return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); + } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/DeptService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DeptService.cs similarity index 58% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/DeptService.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DeptService.cs index 51edddf9..5a1dca28 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/DeptService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DeptService.cs @@ -1,23 +1,26 @@ using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Furion.Core.Rbac.Dtos.Dept; -using Yi.Furion.Core.Rbac.Entities; -using Yi.Furion.Sqlsugar.Core.Repositories; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Dept; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Repositories; -namespace Yi.Furion.Application.Rbac.Services.Impl +namespace Yi.Framework.Rbac.Application.Services { /// /// Dept服务实现 /// - [ApiDescriptionSettings("RBAC")] - public class DeptService : CrudAppService, - IDeptService, ITransient, IDynamicApiController + public class DeptService : YiCrudAppService, IDeptService { private IDeptRepository _deptRepository; - public DeptService(IDeptRepository deptRepository) { _deptRepository = deptRepository; } - [NonAction] - public async Task> GetChildListAsync(long deptId) + public DeptService(IDeptRepository deptRepository) : base(deptRepository) + { _deptRepository = deptRepository; } + + [RemoteService(false)] + public async Task> GetChildListAsync(Guid deptId) { return await _deptRepository.GetChildListAsync(deptId); } @@ -27,7 +30,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// //[Route("{roleId}")] - public async Task> GetRoleIdAsync([FromRoute] long roleId) + public async Task> GetRoleIdAsync(Guid roleId) { var entities = await _deptRepository.GetListRoleIdAsync(roleId); return await MapToGetListOutputDtosAsync(entities); @@ -41,15 +44,15 @@ namespace Yi.Furion.Application.Rbac.Services.Impl public override async Task> GetListAsync(DeptGetListInputVo input) { RefAsync total = 0; - var entities = await _DbQueryable + var entities = await _deptRepository._DbQueryable .WhereIF(!string.IsNullOrEmpty(input.DeptName), u => u.DeptName.Contains(input.DeptName!)) .WhereIF(input.State is not null, u => u.State == input.State) .OrderBy(u => u.OrderNum, OrderByType.Asc) - .ToPageListAsync(input.PageNum, input.PageSize, total); + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); return new PagedResultDto { Items = await MapToGetListOutputDtosAsync(entities), - Total = total + TotalCount = total }; } } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DictionaryService.cs similarity index 51% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryService.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DictionaryService.cs index af56dc99..e31d7596 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DictionaryService.cs @@ -1,22 +1,28 @@ -using Furion.DependencyInjection; -using Furion.DynamicApiController; using Microsoft.AspNetCore.Mvc; using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Module.DictionaryManager.Dtos.Dictionary; -using Yi.Framework.Module.DictionaryManager.Entities; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Framework.Module.DictionaryManager +namespace Yi.Framework.Rbac.Application.Services { /// /// Dictionary服务实现 /// - [ApiDescriptionSettings("DictionaryManager")] - public class DictionaryService : CrudAppService, - IDictionaryService,IDynamicApiController,ITransient + public class DictionaryService : YiCrudAppService, + IDictionaryService { + private ISqlSugarRepository _repository; + public DictionaryService(ISqlSugarRepository repository) : base(repository) + { + _repository= repository; + } + /// /// 查询 /// @@ -24,13 +30,13 @@ namespace Yi.Framework.Module.DictionaryManager public override async Task> GetListAsync(DictionaryGetListInputVo input) { RefAsync total = 0; - var entities = await _DbQueryable.WhereIF(input.DictType is not null, x => x.DictType == input.DictType) + var entities = await _repository._DbQueryable.WhereIF(input.DictType is not null, x => x.DictType == input.DictType) .WhereIF(input.DictLabel is not null, x => x.DictLabel!.Contains(input.DictLabel!)) .WhereIF(input.State is not null, x => x.State == input.State) - .ToPageListAsync(input.PageNum, input.PageSize, total); + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); return new PagedResultDto { - Total = total, + TotalCount = total, Items = await MapToGetListOutputDtosAsync(entities) }; } @@ -41,7 +47,7 @@ namespace Yi.Framework.Module.DictionaryManager /// /// /// - [Route("/api/dictionary/dic-type/{dicType}")] + [Route("dictionary/dic-type/{dicType}")] public async Task> GetDicType([FromRoute] string dicType) { var entities = await _repository.GetListAsync(u => u.DictType == dicType && u.State == true); diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DictionaryTypeService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DictionaryTypeService.cs new file mode 100644 index 00000000..4ffe15e6 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DictionaryTypeService.cs @@ -0,0 +1,41 @@ +using SqlSugar; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Rbac.Application.Services +{ + /// + /// DictionaryType服务实现 + /// + public class DictionaryTypeService : YiCrudAppService, + IDictionaryTypeService + { + private ISqlSugarRepository _repository; + public DictionaryTypeService(ISqlSugarRepository repository) : base(repository) + { + _repository = repository; + } + + public async override Task> GetListAsync(DictionaryTypeGetListInputVo input) + { + + RefAsync total = 0; + var entities = await _repository._DbQueryable.WhereIF(input.DictName is not null, x => x.DictName.Contains(input.DictName!)) + .WhereIF(input.DictType is not null, x => x.DictType!.Contains(input.DictType!)) + .WhereIF(input.State is not null, x => x.State == input.State) + .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); + + return new PagedResultDto + { + TotalCount = total, + Items = await MapToGetListOutputDtosAsync(entities) + }; + } + + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/LoginLogService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/LoginLogService.cs new file mode 100644 index 00000000..9ff45657 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/LoginLogService.cs @@ -0,0 +1,37 @@ +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.LoginLog; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Rbac.Application.Services +{ + public class LoginLogService : YiCrudAppService + { + private readonly ISqlSugarRepository _repository; + public LoginLogService(ISqlSugarRepository repository) : base(repository) + { + _repository = repository; + } + + public override async Task> GetListAsync(LoginLogGetListInputVo input) + { + RefAsync total = 0; + + var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.LoginIp), x => x.LoginIp.Contains(input.LoginIp!)) + .WhereIF(!string.IsNullOrEmpty(input.LoginUser), x => x.LoginUser!.Contains(input.LoginUser!)) + .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); + return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); + } + + [RemoteService(false)] + public override Task UpdateAsync(Guid id, LoginLogGetListOutputDto input) + { + return base.UpdateAsync(id, input); + } + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/MenuService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/MenuService.cs new file mode 100644 index 00000000..709c2983 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/MenuService.cs @@ -0,0 +1,49 @@ +using SqlSugar; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Menu; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Rbac.Application.Services +{ + /// + /// Menu服务实现 + /// + public class MenuService : YiCrudAppService, + IMenuService + { + private readonly ISqlSugarRepository _repository; + public MenuService(ISqlSugarRepository repository) : base(repository) + { + _repository = repository; + } + + public override async Task> GetListAsync(MenuGetListInputVo input) + { + + RefAsync total = 0; + + var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.MenuName), x => x.MenuName.Contains(input.MenuName!)) + .WhereIF(input.State is not null, x => x.State == input.State) + .OrderByDescending(x => x.OrderNum) + .ToListAsync(); + //.ToPageListAsync(input.SkipCount, input.MaxResultCount, total); + return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); + } + + /// + /// 查询当前角色的菜单 + /// + /// + /// + public async Task> GetListRoleIdAsync(Guid roleId) + { + var entities = await _repository._DbQueryable.Where(m => SqlFunc.Subqueryable().Where(rm => rm.RoleId == roleId && rm.MenuId == m.Id).Any()).ToListAsync(); + + return await MapToGetListOutputDtosAsync(entities); + } + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/MonitorCacheService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/MonitorCacheService.cs new file mode 100644 index 00000000..0d02cee6 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/MonitorCacheService.cs @@ -0,0 +1,45 @@ +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Application.Services; +using Yi.Framework.Rbac.Application.Contracts.Dtos.MonitorCache; +using Yi.Framework.Rbac.Application.Contracts.IServices; + +namespace Yi.Framework.Rbac.Application.Services +{ + public class MonitorCacheService : ApplicationService, IMonitorCacheService + { + private static List monitorCacheNames => new List() + { + new MonitorCacheNameGetListOutputDto{ CacheName="Yi:Login",Remark="登录验证码"}, + new MonitorCacheNameGetListOutputDto{ CacheName="Yi:User",Remark="用户信息"} + }; + private Dictionary monitorCacheNamesDic => monitorCacheNames.ToDictionary(x => x.CacheName, x => x.Remark); + //private CSRedisClient _cacheClient; + public MonitorCacheService() + { + //_cacheClient = redisCacheClient.Client; + } + //cacheKey value为空,只要name和备注 + + public List GetName() + { + //固定的 + return monitorCacheNames; + } + [HttpGet("key/{cacaheName}")] + public List GetKey(string cacaheName) + { + //var output = _cacheClient.Keys($"{cacaheName}:*"); + return new List() { "1233124", "3124", "1231251", "12312412" }; + } + + //全部不为空 + [HttpGet("value/{cacaheName}/{cacaheKey}")] + public MonitorCacheGetListOutputDto GetValue(string cacaheName, string cacaheKey) + { + //var value = _cacheClient.Get($"{cacaheName}:{cacaheKey}"); + return new MonitorCacheGetListOutputDto() { CacheKey = cacaheKey, CacheName = cacaheName, CacheValue = "ttt", Remark = monitorCacheNamesDic[cacaheName] }; + } + } + + +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/MonitorServerService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/MonitorServerService.cs similarity index 74% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/MonitorServerService.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/MonitorServerService.cs index 18184f25..7ab64101 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/MonitorServerService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/MonitorServerService.cs @@ -1,21 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; +using System.Diagnostics; using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using Furion.Logging; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Options; -using Yi.Framework.Infrastructure.Extensions; -using Yi.Framework.Infrastructure.Helper; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Application.Services; +using Yi.Framework.Core.Helper; +using Yi.Framework.Rbac.Application.Contracts.IServices; -namespace Yi.Furion.Application.Rbac.Services.Impl +namespace Yi.Framework.Rbac.Application.Services { - [ApiDescriptionSettings("RBAC")] - public class MonitorServerService : IMonitorServerService, IDynamicApiController, ITransient + public class MonitorServerService : ApplicationService, IMonitorServerService { private IWebHostEnvironment _hostEnvironment; private IHttpContextAccessor _httpContextAccessor; @@ -24,7 +18,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl _hostEnvironment = hostEnvironment; _httpContextAccessor = httpContextAccessor; } - [HttpGet("info")] + [HttpGet("monitor-server/info")] public object GetInfo() { int cpuNum = Environment.ProcessorCount; @@ -38,7 +32,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl string serverIP = _httpContextAccessor.HttpContext.Connection.LocalIpAddress.MapToIPv4().ToString() + ":" + _httpContextAccessor.HttpContext.Connection.LocalPort;//获取服务器IP var programStartTime = Process.GetCurrentProcess().StartTime; - string programRunTime = DateTimeHelper.FormatTime((DateTime.Now - programStartTime).TotalMilliseconds.ToString().Split('.')[0].ParseToLong()); + string programRunTime = DateTimeHelper.FormatTime(long.Parse((DateTime.Now - programStartTime).TotalMilliseconds.ToString().Split('.')[0])); var data = new { cpu = ComputerHelper.GetComputerInfo(), diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/OnlineService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/OnlineService.cs similarity index 77% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/OnlineService.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/OnlineService.cs index 6bb4a03e..3432470a 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/OnlineService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/OnlineService.cs @@ -1,18 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.Logging; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Furion.Application.Rbac.SignalRHub; -using Yi.Furion.Application.Rbac.SignalRHub.Model; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.SignalRHubs; +using Yi.Framework.Rbac.Domain.SignalRHubs.Model; -namespace Yi.Furion.Application.Rbac.Services.Impl +namespace Yi.Framework.Rbac.Application.Services { - [ApiDescriptionSettings("RBAC")] - public class OnlineService:IOnlineService,IDynamicApiController,ITransient + public class OnlineService : ApplicationService, IOnlineService { private ILogger _logger; private IHubContext _hub; @@ -27,7 +24,6 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// /// - [HttpGet("")] public PagedResultDto GetListAsync([FromQuery] OnlineUserModel online) { var data = OnlineUserHub.clientUsers; @@ -41,7 +37,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl { dataWhere = dataWhere.Where((u) => u.UserName!.Contains(online.UserName)); } - return new PagedResultDto() { Total = data.Count, Items = dataWhere.ToList() }; + return new PagedResultDto() { TotalCount = data.Count, Items = dataWhere.ToList() }; } @@ -51,7 +47,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// [HttpDelete] - [Route("{connnectionId}")] + [Route("online/{connnectionId}")] public async Task ForceOut(string connnectionId) { if (OnlineUserHub.clientUsers.Exists(u => u.ConnnectionId == connnectionId)) diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/OperationLogService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/OperationLogService.cs new file mode 100644 index 00000000..9e949a95 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/OperationLogService.cs @@ -0,0 +1,40 @@ +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.OperLog; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Rbac.Application.Services +{ + /// + /// OperationLog服务实现 + /// + public class OperationLogService : YiCrudAppService, + IOperationLogService + { + private ISqlSugarRepository _repository; + public OperationLogService(ISqlSugarRepository repository) : base(repository) + { + _repository=repository; + } + + public override async Task> GetListAsync(OperationLogGetListInputVo input) + { + RefAsync total = 0; + var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.OperUser), x => x.OperUser.Contains(input.OperUser!)) + .WhereIF(input.OperType is not null, x => x.OperType == input.OperType) + .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); + return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); + } + + [RemoteService(false)] + public override Task UpdateAsync(Guid id, OperationLogGetListOutputDto input) + { + return base.UpdateAsync(id, input); + } + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/PostService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/PostService.cs new file mode 100644 index 00000000..8e9e00ce --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/PostService.cs @@ -0,0 +1,34 @@ +using SqlSugar; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Post; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Rbac.Application.Services +{ + /// + /// Post服务实现 + /// + public class PostService : YiCrudAppService, + IPostService + { + private readonly ISqlSugarRepository _repository; + public PostService(ISqlSugarRepository repository) : base(repository) + { + _repository = repository; + } + + public override async Task> GetListAsync(PostGetListInputVo input) + { + RefAsync total = 0; + + var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.PostName), x => x.PostName.Contains(input.PostName!)) + .WhereIF(input.State is not null, x => x.State == input.State) + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); + return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); + } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/RoleService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RoleService.cs similarity index 70% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/RoleService.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RoleService.cs index 9903e638..9c1c1ae3 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/RoleService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RoleService.cs @@ -1,34 +1,39 @@ -using System.Linq.Expressions; -using System.Reflection.Metadata; -using Furion.DatabaseAccessor; +using Mapster; +using Microsoft.AspNetCore.Mvc; using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Application.Rbac.Domain; -using Yi.Furion.Core.Rbac.Dtos.Role; -using Yi.Furion.Core.Rbac.Dtos.User; -using Yi.Furion.Core.Rbac.Entities; -using Yi.Furion.Core.Rbac.Enums; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Uow; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.Role; +using Yi.Framework.Rbac.Application.Contracts.Dtos.User; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Managers; +using Yi.Framework.Rbac.Domain.Shared.Enums; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Rbac.Services.Impl +namespace Yi.Framework.Rbac.Application.Services { /// /// Role服务实现 /// - [ApiDescriptionSettings("RBAC")] - public class RoleService : CrudAppService, - IRoleService, ITransient, IDynamicApiController + public class RoleService : YiCrudAppService, + IRoleService { - public RoleService(RoleManager roleManager, IRepository roleDeptRepository, IRepository userRoleRepository) => - (_roleManager, _roleDeptRepository, _userRoleRepository) = - (roleManager, roleDeptRepository, userRoleRepository); + public RoleService(RoleManager roleManager, ISqlSugarRepository roleDeptRepository, ISqlSugarRepository userRoleRepository, ISqlSugarRepository repository) : base(repository) + { + (_roleManager, _roleDeptRepository, _userRoleRepository, _repository) = + (roleManager, roleDeptRepository, userRoleRepository, repository); + } + + private ISqlSugarRepository _repository; private RoleManager _roleManager { get; set; } - private IRepository _roleDeptRepository; + private ISqlSugarRepository _roleDeptRepository; - private IRepository _userRoleRepository; + private ISqlSugarRepository _userRoleRepository; [UnitOfWork] public async Task UpdateDataScpoceAsync(UpdateDataScpoceInput input) { @@ -36,23 +41,23 @@ namespace Yi.Furion.Application.Rbac.Services.Impl if (input.DataScope == DataScopeEnum.CUSTOM) { await _roleDeptRepository.DeleteAsync(x => x.RoleId == input.RoleId); - var insertEntities = input.DeptIds.Select(x => new RoleDeptEntity { Id = SnowflakeHelper.NextId, DeptId = x, RoleId = input.RoleId }).ToList(); + var insertEntities = input.DeptIds.Select(x => new RoleDeptEntity { DeptId = x, RoleId = input.RoleId }).ToList(); await _roleDeptRepository.InsertRangeAsync(insertEntities); } - await _repository._Db.Updateable(new RoleEntity() { Id = input.RoleId, DataScope = input.DataScope }).UpdateColumns(x => x.DataScope).ExecuteCommandAsync(); + var entity = new RoleEntity() { DataScope = input.DataScope }; + EntityHelper.TrySetId(entity, () => input.RoleId); + await _repository._Db.Updateable(entity).UpdateColumns(x => x.DataScope).ExecuteCommandAsync(); } public override async Task> GetListAsync(RoleGetListInputVo input) { - var entity = await MapToEntityAsync(input); - RefAsync total = 0; - var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.RoleCode), x => x.RoleCode.Contains(input.RoleCode!)) + var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.RoleCode), x => x.RoleCode.Contains(input.RoleCode!)) .WhereIF(!string.IsNullOrEmpty(input.RoleName), x => x.RoleName.Contains(input.RoleName!)) .WhereIF(input.State is not null, x => x.State == input.State) - .ToPageListAsync(input.PageNum, input.PageSize, total); + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); } @@ -70,7 +75,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl var entity = await MapToEntityAsync(input); await _repository.InsertAsync(entity); outputDto = await MapToGetOutputDtoAsync(entity); - await _roleManager.GiveRoleSetMenuAsync(new List { entity.Id }, input.MenuIds); + await _roleManager.GiveRoleSetMenuAsync(new List { entity.Id }, input.MenuIds); // uow.Commit(); //} @@ -84,7 +89,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// [UnitOfWork] - public override async Task UpdateAsync(long id, RoleUpdateInputVo input) + public override async Task UpdateAsync(Guid id, RoleUpdateInputVo input) { var dto = new RoleGetOutputDto(); //using (var uow = _unitOfWorkManager.CreateContext()) @@ -93,7 +98,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl await MapToEntityAsync(input, entity); await _repository.UpdateAsync(entity); - await _roleManager.GiveRoleSetMenuAsync(new List { id }, input.MenuIds); + await _roleManager.GiveRoleSetMenuAsync(new List { id }, input.MenuIds); dto = await MapToGetOutputDtoAsync(entity); // uow.Commit(); @@ -108,8 +113,8 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// /// - [Route("/api/role/{id}/{state}")] - public async Task UpdateStateAsync([FromRoute] long id, [FromRoute] bool state) + [Route("role/{id}/{state}")] + public async Task UpdateStateAsync([FromRoute] Guid id, [FromRoute] bool state) { var entity = await _repository.GetByIdAsync(id); if (entity is null) @@ -130,8 +135,8 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// 是否在该角色下 /// - [Route("/api/role/auth-user/{roleId}/{isAllocated}")] - public async Task> GetAuthUserByRoleIdAsync([FromRoute] long roleId, [FromRoute] bool isAllocated, [FromQuery] RoleAuthUserGetListInput input) + [Route("role/auth-user/{roleId}/{isAllocated}")] + public async Task> GetAuthUserByRoleIdAsync([FromRoute] Guid roleId, [FromRoute] bool isAllocated, [FromQuery] RoleAuthUserGetListInput input) { PagedResultDto output; //角色下已授权用户 @@ -147,7 +152,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl return output; } - private async Task> GetAllocatedAuthUserByRoleIdAsync(long roleId, RoleAuthUserGetListInput input) + private async Task> GetAllocatedAuthUserByRoleIdAsync(Guid roleId, RoleAuthUserGetListInput input) { RefAsync total = 0; var output = await _userRoleRepository._DbQueryable @@ -156,18 +161,18 @@ namespace Yi.Furion.Application.Rbac.Services.Impl .WhereIF(!string.IsNullOrEmpty(input.UserName), (ur, u) => u.UserName.Contains(input.UserName)) .WhereIF(input.Phone is not null, (ur, u) => u.Phone.ToString().Contains(input.Phone.ToString())) .Select((ur, u) => new UserGetListOutputDto { Id = u.Id }, true) - .ToPageListAsync(input.PageNum, input.PageSize, total); + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); return new PagedResultDto(total, output); } - private async Task> GetNotAllocatedAuthUserByRoleIdAsync(long roleId, RoleAuthUserGetListInput input) + private async Task> GetNotAllocatedAuthUserByRoleIdAsync(Guid roleId, RoleAuthUserGetListInput input) { RefAsync total = 0; var entities = await _userRoleRepository._Db.Queryable() .Where(u => SqlFunc.Subqueryable().Where(x => x.RoleId == roleId).Where(x => x.UserId == u.Id).NotAny()) .WhereIF(!string.IsNullOrEmpty(input.UserName), u => u.UserName.Contains(input.UserName)) .WhereIF(input.Phone is not null, u => u.Phone.ToString().Contains(input.Phone.ToString())) - .ToPageListAsync(input.PageNum, input.PageSize, total); + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); var output = entities.Adapt>(); return new PagedResultDto(total, output); } @@ -180,7 +185,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// public async Task CreateAuthUserAsync(RoleAuthUserCreateOrDeleteInput input) { - var userRoleEntities = input.UserIds.Select(u => new UserRoleEntity { Id = SnowflakeHelper.NextId, RoleId = input.RoleId, UserId = u }).ToList(); + var userRoleEntities = input.UserIds.Select(u => new UserRoleEntity { RoleId = input.RoleId, UserId = u }).ToList(); await _userRoleRepository.InsertRangeAsync(userRoleEntities); } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/TaskService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/TaskService.cs new file mode 100644 index 00000000..fd74c322 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/TaskService.cs @@ -0,0 +1,171 @@ +using Volo.Abp.Application.Services; +using Yi.Framework.Rbac.Application.Contracts.IServices; + +namespace Yi.Framework.Rbac.Application.Services +{ + public class TaskService : ApplicationService, ITaskService + { + //private readonly ISchedulerFactory _schedulerFactory; + //public TaskService(ISchedulerFactory schedulerFactory) + //{ + // _schedulerFactory = schedulerFactory; + //} + ///// + ///// 单查job + ///// + ///// + ///// + //[HttpGet("{jobId}")] + //public TaskGetOutput GetById([FromRoute] string jobId) + //{ + // var result = _schedulerFactory.TryGetJob(jobId, out var scheduler); + // var data = scheduler.GetModel(); + // var output = data.JobDetail.Adapt(); + // output.TriggerArgs = data.Triggers[0].Args; + // output.NextRunTime = data.Triggers[0].NextRunTime; + // output.LastRunTime = data.Triggers[0].LastRunTime; + // output.NumberOfRuns = data.Triggers[0].NumberOfRuns; + // return output; + //} + + ///// + ///// 多查job + ///// + ///// + //[HttpGet("")] + //public PagedResultDto GetList([FromQuery] TaskGetListInput input) + //{ + // var data = _schedulerFactory.GetJobsOfModels().Skip((input.PageNum - 1) * input.PageSize).Take(input.PageSize).OrderByDescending(x => x.JobDetail.UpdatedTime) + + // .ToList(); + // var output = data.Select(x => + // { + + // var res = new TaskGetListOutput(); + // res = x.JobDetail.Adapt(); + // res.TriggerArgs = x.Triggers[0].Args; + // res.Status = x.Triggers[0].Status.ToString(); + // return res; + // }).ToList(); + // return new PagedResultDto(data.Count(), output); + //} + + ///// + ///// 创建job + ///// + ///// + ///// + //public ScheduleResult Create(TaskCreateInput input) + //{ + + + // //jobBuilder + // var jobBuilder = JobBuilder.Create(input.AssemblyName, input.JobType).SetJobId(input.JobId).SetGroupName(input.GroupName) + // .SetConcurrent(input.Concurrent).SetDescription(input.Description); + + // //triggerBuilder + // //毫秒 + // TriggerBuilder triggerBuilder = null; + // switch (input.Type) + // { + // case Core.Rbac.Enums.JobTypeEnum.Cron: + // triggerBuilder = Triggers.Cron(input.Cron, CronStringFormat.WithSeconds); + // break; + // case Core.Rbac.Enums.JobTypeEnum.Millisecond: + // triggerBuilder = Triggers.Period(input.Millisecond); + // break; + // } + + // //作业计划,单个jobBuilder与多个triggerBuilder组合 + // var schedulerBuilder = SchedulerBuilder.Create(jobBuilder, triggerBuilder); + + + // //调度中心工厂,使用作业计划管理job,返回调度中心单个 + // var result = _schedulerFactory.TryAddJob(schedulerBuilder, out var scheduler); + + // return result; + //} + + ///// + ///// 移除job + ///// + ///// + ///// + //public ScheduleResult Remove(string jobId) + //{ + // var res = _schedulerFactory.TryRemoveJob(jobId, out var scheduler); + // return res; + //} + + ///// + ///// 暂停job + ///// + ///// + ///// + //[HttpPut] + //public ScheduleResult Pause(string jobId) + //{ + // var res = _schedulerFactory.TryGetJob(jobId, out var scheduler); + + // scheduler.Pause(); + // return res; + //} + + ///// + ///// 开始job + ///// + ///// + ///// + //[HttpPut] + //public ScheduleResult Start(string jobId) + //{ + // var res = _schedulerFactory.TryGetJob(jobId, out var scheduler); + // scheduler.Start(); + // return res; + //} + + ///// + ///// 更新job + ///// + ///// + ///// + ///// + //public ScheduleResult Update(string jobId, TaskUpdateInput input) + //{ + // //jobBuilder + // var jobBuilder = JobBuilder.Create(input.AssemblyName, input.JobType).SetJobId(jobId).SetGroupName(input.GroupName) + // .SetConcurrent(input.Concurrent).SetDescription(input.Description); + + // //triggerBuilder + // //毫秒 + // TriggerBuilder triggerBuilder = null; + // switch (input.Type) + // { + // case Core.Rbac.Enums.JobTypeEnum.Cron: + // triggerBuilder = Triggers.Cron(input.Cron, CronStringFormat.WithSeconds); + // break; + // case Core.Rbac.Enums.JobTypeEnum.Millisecond: + // triggerBuilder = Triggers.Period(input.Millisecond); + // break; + // } + + // //作业计划,单个jobBuilder与多个triggerBuilder组合 + // var schedulerBuilder = SchedulerBuilder.Create(jobBuilder, triggerBuilder); + + + // var result = _schedulerFactory.TryUpdateJob(schedulerBuilder, out var scheduler); + // return result; + //} + + //[HttpPost] + //public bool RunOnce(string jobId) + //{ + // var result = _schedulerFactory.TryGetJob(jobId, out var scheduler); + + // var triggerBuilder = Triggers.Period(100).SetRunOnStart(true).SetMaxNumberOfRuns(1); + // scheduler.AddTrigger(triggerBuilder); + // //设置启动时执行一次,然后最大只执行一次 + // return true; + //} + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/TestServcie.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/TestServcie.cs new file mode 100644 index 00000000..c38bffd8 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/TestServcie.cs @@ -0,0 +1,120 @@ +using System.IdentityModel.Tokens.Jwt; +using System.Security.Claims; +using System.Text; +using Microsoft.AspNetCore.Authorization; +using Microsoft.Extensions.Options; +using Microsoft.IdentityModel.Tokens; +using Volo.Abp; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Uow; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Shared.Options; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Rbac.Application.Services +{ + /// + /// 测试文档控制器 + /// + public class TestServcie : ApplicationService + { + private IRepository _repository; + private IUnitOfWorkManager _unitOfWork; + private ISqlSugarRepository _sqlsugarRepository; + + public IOptions options { get; set; } + public TestServcie(IRepository repository, IUnitOfWorkManager unitOfWork, ISqlSugarRepository sqlsugarRepository, IRepository repository2) + { + _unitOfWork = unitOfWork; + _repository = repository; + _sqlsugarRepository = sqlsugarRepository; + + } + /// + /// 你好,多线程 + /// + /// + public async Task GetTaskTest() + { + var tasks = Enumerable.Range(0, 2).Select(x => + { + return Task.Run(async () => + { + using (var uow = _unitOfWork.Begin(true)) + { + // await _repository.GetListAsync(); + await _sqlsugarRepository._DbQueryable.ToListAsync(); + await uow.CompleteAsync(); + } + }); + }).ToList(); + + await Task.WhenAll(tasks); + return "你哈"; + } + + [Authorize] + public async Task> GetTest() + { + //using (var uow = _unitOfWork.Begin(true)) + //{ + var data = await _repository.GetListAsync(); + var data2 = await _repository.GetListAsync(); + //await uow.CompleteAsync(); + return data; + + //} + + + } + + //[UnitOfWork] + public async Task PostTest() + { + //using (var uow = _unitOfWork.Begin()) + //{ + var stu = new StudentEntity() { Name = $"{DateTime.Now.ToString()}你好" }; + + var data = await _repository.InsertAsync(stu); + //await uow.CompleteAsync(); + return data; + //} + } + + public async Task PostError() + { + throw new ApplicationException(); + } + + public async Task PostUserError() + { + throw new UserFriendlyException("直接爆炸"); + } + + public string Login() + { + var data = options.Value; + var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(data.SecurityKey)); + + var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256); + var claims = new List() + { + new Claim("name","admin") + }; + var token = new JwtSecurityToken( + issuer: data.Issuer, + audience: data.Audience, + claims: claims, + expires: DateTime.Now.AddSeconds(60 * 60 * 2), + notBefore: DateTime.Now, + signingCredentials: creds); + string returnToken = new JwtSecurityTokenHandler().WriteToken(token); + + return returnToken; + + + + } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/UserService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/UserService.cs similarity index 67% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/UserService.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/UserService.cs index 1a0bccab..ee78066e 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/UserService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/UserService.cs @@ -1,32 +1,34 @@ +using Microsoft.AspNetCore.Mvc; using SqlSugar; -using Yi.Framework.Infrastructure.Attributes; -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Infrastructure.Exceptions; -using Yi.Framework.Module.OperLogManager; -using Yi.Furion.Application.Rbac.Domain; -using Yi.Furion.Core.Rbac.Consts; -using Yi.Furion.Core.Rbac.Dtos.User; -using Yi.Furion.Core.Rbac.Entities; -using Yi.Furion.Sqlsugar.Core.Repositories; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Uow; +using Volo.Abp.Users; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts.Dtos.User; +using Yi.Framework.Rbac.Application.Contracts.IServices; +using Yi.Framework.Rbac.Domain.Authorization; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Managers; +using Yi.Framework.Rbac.Domain.Repositories; +using Yi.Framework.Rbac.Domain.Shared.Consts; +using Yi.Framework.Rbac.Domain.Shared.OperLog; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Rbac.Services.Impl +namespace Yi.Framework.Rbac.Application.Services { /// /// User服务实现 /// - [ApiDescriptionSettings("RBAC")] - public class UserService : CrudAppService, - IUserService, ITransient, IDynamicApiController + public class UserService : YiCrudAppService + //IUserService { - - - public UserService(UserManager userManager, IUserRepository userRepository, ICurrentUser currentUser, IDeptService deptService) => - (_userManager, _userRepository, _currentUser, _deptService) = - (userManager, userRepository, currentUser, deptService); + public UserService(ISqlSugarRepository repository, UserManager userManager, IUserRepository userRepository, ICurrentUser currentUser, IDeptService deptService) : base(repository) + => + (_userManager, _userRepository, _currentUser, _deptService, _repository) = + (userManager, userRepository, currentUser, deptService, repository); private UserManager _userManager { get; set; } - + private ISqlSugarRepository _repository; private IUserRepository _userRepository { get; set; } private IDeptService _deptService { get; set; } @@ -40,36 +42,34 @@ namespace Yi.Furion.Application.Rbac.Services.Impl [Permission("system:user:list")] public override async Task> GetListAsync(UserGetListInputVo input) { - var entity = await MapToEntityAsync(input); - RefAsync total = 0; - List deptIds = null; + List deptIds = null; if (input.DeptId is not null) { - deptIds= await _deptService.GetChildListAsync(input.DeptId ?? 0); + deptIds = await _deptService.GetChildListAsync(input.DeptId ?? Guid.Empty); } - List ids = input.Ids?.Split(",").Select(x => long.Parse(x)).ToList(); - var outPut = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.UserName), x => x.UserName.Contains(input.UserName!)) + List ids = input.Ids?.Split(",").Select(x => Guid.Parse(x)).ToList(); + var outPut = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.UserName), x => x.UserName.Contains(input.UserName!)) .WhereIF(input.Phone is not null, x => x.Phone.ToString()!.Contains(input.Phone.ToString()!)) .WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name!.Contains(input.Name!)) .WhereIF(input.State is not null, x => x.State == input.State) .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) //这个为过滤当前部门,加入数据权限后,将由数据权限控制 - .WhereIF(input.DeptId is not null, x => deptIds.Contains(x.DeptId??-1)) + .WhereIF(input.DeptId is not null, x => deptIds.Contains(x.DeptId ?? Guid.Empty)) .WhereIF(ids is not null, x => ids.Contains(x.Id)) .LeftJoin((user, dept) => user.DeptId == dept.Id) .Select((user, dept) => new UserGetListOutputDto(), true) - .ToPageListAsync(input.PageNum, input.PageSize, total); + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); var result = new PagedResultDto(); result.Items = outPut; - result.Total = total; + result.TotalCount = total; return result; } @@ -78,7 +78,6 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// /// - /// [OperLog("添加用户", OperEnum.Insert)] [UnitOfWork] public async override Task CreateAsync(UserCreateInputVo input) @@ -98,8 +97,8 @@ namespace Yi.Furion.Application.Rbac.Services.Impl //using (var uow = _unitOfWorkManager.CreateContext()) //{ var returnEntity = await _repository.InsertReturnEntityAsync(entities); - await _userManager.GiveUserSetRoleAsync(new List { returnEntity.Id }, input.RoleIds); - await _userManager.GiveUserSetPostAsync(new List { returnEntity.Id }, input.PostIds); + await _userManager.GiveUserSetRoleAsync(new List { returnEntity.Id }, input.RoleIds); + await _userManager.GiveUserSetPostAsync(new List { returnEntity.Id }, input.PostIds); //uow.Commit(); var result = await MapToGetOutputDtoAsync(returnEntity); @@ -111,10 +110,10 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// /// - public override async Task GetAsync(long id) + public override async Task GetAsync(Guid id) { //使用导航树形查询 - var entity = await _DbQueryable.Includes(u => u.Roles).Includes(u => u.Posts).Includes(u => u.Dept).InSingleAsync(id); + var entity = await _repository._DbQueryable.Includes(u => u.Roles).Includes(u => u.Posts).Includes(u => u.Dept).InSingleAsync(id); return await MapToGetOutputDtoAsync(entity); } @@ -127,11 +126,11 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// [OperLog("更新用户", OperEnum.Update)] [UnitOfWork] - public async override Task UpdateAsync(long id, UserUpdateInputVo input) + public async override Task UpdateAsync(Guid id, UserUpdateInputVo input) { if (await _repository.IsAnyAsync(u => input.UserName!.Equals(u.UserName) && !id.Equals(u.Id))) { - throw new UserFriendlyException("用户已经在,更新失败"); + throw new UserFriendlyException("用户已经存在,更新失败"); } var entity = await _repository.GetByIdAsync(id); //更新密码,特殊处理 @@ -144,8 +143,8 @@ namespace Yi.Furion.Application.Rbac.Services.Impl //using (var uow = _unitOfWorkManager.CreateContext()) //{ var res1 = await _repository.UpdateAsync(entity); - await _userManager.GiveUserSetRoleAsync(new List { id }, input.RoleIds); - await _userManager.GiveUserSetPostAsync(new List { id }, input.PostIds); + await _userManager.GiveUserSetRoleAsync(new List { id }, input.RoleIds); + await _userManager.GiveUserSetPostAsync(new List { id }, input.PostIds); // uow.Commit(); //} return await MapToGetOutputDtoAsync(entity); @@ -160,9 +159,10 @@ namespace Yi.Furion.Application.Rbac.Services.Impl public async Task UpdateProfileAsync(ProfileUpdateInputVo input) { var entity = await _repository.GetByIdAsync(_currentUser.Id); - _mapper.Map(input, entity); + ObjectMapper.Map(input, entity); + await _repository.UpdateAsync(entity); - var dto = _mapper.Map(entity); + var dto = await MapToGetOutputDtoAsync(entity); return dto; } @@ -172,24 +172,23 @@ namespace Yi.Furion.Application.Rbac.Services.Impl /// /// /// - [Route("/api/user/{id}/{state}")] + [Route("user/{id}/{state}")] [OperLog("更新用户状态", OperEnum.Update)] - public async Task UpdateStateAsync([FromRoute] long id, [FromRoute] bool state) + public async Task UpdateStateAsync([FromRoute] Guid id, [FromRoute] bool state) { var entity = await _repository.GetByIdAsync(id); if (entity is null) { throw new ApplicationException("用户未存在"); } - entity.State = state; await _repository.UpdateAsync(entity); return await MapToGetOutputDtoAsync(entity); } [OperLog("删除用户", OperEnum.Delete)] - public override Task DeleteAsync(string id) + public override async Task DeleteAsync(Guid id) { - return base.DeleteAsync(id); + await base.DeleteAsync(id); } } } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Yi.Framework.Rbac.Application.csproj b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Yi.Framework.Rbac.Application.csproj new file mode 100644 index 00000000..e1d5da94 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Yi.Framework.Rbac.Application.csproj @@ -0,0 +1,21 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + + + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Yi.Framework.Rbac.Application.xml b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Yi.Framework.Rbac.Application.xml new file mode 100644 index 00000000..e4e9a367 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Yi.Framework.Rbac.Application.xml @@ -0,0 +1,296 @@ + + + + Yi.Framework.Rbac.Application + + + + + 效验图片登录验证码,无需和账号绑定 + + + + + 效验电话验证码,需要与电话号码绑定 + + + + + 登录 + + + + + + + 创建令牌 + + + + + + + 生成验证码 + + + + + + 验证电话号码 + + + + + + 注册 手机验证码 + + + + + + 注册,需要验证码通过 + + + + + + + 查询已登录的账户信息 + + + + + + 获取当前登录用户的前端路由 + + + + + + 退出登录 + + + + + + 更新密码 + + + + + + + 重置密码 + + + + + + + + 更新头像 + + + + + + + Config服务实现 + + + + + 多查 + + + + + + + Dept服务实现 + + + + + 通过角色id查询该角色全部部门 + + + + + + 多查 + + + + + + + Dictionary服务实现 + + + + + 查询 + + + + + 根据字典类型获取字典列表 + + + + + + + DictionaryType服务实现 + + + + + Menu服务实现 + + + + + 查询当前角色的菜单 + + + + + + + 动态条件获取当前在线用户 + + + + + + + 强制退出用户 + + + + + + + OperationLog服务实现 + + + + + Post服务实现 + + + + + Role服务实现 + + + + + 添加角色 + + + + + + + 修改角色 + + + + + + + + 更新状态 + + + + + + + + 获取角色下的用户 + + + + 是否在该角色下 + + + + + 批量给用户授权 + + + + + + + 批量取消授权 + + + + + + + 测试文档控制器 + + + + + 你好,多线程 + + + + + + User服务实现 + + + + + 查询用户 + + + + + + + 添加用户 + + + + + + + 单查 + + + + + + + 更新用户 + + + + + + + + 更新个人中心 + + + + + + + 更新状态 + + + + + + + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/YiFrameworkRbacApplicationModule.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/YiFrameworkRbacApplicationModule.cs new file mode 100644 index 00000000..18e5d2c7 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/YiFrameworkRbacApplicationModule.cs @@ -0,0 +1,35 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.BackgroundWorkers; +using Volo.Abp.BackgroundWorkers.Quartz; +using Volo.Abp.Modularity; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application.Contracts; +using Yi.Framework.Rbac.Application.Jobs; +using Yi.Framework.Rbac.Domain; + +namespace Yi.Framework.Rbac.Application +{ + [DependsOn( + typeof(YiFrameworkRbacApplicationContractsModule), + typeof(YiFrameworkRbacDomainModule), + + + typeof(YiFrameworkDddApplicationModule), + typeof(AbpBackgroundWorkersQuartzModule) + )] + public class YiFrameworkRbacApplicationModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var service = context.Services; + + service.AddCaptcha(); + } + + public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) + { + //await context.AddBackgroundWorkerAsync(); + } + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Caches/CaptchaPhoneCacheItem.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Caches/CaptchaPhoneCacheItem.cs new file mode 100644 index 00000000..c18432fa --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Caches/CaptchaPhoneCacheItem.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Yi.Framework.Rbac.Domain.Shared.Caches +{ + public class CaptchaPhoneCacheItem + { + public CaptchaPhoneCacheItem(string code) { Code = code; } + public string Code { get; set; } + } + + public class CaptchaPhoneCacheKey + { + public CaptchaPhoneCacheKey(string phone) { Phone = phone; } + + public string Phone { get; set; } + + public override string ToString() + { + return $"Yi:Phone:{Phone}"; + } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/DeptConst.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/DeptConst.cs similarity index 81% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/DeptConst.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/DeptConst.cs index f1d5fc9d..49344905 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/DeptConst.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/DeptConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Rbac.Consts +namespace Yi.Framework.Rbac.Domain.Shared.Consts { /// /// 常量定义 diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/MenuConst.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/MenuConst.cs similarity index 81% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/MenuConst.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/MenuConst.cs index a38f6d1d..77c687a9 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/MenuConst.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/MenuConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Rbac.Consts +namespace Yi.Framework.Rbac.Domain.Shared.Consts { /// /// 常量定义 diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/PostConst.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/PostConst.cs similarity index 81% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/PostConst.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/PostConst.cs index c281443f..900844e9 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/PostConst.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/PostConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Rbac.Consts +namespace Yi.Framework.Rbac.Domain.Shared.Consts { /// /// 常量定义 diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/RoleConst.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/RoleConst.cs similarity index 81% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/RoleConst.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/RoleConst.cs index 3b2a1e6b..99fe5602 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/RoleConst.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/RoleConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Rbac.Consts +namespace Yi.Framework.Rbac.Domain.Shared.Consts { /// /// 常量定义 diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Const/TokenTypeConst.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/TokenTypeConst.cs similarity index 84% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/Const/TokenTypeConst.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/TokenTypeConst.cs index a594aa5f..670c557d 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Const/TokenTypeConst.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/TokenTypeConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Infrastructure.Const +namespace Yi.Framework.Rbac.Domain.Shared.Consts { public class TokenTypeConst { @@ -14,7 +14,7 @@ namespace Yi.Framework.Infrastructure.Const public const string TenantId = nameof(TenantId); - public const string DeptId= nameof(DeptId); + public const string DeptId = nameof(DeptId); public const string Email = nameof(Email); diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/UserConst.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/UserConst.cs similarity index 95% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/UserConst.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/UserConst.cs index cbd71730..ded4e543 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Consts/UserConst.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/UserConst.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Rbac.Consts +namespace Yi.Framework.Rbac.Domain.Shared.Consts { /// /// 常量定义 diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Dtos/UserRoleMenuDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Dtos/UserRoleMenuDto.cs new file mode 100644 index 00000000..c4d067a2 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Dtos/UserRoleMenuDto.cs @@ -0,0 +1,290 @@ +using SqlSugar; +using Yi.Framework.Rbac.Domain.Shared.Enums; + +namespace Yi.Framework.Rbac.Domain.Shared.Dtos +{ + public class UserRoleMenuDto + { + public UserDto User { get; set; } = new(); + public HashSet Roles { get; set; } = new(); + public HashSet Menus { get; set; } = new(); + + public List RoleCodes { get; set; } = new(); + public List PermissionCodes { get; set; } = new(); + } + + public class UserDto + { + /// + /// 主键 + /// + public Guid Id { get; protected set; } + + /// + /// 逻辑删除 + /// + public bool IsDeleted { get; set; } + + /// + /// 姓名 + /// + public string? Name { get; set; } + + /// + /// 年龄 + /// + public int? Age { get; set; } + + /// + /// 用户名 + /// + public string UserName { get; set; } = string.Empty; + + /// + /// 密码 + /// + public string Password { get; set; } = string.Empty; + + /// + /// 加密盐值 + /// + public string Salt { get; set; } = string.Empty; + + /// + /// 头像 + /// + public string? Icon { get; set; } + + /// + /// 昵称 + /// + public string? Nick { get; set; } + + /// + /// 邮箱 + /// + public string? Email { get; set; } + + /// + /// Ip + /// + public string? Ip { get; set; } + + /// + /// 地址 + /// + + public string? Address { get; set; } + + /// + /// 电话 + /// + public long? Phone { get; set; } + + /// + /// 简介 + /// + public string? Introduction { get; set; } + + /// + /// 备注 + /// + public string? Remark { get; set; } + + /// + /// 性别 + /// + public SexEnum Sex { get; set; } = SexEnum.Unknown; + + /// + /// 部门id + /// + public Guid? DeptId { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreationTime { get; set; } = DateTime.Now; + + /// + /// 创建者 + /// + public Guid? CreatorId { get; set; } + + /// + /// 最后修改者 + /// + public Guid? LastModifierId { get; set; } + + /// + /// 最后修改时间 + /// + public DateTime? LastModificationTime { get; set; } + + /// + /// 排序 + /// + public int OrderNum { get; set; } = 0; + + + /// + /// 状态 + /// + public bool State { get; set; } = true; + } + public class RoleDto + { + public Guid Id { get; protected set; } + + /// + /// 逻辑删除 + /// + public bool IsDeleted { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreationTime { get; set; } = DateTime.Now; + + /// + /// 创建者 + /// + public Guid? CreatorId { get; set; } + + /// + /// 最后修改者 + /// + public Guid? LastModifierId { get; set; } + + /// + /// 最后修改时间 + /// + public DateTime? LastModificationTime { get; set; } + + /// + /// 排序 + /// + public int OrderNum { get; set; } = 0; + + + /// + /// 角色名 + /// + public string RoleName { get; set; } = string.Empty; + + /// + /// 角色编码 + /// + public string RoleCode { get; set; } = string.Empty; + + /// + /// 描述 + /// + public string? Remark { get; set; } + /// + /// 角色数据范围 + /// + public DataScopeEnum DataScope { get; set; } = DataScopeEnum.ALL; + + /// + /// 状态 + /// + public bool State { get; set; } = true; + + } + public class MenuDto + { + public Guid Id { get; protected set; } + + /// + /// 逻辑删除 + /// + public bool IsDeleted { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreationTime { get; set; } = DateTime.Now; + + /// + /// 创建者 + /// + public Guid? CreatorId { get; set; } + + /// + /// 最后修改者 + /// + public Guid? LastModifierId { get; set; } + + /// + /// 最后修改时间 + /// + public DateTime? LastModificationTime { get; set; } + + /// + /// 排序 + /// + public int OrderNum { get; set; } = 0; + + /// + /// 状态 + /// + public bool State { get; set; } + + /// + /// 菜单名 + /// + public string MenuName { get; set; } = string.Empty; + /// + /// + /// + public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu; + /// + /// + /// + public string? PermissionCode { get; set; } + /// + /// + /// + + public Guid ParentId { get; set; } + + /// + /// 菜单图标 + /// + + public string? MenuIcon { get; set; } + /// + /// 菜单组件路由 + /// + + public string? Router { get; set; } + /// + /// 是否为外部链接 + /// + + public bool IsLink { get; set; } + /// + /// 是否缓存 + /// + + public bool IsCache { get; set; } + /// + /// 是否显示 + /// + public bool IsShow { get; set; } = true; + + /// + /// 描述 + /// + public string? Remark { get; set; } + /// + /// 组件路径 + /// + public string? Component { get; set; } + /// + /// 路由参数 + /// + public string? Query { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Vue3RouterDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Dtos/Vue3RouterDto.cs similarity index 82% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Vue3RouterDto.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Dtos/Vue3RouterDto.cs index 09acbe9b..489eb84c 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Vue3RouterDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Dtos/Vue3RouterDto.cs @@ -1,12 +1,12 @@ using System.Collections.Generic; -using static Yi.Framework.Infrastructure.Helper.TreeHelper; +using static Yi.Framework.Core.Helper.TreeHelper; -namespace Yi.Furion.Core.Rbac.Dtos +namespace Yi.Framework.Rbac.Domain.Shared.Dtos { public class Vue3RouterDto : ITreeModel { - public long Id { get; set; } - public long ParentId { get; set; } + public Guid Id { get; set; } + public Guid ParentId { get; set; } public int OrderNum { get; set; } public string Name { get; set; } = string.Empty; diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/DataScopeEnum.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/DataScopeEnum.cs similarity index 84% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/DataScopeEnum.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/DataScopeEnum.cs index 346cb3c5..34b09feb 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/DataScopeEnum.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/DataScopeEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Rbac.Enums +namespace Yi.Framework.Rbac.Domain.Shared.Enums { public enum DataScopeEnum { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/JobTypeEnum.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/JobTypeEnum.cs similarity index 80% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/JobTypeEnum.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/JobTypeEnum.cs index b367f8e4..0c68abe8 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/JobTypeEnum.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/JobTypeEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Rbac.Enums +namespace Yi.Framework.Rbac.Domain.Shared.Enums { public enum JobTypeEnum { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/MenuTypeEnum.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/MenuTypeEnum.cs similarity index 84% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/MenuTypeEnum.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/MenuTypeEnum.cs index a7c4619b..377a6653 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/MenuTypeEnum.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/MenuTypeEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Rbac.Enums +namespace Yi.Framework.Rbac.Domain.Shared.Enums { public enum MenuTypeEnum { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/SexEnum.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/SexEnum.cs similarity index 90% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/SexEnum.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/SexEnum.cs index a47f8dd0..3a2512bd 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Enums/SexEnum.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Enums/SexEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Core.Rbac.Enums +namespace Yi.Framework.Rbac.Domain.Shared.Enums { /// /// 性别 diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Etos/LoginEventArgs.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Etos/LoginEventArgs.cs new file mode 100644 index 00000000..5fc10429 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Etos/LoginEventArgs.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SqlSugar; + +namespace Yi.Framework.Rbac.Domain.Shared.Etos +{ + public class LoginEventArgs + { + public Guid UserId { get; set; } + public string UserName { get; set; } + + public DateTime CreationTime { get; set; } + /// + /// 登录地点 + /// + public string? LoginLocation { get; set; } + /// + /// 登录Ip + /// + public string? LoginIp { get; set; } + /// + /// 浏览器 + /// + public string? Browser { get; set; } + /// + /// 操作系统 + /// + + public string? Os { get; set; } + /// + /// 登录信息 + /// + public string? LogMsg { get; set; } + } +} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperEnum.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/OperLog/OperEnum.cs similarity index 87% rename from Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperEnum.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/OperLog/OperEnum.cs index 583192e4..6d312e73 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperEnum.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/OperLog/OperEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Framework.Module.OperLogManager +namespace Yi.Framework.Rbac.Domain.Shared.OperLog { public enum OperEnum { diff --git a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperLogAttribute.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/OperLog/OperLogAttribute.cs similarity index 82% rename from Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperLogAttribute.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/OperLog/OperLogAttribute.cs index 3881f292..449e3e75 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperLogAttribute.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/OperLog/OperLogAttribute.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.OperLogManager +namespace Yi.Framework.Rbac.Domain.Shared.OperLog { [AttributeUsage(AttributeTargets.Method)] public class OperLogAttribute : Attribute diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Options/JwtOptions.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Options/JwtOptions.cs new file mode 100644 index 00000000..62127743 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Options/JwtOptions.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Yi.Framework.Rbac.Domain.Shared.Options +{ + public class JwtOptions + { + public string Issuer { get; set; } + + public string Audience { get; set; } + + public string SecurityKey { get; set; } + + public long ExpiresMinuteTime { get; set; } + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Yi.Framework.Rbac.Domain.Shared.csproj b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Yi.Framework.Rbac.Domain.Shared.csproj new file mode 100644 index 00000000..55a62557 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Yi.Framework.Rbac.Domain.Shared.csproj @@ -0,0 +1,23 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + + + + + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Yi.Framework.Rbac.Domain.Shared.xml b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Yi.Framework.Rbac.Domain.Shared.xml new file mode 100644 index 00000000..7158a262 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Yi.Framework.Rbac.Domain.Shared.xml @@ -0,0 +1,363 @@ + + + + Yi.Framework.Rbac.Domain.Shared + + + + + 常量定义 + + + + + 常量定义 + + + + + 常量定义 + + + + + 常量定义 + + + + + 常量定义 + + + + + 主键 + + + + + 逻辑删除 + + + + + 姓名 + + + + + 年龄 + + + + + 用户名 + + + + + 密码 + + + + + 加密盐值 + + + + + 头像 + + + + + 昵称 + + + + + 邮箱 + + + + + Ip + + + + + 地址 + + + + + 电话 + + + + + 简介 + + + + + 备注 + + + + + 性别 + + + + + 部门id + + + + + 创建时间 + + + + + 创建者 + + + + + 最后修改者 + + + + + 最后修改时间 + + + + + 排序 + + + + + 状态 + + + + + 逻辑删除 + + + + + 创建时间 + + + + + 创建者 + + + + + 最后修改者 + + + + + 最后修改时间 + + + + + 排序 + + + + + 角色名 + + + + + 角色编码 + + + + + 描述 + + + + + 角色数据范围 + + + + + 状态 + + + + + 逻辑删除 + + + + + 创建时间 + + + + + 创建者 + + + + + 最后修改者 + + + + + 最后修改时间 + + + + + 排序 + + + + + 状态 + + + + + 菜单名 + + + + + + + + + + + + + + + + + + + + 菜单图标 + + + + + 菜单组件路由 + + + + + 是否为外部链接 + + + + + 是否缓存 + + + + + 是否显示 + + + + + 描述 + + + + + 组件路径 + + + + + 路由参数 + + + + + 性别 + + + + + 男性 + + + + + 女性 + + + + + 未知 + + + + + 登录地点 + + + + + 登录Ip + + + + + 浏览器 + + + + + 操作系统 + + + + + 登录信息 + + + + + 操作类型 + + + + + 日志标题(模块) + + + + + 是否保存请求数据 + + + + + 是否保存返回数据 + + + + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/YiFrameworkRbacDomainSharedModule.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/YiFrameworkRbacDomainSharedModule.cs new file mode 100644 index 00000000..bccfbcfa --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/YiFrameworkRbacDomainSharedModule.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Domain; +using Volo.Abp.Modularity; +using Yi.Framework.Mapster; + +namespace Yi.Framework.Rbac.Domain.Shared +{ + [DependsOn(typeof(AbpDddDomainSharedModule), + typeof(YiFrameworkMapsterModule) + )] + public class YiFrameworkRbacDomainSharedModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/DefaultPermissionHandler.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/DefaultPermissionHandler.cs new file mode 100644 index 00000000..fc00b192 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/DefaultPermissionHandler.cs @@ -0,0 +1,36 @@ +using Microsoft.AspNetCore.Http; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Users; +using Yi.Framework.Core.Extensions; +using Yi.Framework.Rbac.Domain.Shared.Consts; + +namespace Yi.Framework.Rbac.Domain.Authorization +{ + public class DefaultPermissionHandler : IPermissionHandler, ITransientDependency + { + private ICurrentUser _currentUser { get; set; } + private IHttpContextAccessor _httpContextAccessor; + + public DefaultPermissionHandler(ICurrentUser currentUser, IHttpContextAccessor httpContextAccessor) + { + _currentUser = currentUser; + _httpContextAccessor = httpContextAccessor; + } + public bool IsPass(string permission) + { + var permissions = _httpContextAccessor.HttpContext.GetUserPermissions(TokenTypeConst.Permission); + if (permissions is not null) + { + if (permissions.Contains("*:*:*")) + { + return true; + } + + return permissions.Contains(permission); + + } + + return false; + } + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/IPermissionHandler.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/IPermissionHandler.cs new file mode 100644 index 00000000..e295afb5 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/IPermissionHandler.cs @@ -0,0 +1,7 @@ +namespace Yi.Framework.Rbac.Domain.Authorization +{ + public interface IPermissionHandler + { + bool IsPass(string permission); + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/PermissionAttribute.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/PermissionAttribute.cs new file mode 100644 index 00000000..6fd0a8b0 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/PermissionAttribute.cs @@ -0,0 +1,16 @@ +namespace Yi.Framework.Rbac.Domain.Authorization +{ + [AttributeUsage(AttributeTargets.Method)] + + public class PermissionAttribute : Attribute + { + internal string Code { get; set; } + + public PermissionAttribute(string code) + { + Code = code; + } + + + } +} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/PermissionGlobalAttribute.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/PermissionGlobalAttribute.cs similarity index 54% rename from Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/PermissionGlobalAttribute.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/PermissionGlobalAttribute.cs index fee93b3d..6183629d 100644 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/PermissionGlobalAttribute.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Authorization/PermissionGlobalAttribute.cs @@ -1,17 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using Microsoft.AspNetCore.Http.HttpResults; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; -using Yi.Framework.Infrastructure.Attributes; -using Yi.Framework.Infrastructure.Auth; -using Yi.Framework.Infrastructure.Exceptions; +using Volo.Abp; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http; +using Yi.Framework.Core.Helper; +using static System.Runtime.InteropServices.JavaScript.JSType; -namespace Yi.Framework.Infrastructure.AspNetCore +namespace Yi.Framework.Rbac.Domain.Authorization { - internal class PermissionGlobalAttribute : ActionFilterAttribute + internal class PermissionGlobalAttribute : ActionFilterAttribute, ITransientDependency { private readonly IPermissionHandler _permissionHandler; public PermissionGlobalAttribute(IPermissionHandler permissionHandler) @@ -30,7 +29,19 @@ namespace Yi.Framework.Infrastructure.AspNetCore if (!result) { - throw new AuthException(message: $"您无权限访问该接口-{context.HttpContext.Request.Path.Value}"); + var model = new RemoteServiceErrorInfo() + { + Code = "403", + Message = $"您无权限访问,请联系管理员申请", + Details = $"您无权限访问该接口-{context.HttpContext.Request.Path.Value}", + }; + + var content = new ObjectResult(new { error = model }) + { + StatusCode = 403 + }; + context.Result = content; + return; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/ConfigEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/ConfigEntity.cs similarity index 77% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/ConfigEntity.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/ConfigEntity.cs index d93436fc..0a6217e0 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/ConfigEntity.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/ConfigEntity.cs @@ -1,18 +1,19 @@ using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Core; -namespace Yi.Furion.Core.Rbac.Entities +namespace Yi.Framework.Rbac.Domain.Entities { /// /// 配置表 /// [SugarTable("Config")] - public class ConfigEntity : IEntity, IAuditedObject, IOrderNum, ISoftDelete + public class ConfigEntity : Entity, IAuditedObject, IOrderNum, ISoftDelete { [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] - public long Id { get; set; } + public override Guid Id { get; protected set; } /// /// 配置名称 /// @@ -34,7 +35,6 @@ namespace Yi.Furion.Core.Rbac.Entities [SugarColumn(ColumnName = "ConfigType")] public string? ConfigType { get; set; } - /// /// 排序字段 /// @@ -49,9 +49,9 @@ namespace Yi.Furion.Core.Rbac.Entities public DateTime CreationTime { get; set; } - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } - public long? LastModifierId { get; set; } + public Guid? LastModifierId { get; set; } public DateTime? LastModificationTime { get; set; } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/DeptEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/DeptEntity.cs similarity index 71% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/DeptEntity.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/DeptEntity.cs index e593c928..b8c88946 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/DeptEntity.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/DeptEntity.cs @@ -1,25 +1,29 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json.Serialization; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Core; -namespace Yi.Furion.Core.Rbac.Entities +namespace Yi.Framework.Rbac.Domain.Entities { /// /// 部门表 /// [SugarTable("Dept")] - public partial class DeptEntity : IEntity, ISoftDelete, IAuditedObject, IOrderNum, IState + public class DeptEntity : Entity, ISoftDelete, IAuditedObject, IOrderNum, IState { + public DeptEntity() + { + } + + public DeptEntity(Guid Id) { this.Id = Id; ParentId = Guid.Empty; } + + public DeptEntity(Guid Id, Guid parentId) { this.Id = Id; ParentId = parentId; } /// /// 主键 /// [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + public override Guid Id { get; protected set; } /// /// 逻辑删除 @@ -34,12 +38,12 @@ namespace Yi.Furion.Core.Rbac.Entities /// /// 创建者 /// - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } /// /// 最后修改者 /// - public long? LastModifierId { get; set; } + public Guid? LastModifierId { get; set; } /// /// 最后修改时间 @@ -74,12 +78,13 @@ namespace Yi.Furion.Core.Rbac.Entities /// 父级id /// [SugarColumn(ColumnName = "ParentId")] - public long ParentId { get; set; } + public Guid ParentId { get; set; } /// /// 描述 /// [SugarColumn(ColumnName = "Remark")] public string? Remark { get; set; } + } } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Entities/DictionaryEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/DictionaryEntity.cs similarity index 78% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Entities/DictionaryEntity.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/DictionaryEntity.cs index dfba464e..70ac3f1e 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Entities/DictionaryEntity.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/DictionaryEntity.cs @@ -1,18 +1,19 @@ using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Core; -namespace Yi.Framework.Module.DictionaryManager.Entities +namespace Yi.Framework.Rbac.Domain.Entities { [SugarTable("Dictionary")] - public class DictionaryEntity : AuditedObject, IEntity, ISoftDelete, IOrderNum, IState + public class DictionaryEntity : Entity, IAuditedObject, ISoftDelete, IOrderNum, IState { /// /// 主键 /// [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + public override Guid Id { get; protected set; } /// @@ -67,5 +68,12 @@ namespace Yi.Framework.Module.DictionaryManager.Entities [SugarColumn(ColumnName = "IsDefault")] public bool IsDefault { get; set; } + public DateTime CreationTime { get; set; } + + public Guid? CreatorId { get; set; } + + public Guid? LastModifierId { get; set; } + + public DateTime? LastModificationTime { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Entities/DictionaryTypeEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/DictionaryTypeEntity.cs similarity index 67% rename from Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Entities/DictionaryTypeEntity.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/DictionaryTypeEntity.cs index 19997d0a..dc09328b 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Entities/DictionaryTypeEntity.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/DictionaryTypeEntity.cs @@ -1,18 +1,19 @@ using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Core; -namespace Yi.Framework.Module.DictionaryManager.Entities +namespace Yi.Framework.Rbac.Domain.Entities { [SugarTable("DictionaryType")] - public class DictionaryTypeEntity : AuditedObject, IEntity, ISoftDelete, IOrderNum + public class DictionaryTypeEntity : Entity, IAuditedObject, ISoftDelete, IOrderNum { /// /// 主键 /// [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + public override Guid Id { get; protected set; } /// /// 逻辑删除 @@ -46,5 +47,13 @@ namespace Yi.Framework.Module.DictionaryManager.Entities /// [SugarColumn(ColumnName = "Remark")] public string? Remark { get; set; } + + public DateTime CreationTime { get; set; } + + public Guid? CreatorId { get; set; } + + public Guid? LastModifierId { get; set; } + + public DateTime? LastModificationTime { get; set; } } } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/LoginLogEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/LoginLogEntity.cs new file mode 100644 index 00000000..466b54ef --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/LoginLogEntity.cs @@ -0,0 +1,83 @@ +using IPTools.Core; +using Microsoft.AspNetCore.Http; +using SqlSugar; +using UAParser; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Core.Extensions; + +namespace Yi.Framework.Rbac.Domain.Entities +{ + [SugarTable("LoginLog")] + public class LoginLogEntity : Entity, ICreationAuditedObject + { + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + public DateTime CreationTime { get; set; } + + /// + /// 登录用户 + /// + [SugarColumn(ColumnName = "LoginUser")] + public string? LoginUser { get; set; } + /// + /// 登录地点 + /// + [SugarColumn(ColumnName = "LoginLocation")] + public string? LoginLocation { get; set; } + /// + /// 登录Ip + /// + [SugarColumn(ColumnName = "LoginIp")] + public string? LoginIp { get; set; } + /// + /// 浏览器 + /// + [SugarColumn(ColumnName = "Browser")] + public string? Browser { get; set; } + /// + /// 操作系统 + /// + [SugarColumn(ColumnName = "Os")] + public string? Os { get; set; } + /// + /// 登录信息 + /// + [SugarColumn(ColumnName = "LogMsg")] + public string? LogMsg { get; set; } + + public Guid? CreatorId { get; set; } + + + public LoginLogEntity GetInfoByHttpContext(HttpContext context) + { + ClientInfo GetClientInfo(HttpContext context) + { + var str = context.GetUserAgent(); + var uaParser = Parser.GetDefault(); + ClientInfo c = uaParser.Parse(str); + return c; + } + var ipAddr = context.GetClientIp(); + IpInfo location; + if (ipAddr == "127.0.0.1") + { + location = new IpInfo() { Province = "本地", City = "本机" }; + } + else + { + location = IpTool.Search(ipAddr); + } + ClientInfo clientInfo = GetClientInfo(context); + LoginLogEntity entity = new() + { + Browser = clientInfo.Device.Family, + Os = clientInfo.OS.ToString(), + LoginIp = ipAddr, + LoginLocation = location.Province + "-" + location.City + }; + return entity; + } + } + +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/MenuEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/MenuEntity.cs similarity index 86% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/MenuEntity.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/MenuEntity.cs index d41e0b5a..9dbdb1d2 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/MenuEntity.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/MenuEntity.cs @@ -1,27 +1,29 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Rbac.Dtos; -using Yi.Furion.Core.Rbac.Enums; +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Core; +using Yi.Framework.Core.Helper; +using Yi.Framework.Rbac.Domain.Shared.Dtos; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Entities +namespace Yi.Framework.Rbac.Domain.Entities { /// /// 菜单表 /// [SugarTable("Menu")] - public partial class MenuEntity : IEntity, ISoftDelete, IAuditedObject, IOrderNum, IState + public partial class MenuEntity : Entity, ISoftDelete, IAuditedObject, IOrderNum, IState { + public MenuEntity() { } + + public MenuEntity(Guid id) { Id = id; ParentId = Guid.Empty; } + public MenuEntity(Guid id, Guid parentId) { Id = id; ParentId = parentId; } /// /// 主键 /// [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + public override Guid Id { get; protected set; } /// /// 逻辑删除 @@ -36,12 +38,12 @@ namespace Yi.Furion.Core.Rbac.Entities /// /// 创建者 /// - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } /// /// 最后修改者 /// - public long? LastModifierId { get; set; } + public Guid? LastModifierId { get; set; } /// /// 最后修改时间 @@ -76,7 +78,7 @@ namespace Yi.Furion.Core.Rbac.Entities /// /// [SugarColumn(ColumnName = "ParentId")] - public long ParentId { get; set; } + public Guid ParentId { get; set; } /// /// 菜单图标 @@ -122,6 +124,7 @@ namespace Yi.Furion.Core.Rbac.Entities [SugarColumn(IsIgnore = true)] public List? Children { get; set; } + } /// @@ -159,7 +162,7 @@ namespace Yi.Furion.Core.Rbac.Entities r.AlwaysShow = true; //判断是否为最顶层的路由 - if (0 == m.ParentId) + if (Guid.Empty == m.ParentId) { r.Component = "Layout"; } diff --git a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/OperationLogEntity.cs similarity index 82% rename from Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogEntity.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/OperationLogEntity.cs index 800a50cc..4cfec002 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogEntity.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/OperationLogEntity.cs @@ -1,17 +1,18 @@ using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Ddd.Entities; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Rbac.Domain.Shared.OperLog; -namespace Yi.Framework.Module.OperLogManager +namespace Yi.Framework.Rbac.Domain.Entities { /// /// 操作日志表 /// [SugarTable("OperationLog")] - public class OperationLogEntity : IEntity, ICreationAuditedObject + public class OperationLogEntity : Entity, ICreationAuditedObject { - [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] - public long Id { get; set; } + [SugarColumn(IsPrimaryKey = true)] + public override Guid Id { get; protected set; } /// /// 操作模块 /// @@ -60,6 +61,6 @@ namespace Yi.Framework.Module.OperLogManager public DateTime CreationTime { get; set; } - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } } } diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/PostEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/PostEntity.cs similarity index 76% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/PostEntity.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/PostEntity.cs index 7e04e9a4..e2c3fbb0 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/PostEntity.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/PostEntity.cs @@ -1,23 +1,23 @@ -using System; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Core; -namespace Yi.Furion.Core.Rbac.Entities +namespace Yi.Framework.Rbac.Domain.Entities { /// /// 岗位表 /// [SugarTable("Post")] - public partial class PostEntity : IEntity, ISoftDelete, IAuditedObject, IOrderNum, IState + public partial class PostEntity : Entity, ISoftDelete, IAuditedObject, IOrderNum, IState { /// /// 主键 /// [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + public override Guid Id { get; protected set; } /// /// 逻辑删除 @@ -32,12 +32,12 @@ namespace Yi.Furion.Core.Rbac.Entities /// /// 创建者 /// - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } /// /// 最后修改者 /// - public long? LastModifierId { get; set; } + public Guid? LastModifierId { get; set; } /// /// 最后修改时间 diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/RoleDeptEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/RoleDeptEntity.cs new file mode 100644 index 00000000..52720653 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/RoleDeptEntity.cs @@ -0,0 +1,30 @@ +using SqlSugar; +using Volo.Abp.Domain.Entities; + +namespace Yi.Framework.Rbac.Domain.Entities; + +/// +/// 角色部门关系表 +/// +[SugarTable("RoleDept")] +public partial class RoleDeptEntity : Entity +{ + /// + /// 主键 + /// + [SugarColumn(IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + + /// + /// 角色id + /// + [SugarColumn(ColumnName = "RoleId")] + public Guid RoleId { get; set; } + /// + /// 部门id + /// + [SugarColumn(ColumnName = "DeptId")] + public Guid DeptId { get; set; } + + +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/RoleEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/RoleEntity.cs similarity index 79% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/RoleEntity.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/RoleEntity.cs index c8ea347f..da2e70ed 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/RoleEntity.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/RoleEntity.cs @@ -1,24 +1,23 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Furion.Core.Rbac.Enums; +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Core; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Entities +namespace Yi.Framework.Rbac.Domain.Entities { /// /// 角色表 /// [SugarTable("Role")] - public class RoleEntity : IEntity, ISoftDelete, IAuditedObject, IOrderNum, IState + public class RoleEntity : Entity, ISoftDelete, IAuditedObject, IOrderNum, IState { /// /// 主键 /// [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + public override Guid Id { get; protected set; } /// /// 逻辑删除 @@ -33,12 +32,12 @@ namespace Yi.Furion.Core.Rbac.Entities /// /// 创建者 /// - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } /// /// 最后修改者 /// - public long? LastModifierId { get; set; } + public Guid? LastModifierId { get; set; } /// /// 最后修改时间 diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/RoleMenuEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/RoleMenuEntity.cs new file mode 100644 index 00000000..9f0fde80 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/RoleMenuEntity.cs @@ -0,0 +1,28 @@ +using SqlSugar; +using Volo.Abp.Domain.Entities; + +namespace Yi.Framework.Rbac.Domain.Entities; +/// +/// 角色菜单关系表 +/// +[SugarTable("RoleMenu")] +public partial class RoleMenuEntity : Entity + +{ + /// + /// 主键 + /// + [SugarColumn(IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + /// + /// + /// + [SugarColumn(ColumnName = "RoleId")] + public Guid RoleId { get; set; } + /// + /// + /// + [SugarColumn(ColumnName = "MenuId")] + public Guid MenuId { get; set; } + +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/StudentEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/StudentEntity.cs new file mode 100644 index 00000000..d0f75f19 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/StudentEntity.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Domain.Entities; + +namespace Yi.Framework.Rbac.Domain.Entities +{ + public class StudentEntity : Entity + { + + [SqlSugar.SugarColumn(IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + public string Name { get; set; } + + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/UserEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/UserEntity.cs similarity index 87% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/UserEntity.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/UserEntity.cs index 5f033f1f..01a038de 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/UserEntity.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/UserEntity.cs @@ -1,19 +1,18 @@ -using System; -using System.Collections.Generic; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Rbac.Enums; +using SqlSugar; +using Volo.Abp; +using Volo.Abp.Auditing; +using Volo.Abp.Domain.Entities; +using Yi.Framework.Core; +using Yi.Framework.Core.Helper; +using Yi.Framework.Rbac.Domain.Shared.Enums; -namespace Yi.Furion.Core.Rbac.Entities +namespace Yi.Framework.Rbac.Domain.Entities { /// /// 用户表 /// [SugarTable("User")] - public class UserEntity : IEntity, ISoftDelete, IAuditedObject, IOrderNum, IState + public class UserEntity : Entity, ISoftDelete, IAuditedObject, IOrderNum, IState { public UserEntity() { @@ -21,7 +20,6 @@ namespace Yi.Furion.Core.Rbac.Entities } public UserEntity(string userName, string password, long phone, string nick = "萌新") { - Id = SnowflakeHelper.NextId; UserName = userName; Password = password; Phone = phone; @@ -33,7 +31,7 @@ namespace Yi.Furion.Core.Rbac.Entities /// 主键 /// [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + public override Guid Id { get; protected set; } /// /// 逻辑删除 @@ -114,7 +112,7 @@ namespace Yi.Furion.Core.Rbac.Entities /// /// 部门id /// - public long? DeptId { get; set; } + public Guid? DeptId { get; set; } /// /// 创建时间 @@ -124,12 +122,12 @@ namespace Yi.Furion.Core.Rbac.Entities /// /// 创建者 /// - public long? CreatorId { get; set; } + public Guid? CreatorId { get; set; } /// /// 最后修改者 /// - public long? LastModifierId { get; set; } + public Guid? LastModifierId { get; set; } /// /// 最后修改时间 @@ -166,7 +164,7 @@ namespace Yi.Furion.Core.Rbac.Entities /// [Navigate(NavigateType.OneToOne, nameof(DeptId))] - public DeptEntity Dept { get; set; } + public DeptEntity? Dept { get; set; } /// /// 构建密码,MD5盐值加密 diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/UserPostEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/UserPostEntity.cs new file mode 100644 index 00000000..2c516816 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/UserPostEntity.cs @@ -0,0 +1,27 @@ +using SqlSugar; +using Volo.Abp.Domain.Entities; + +namespace Yi.Framework.Rbac.Domain.Entities; +/// +/// 用户岗位表 +/// +[SugarTable("UserPost")] +public partial class UserPostEntity : Entity +{ + /// + /// 主键 + /// + [SugarColumn(IsPrimaryKey = true)] + public override Guid Id { get; protected set; } + /// + /// 用户id + /// + [SugarColumn(ColumnName = "UserId")] + public Guid UserId { get; set; } + /// + /// 岗位id + /// + [SugarColumn(ColumnName = "PostId")] + public Guid PostId { get; set; } + +} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/UserRoleEntity.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/UserRoleEntity.cs similarity index 50% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/UserRoleEntity.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/UserRoleEntity.cs index ab802cb5..f2482625 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/UserRoleEntity.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/UserRoleEntity.cs @@ -1,31 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Entities; +using SqlSugar; +using Volo.Abp.Domain.Entities; -namespace Yi.Furion.Core.Rbac.Entities +namespace Yi.Framework.Rbac.Domain.Entities { /// /// 用户角色关系表 /// [SugarTable("UserRole")] - public partial class UserRoleEntity : IEntity + public partial class UserRoleEntity : Entity { /// /// 主键 /// [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } + public override Guid Id { get; protected set; } /// /// 角色id /// - public long RoleId { get; set; } + public Guid RoleId { get; set; } /// /// 用户id /// - public long UserId { get; set; } + public Guid UserId { get; set; } } } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/EventHandlers/StudentEventHandler.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/EventHandlers/StudentEventHandler.cs new file mode 100644 index 00000000..4ded4f5d --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/EventHandlers/StudentEventHandler.cs @@ -0,0 +1,16 @@ +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Entities.Events; +using Volo.Abp.EventBus; +using Yi.Framework.Rbac.Domain.Entities; + +namespace Yi.Framework.Rbac.Domain.EventHandlers +{ + public class StudentEventHandler : ILocalEventHandler>, ITransientDependency + { + public Task HandleEventAsync(EntityCreatedEventData eventData) + { + Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(eventData.Entity)); + return Task.CompletedTask; + } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Domain/AccountManager.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/AccountManager.cs similarity index 77% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/Domain/AccountManager.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/AccountManager.cs index cdf54217..b3bf4e21 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Domain/AccountManager.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/AccountManager.cs @@ -1,21 +1,23 @@ -using Yi.Framework.Infrastructure.Const; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Exceptions; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Rbac.Consts; -using Yi.Furion.Core.Rbac.Dtos; -using Yi.Furion.Core.Rbac.Entities; +using Volo.Abp; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Services; +using Volo.Abp.Security.Claims; +using Yi.Framework.Core.Helper; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Shared.Consts; +using Yi.Framework.Rbac.Domain.Shared.Dtos; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Rbac.Domain +namespace Yi.Framework.Rbac.Domain.Managers { /// /// 用户领域服务 /// - public class AccountManager : ITransient + public class AccountManager : DomainService { - private readonly IRepository _repository; - public AccountManager(IRepository repository) + private readonly ISqlSugarRepository _repository; + public AccountManager(ISqlSugarRepository repository) { _repository = repository; } @@ -74,19 +76,19 @@ namespace Yi.Furion.Application.Rbac.Domain public Dictionary UserInfoToClaim(UserRoleMenuDto dto) { var claims = new Dictionary(); - claims.Add(TokenTypeConst.Id, dto.User.Id); - claims.Add(TokenTypeConst.UserName, dto.User.UserName); + claims.Add(AbpClaimTypes.UserId, dto.User.Id); + claims.Add(AbpClaimTypes.UserName, dto.User.UserName); if (dto.User.DeptId is not null) { claims.Add(TokenTypeConst.DeptId, dto.User.DeptId); } if (dto.User.Email is not null) { - claims.Add(TokenTypeConst.Email, dto.User.Email); + claims.Add(AbpClaimTypes.Email, dto.User.Email); } if (dto.User.Phone is not null) { - claims.Add(TokenTypeConst.PhoneNumber, dto.User.Phone); + claims.Add(AbpClaimTypes.PhoneNumber, dto.User.Phone); } if (UserConst.Admin.Equals(dto.User.UserName)) { @@ -96,7 +98,7 @@ namespace Yi.Furion.Application.Rbac.Domain else { claims.Add(TokenTypeConst.Permission, dto.PermissionCodes.Where(x => !string.IsNullOrEmpty(x))); - claims.Add(TokenTypeConst.Roles, dto.RoleCodes.Where(x => !string.IsNullOrEmpty(x))); + claims.Add(AbpClaimTypes.Role, dto.RoleCodes.Where(x => !string.IsNullOrEmpty(x))); } return claims; @@ -110,7 +112,7 @@ namespace Yi.Furion.Application.Rbac.Domain /// /// /// - public async Task UpdatePasswordAsync(long userId, string newPassword, string oldPassword) + public async Task UpdatePasswordAsync(Guid userId, string newPassword, string oldPassword) { var user = await _repository.GetByIdAsync(userId); @@ -129,15 +131,13 @@ namespace Yi.Furion.Application.Rbac.Domain /// /// /// - public async Task RestPasswordAsync(long userId, string password) + public async Task RestPasswordAsync(Guid userId, string password) { var user = await _repository.GetByIdAsync(userId); - user.Id = userId; + EntityHelper.TrySetId(user, () => GuidGenerator.Create(), true); user.Password = password; user.BuildPassword(); return await _repository.UpdateAsync(user); - - } } diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Domain/RoleManager.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/RoleManager.cs similarity index 57% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/Domain/RoleManager.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/RoleManager.cs index b7e46ca5..878777f6 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Domain/RoleManager.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/RoleManager.cs @@ -1,14 +1,14 @@ -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Rbac.Entities; +using Volo.Abp.Domain.Services; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Rbac.Domain +namespace Yi.Framework.Rbac.Domain.Managers { - public class RoleManager : ITransient + public class RoleManager : DomainService { - private IRepository _repository; - private IRepository _roleMenuRepository; - public RoleManager(IRepository repository, IRepository roleMenuRepository) + private ISqlSugarRepository _repository; + private ISqlSugarRepository _roleMenuRepository; + public RoleManager(ISqlSugarRepository repository, ISqlSugarRepository roleMenuRepository) { _repository = repository; _roleMenuRepository = roleMenuRepository; @@ -20,7 +20,7 @@ namespace Yi.Furion.Application.Rbac.Domain /// /// /// - public async Task GiveRoleSetMenuAsync(List roleIds, List menuIds) + public async Task GiveRoleSetMenuAsync(List roleIds, List menuIds) { //这个是需要事务的,在service中进行工作单元 await _roleMenuRepository.DeleteAsync(u => roleIds.Contains(u.RoleId)); @@ -31,7 +31,7 @@ namespace Yi.Furion.Application.Rbac.Domain List roleMenuEntity = new(); foreach (var menu in menuIds) { - roleMenuEntity.Add(new RoleMenuEntity() { Id = SnowflakeHelper.NextId, RoleId = roleId, MenuId = menu }); + roleMenuEntity.Add(new RoleMenuEntity() { RoleId = roleId, MenuId = menu }); } //一次性批量添加 await _roleMenuRepository.InsertRangeAsync(roleMenuEntity); diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Domain/UserManager.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/UserManager.cs similarity index 65% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/Domain/UserManager.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/UserManager.cs index 1daa800c..d06af771 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Domain/UserManager.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/UserManager.cs @@ -1,17 +1,20 @@ -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Rbac.Entities; +using Volo.Abp.Domain.Services; +using Volo.Abp.Guids; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Application.Rbac.Domain +namespace Yi.Framework.Rbac.Domain.Managers { - public class UserManager : ITransient + public class UserManager : DomainService { - private readonly IRepository _repository; - private readonly IRepository _repositoryUserRole; - private readonly IRepository _repositoryUserPost; - public UserManager(IRepository repository, IRepository repositoryUserRole, IRepository repositoryUserPost) => - (_repository, _repositoryUserRole, _repositoryUserPost) = - (repository, repositoryUserRole, repositoryUserPost); + private readonly ISqlSugarRepository _repository; + private readonly ISqlSugarRepository _repositoryUserRole; + private readonly ISqlSugarRepository _repositoryUserPost; + + private readonly IGuidGenerator _guidGenerator; + public UserManager(ISqlSugarRepository repository, ISqlSugarRepository repositoryUserRole, ISqlSugarRepository repositoryUserPost, IGuidGenerator guidGenerator) => + (_repository, _repositoryUserRole, _repositoryUserPost, _guidGenerator) = + (repository, repositoryUserRole, repositoryUserPost, guidGenerator); /// /// 给用户设置角色 @@ -19,7 +22,7 @@ namespace Yi.Furion.Application.Rbac.Domain /// /// /// - public async Task GiveUserSetRoleAsync(List userIds, List roleIds) + public async Task GiveUserSetRoleAsync(List userIds, List roleIds) { //删除用户之前所有的用户角色关系(物理删除,没有恢复的必要) await _repositoryUserRole.DeleteAsync(u => userIds.Contains(u.UserId)); @@ -34,7 +37,7 @@ namespace Yi.Furion.Application.Rbac.Domain foreach (var roleId in roleIds) { - userRoleEntities.Add(new UserRoleEntity() { Id = SnowflakeHelper.NextId, UserId = userId, RoleId = roleId }); + userRoleEntities.Add(new UserRoleEntity() { UserId = userId, RoleId = roleId }); } //一次性批量添加 await _repositoryUserRole.InsertRangeAsync(userRoleEntities); @@ -49,7 +52,7 @@ namespace Yi.Furion.Application.Rbac.Domain /// /// /// - public async Task GiveUserSetPostAsync(List userIds, List postIds) + public async Task GiveUserSetPostAsync(List userIds, List postIds) { //删除用户之前所有的用户角色关系(物理删除,没有恢复的必要) await _repositoryUserPost.DeleteAsync(u => userIds.Contains(u.UserId)); @@ -62,7 +65,7 @@ namespace Yi.Furion.Application.Rbac.Domain List userPostEntities = new(); foreach (var post in postIds) { - userPostEntities.Add(new UserPostEntity() { Id = SnowflakeHelper.NextId, UserId = userId, PostId = post }); + userPostEntities.Add(new UserPostEntity() { UserId = userId, PostId = post }); } //一次性批量添加 diff --git a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/GlobalOperLogAttribute.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Operlog/OperLogGlobalAttribute.cs similarity index 83% rename from Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/GlobalOperLogAttribute.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Operlog/OperLogGlobalAttribute.cs index ab32bff3..921a099b 100644 --- a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/GlobalOperLogAttribute.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Operlog/OperLogGlobalAttribute.cs @@ -3,20 +3,23 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Logging; -using Yi.Framework.Infrastructure.AspNetCore; -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Users; +using Yi.Framework.Core.Extensions; +using Yi.Framework.Core.Helper; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Shared.OperLog; -namespace Yi.Framework.Module.OperLogManager +namespace Yi.Framework.Rbac.Domain.Operlog { - public class GlobalOperLogAttribute : ActionFilterAttribute + public class OperLogGlobalAttribute : ActionFilterAttribute,ITransientDependency { - private ILogger _logger; + private ILogger _logger; private IRepository _repository; private ICurrentUser _currentUser; //注入一个日志服务 - public GlobalOperLogAttribute(ILogger logger, IRepository repository, ICurrentUser currentUser) + public OperLogGlobalAttribute(ILogger logger, IRepository repository, ICurrentUser currentUser) { _logger = logger; _repository = repository; @@ -39,7 +42,6 @@ namespace Yi.Framework.Module.OperLogManager ////获取方法名 //string action = context.RouteData.Values["Action"].ToString(); - //获取Ip string ip = context.HttpContext.GetClientIp(); @@ -51,7 +53,6 @@ namespace Yi.Framework.Module.OperLogManager //日志服务插入一条操作记录即可 var logEntity = new OperationLogEntity(); - logEntity.Id = SnowflakeHelper.NextId; logEntity.OperIp = ip; //logEntity.OperLocation = location; logEntity.OperType = operLogAttribute.OperType; @@ -59,8 +60,6 @@ namespace Yi.Framework.Module.OperLogManager logEntity.RequestMethod = context.HttpContext.Request.Method; logEntity.Method = context.HttpContext.Request.Path.Value; logEntity.OperLocation = location; - - logEntity.OperUser = _currentUser.UserName; if (operLogAttribute.IsSaveResponseData) { @@ -82,7 +81,7 @@ namespace Yi.Framework.Module.OperLogManager if (operLogAttribute.IsSaveRequestData) { - //logEntity.RequestParam = context.HttpContext.GetRequestValue(logEntity.RequestMethod); + // logEntity.RequestParam = context.HttpContext.GetRequestValue(logEntity.RequestMethod); } await _repository.InsertAsync(logEntity); diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Repositories/IDeptRepository.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Repositories/IDeptRepository.cs new file mode 100644 index 00000000..40b0891e --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Repositories/IDeptRepository.cs @@ -0,0 +1,11 @@ +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Rbac.Domain.Repositories +{ + public interface IDeptRepository : ISqlSugarRepository + { + Task> GetChildListAsync(Guid deptId); + Task> GetListRoleIdAsync(Guid roleId); + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Repositories/IUserRepository.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Repositories/IUserRepository.cs new file mode 100644 index 00000000..18662ad3 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Repositories/IUserRepository.cs @@ -0,0 +1,18 @@ +using Volo.Abp.Domain.Repositories; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Shared.Dtos; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Rbac.Domain.Repositories +{ + public interface IUserRepository : ISqlSugarRepository + { + /// + /// 获取当前登录用户的所有信息 + /// + /// + /// + Task GetUserAllInfoAsync(Guid userId); + + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/SignalRHub/Model/OnlineUserModel.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/SignalRHubs/Model/OnlineUserModel.cs similarity index 58% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/SignalRHub/Model/OnlineUserModel.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/SignalRHubs/Model/OnlineUserModel.cs index 4557e02f..97158463 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/SignalRHub/Model/OnlineUserModel.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/SignalRHubs/Model/OnlineUserModel.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.Furion.Application.Rbac.SignalRHub.Model +namespace Yi.Framework.Rbac.Domain.SignalRHubs.Model { public class OnlineUserModel { @@ -20,18 +20,18 @@ namespace Yi.Furion.Application.Rbac.SignalRHub.Model /// /// 客户端连接Id /// - public string ConnnectionId { get; } + public string? ConnnectionId { get; } /// /// 用户id /// public long? UserId { get; set; } - public string UserName { get; set; } - public DateTime? LoginTime { get; set; } - public string Ipaddr { get; set; } - public string LoginLocation { get; set; } + public string? UserName { get; set; } + public DateTime LoginTime { get; set; } + public string? Ipaddr { get; set; } + public string? LoginLocation { get; set; } - public string Os { get; set; } - public string Browser { get; set; } + public string? Os { get; set; } + public string? Browser { get; set; } } diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/SignalRHub/OnlineUserHub.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/SignalRHubs/OnlineUserHub.cs similarity index 71% rename from Yi.Furion.Net6/Yi.Furion.Application/Rbac/SignalRHub/OnlineUserHub.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/SignalRHubs/OnlineUserHub.cs index ad04b7bb..21422543 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/SignalRHub/OnlineUserHub.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/SignalRHubs/OnlineUserHub.cs @@ -1,33 +1,25 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using IPTools.Core; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.Logging; -using UAParser; -using Yi.Framework.Infrastructure.AspNetCore; -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Furion.Application.Rbac.SignalRHub.Model; -using Yi.Furion.Core.Rbac.Entities; +using Volo.Abp.AspNetCore.SignalR; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.SignalRHubs.Model; -namespace Yi.Furion.Application.Rbac.SignalRHub +namespace Yi.Framework.Rbac.Domain.SignalRHubs { - public class OnlineUserHub : Hub + [HubRoute("/hub/main")] + [Authorize] + public class OnlineUserHub : AbpHub { public static readonly List clientUsers = new(); - private HttpContext _httpContext; - private ILogger _logger; - private ICurrentUser _currentUser; - public OnlineUserHub(IHttpContextAccessor httpContextAccessor, ILogger logger, ICurrentUser currentUser) + private HttpContext? _httpContext; + private ILogger _logger=> LoggerFactory.CreateLogger(); + public OnlineUserHub(IHttpContextAccessor httpContextAccessor) { - _httpContext = httpContextAccessor.HttpContext; - _logger = logger; - _currentUser = currentUser; + _httpContext = httpContextAccessor?.HttpContext; } @@ -38,9 +30,9 @@ namespace Yi.Furion.Application.Rbac.SignalRHub /// public override Task OnConnectedAsync() { - var name = _currentUser.UserName; - var loginUser = _httpContext.GetLoginLogInfo(); - var user = clientUsers.Any(u => u.ConnnectionId == Context.ConnectionId); + var name = CurrentUser.UserName; + var loginUser = new LoginLogEntity().GetInfoByHttpContext(_httpContext); + var user = clientUsers.Any(u => u is not null && u.ConnnectionId == Context.ConnectionId); //判断用户是否存在,否则添加集合 if (!user) { @@ -51,7 +43,7 @@ namespace Yi.Furion.Application.Rbac.SignalRHub Ipaddr = loginUser?.LoginIp, LoginTime = DateTime.Now, Os = loginUser?.Os, - UserName = name ?? "" + UserName = name ?? "Null" }; clientUsers.Add(users); _logger.LogInformation($"{DateTime.Now}:{name},{Context.ConnectionId}连接服务端success,当前已连接{clientUsers.Count}个"); diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Yi.Framework.Rbac.Domain.csproj b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Yi.Framework.Rbac.Domain.csproj new file mode 100644 index 00000000..65a994bc --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Yi.Framework.Rbac.Domain.csproj @@ -0,0 +1,28 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Yi.Framework.Rbac.Domain.xml b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Yi.Framework.Rbac.Domain.xml new file mode 100644 index 00000000..b66aae14 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Yi.Framework.Rbac.Domain.xml @@ -0,0 +1,853 @@ + + + + Yi.Framework.Rbac.Domain + + + + + 配置表 + + + + + 配置名称 + + + + + 配置键 + + + + + 配置值 + + + + + 配置类别 + + + + + 排序字段 + + + + + 描述 + + + + + 部门表 + + + + + 主键 + + + + + 逻辑删除 + + + + + 创建时间 + + + + + 创建者 + + + + + 最后修改者 + + + + + 最后修改时间 + + + + + 排序 + + + + + 状态 + + + + + 部门名称 + + + + + 部门编码 + + + + + 负责人 + + + + + 父级id + + + + + 描述 + + + + + 主键 + + + + + 逻辑删除 + + + + + 排序 + + + + + 状态 + + + + + 描述 + + + + + tag类型 + + + + + tagClass + + + + + 字典类型 + + + + + 字典标签 + + + + + 字典值 + + + + + 是否为该类型的默认值 + + + + + 主键 + + + + + 逻辑删除 + + + + + 排序 + + + + + 状态 + + + + + 字典名称 + + + + + 字典类型 + + + + + 描述 + + + + + 登录用户 + + + + + 登录地点 + + + + + 登录Ip + + + + + 浏览器 + + + + + 操作系统 + + + + + 登录信息 + + + + + 菜单表 + + + + + 主键 + + + + + 逻辑删除 + + + + + 创建时间 + + + + + 创建者 + + + + + 最后修改者 + + + + + 最后修改时间 + + + + + 排序 + + + + + 状态 + + + + + 菜单名 + + + + + + + + + + + + + + + + + + + + 菜单图标 + + + + + 菜单组件路由 + + + + + 是否为外部链接 + + + + + 是否缓存 + + + + + 是否显示 + + + + + 描述 + + + + + 组件路径 + + + + + 路由参数 + + + + + 实体扩展 + + + + + 构建vue3路由 + + + + + + + 操作日志表 + + + + + 操作模块 + + + + + 操作类型 + + + + + 请求方法 + + + + + 操作人员 + + + + + 操作Ip + + + + + 操作地点 + + + + + 操作方法 + + + + + 请求参数 + + + + + 请求结果 + + + + + 岗位表 + + + + + 主键 + + + + + 逻辑删除 + + + + + 创建时间 + + + + + 创建者 + + + + + 最后修改者 + + + + + 最后修改时间 + + + + + 排序 + + + + + 状态 + + + + + 岗位编码 + + + + + 岗位名称 + + + + + 描述 + + + + + 角色部门关系表 + + + + + 主键 + + + + + 角色id + + + + + 部门id + + + + + 角色表 + + + + + 主键 + + + + + 逻辑删除 + + + + + 创建时间 + + + + + 创建者 + + + + + 最后修改者 + + + + + 最后修改时间 + + + + + 排序 + + + + + 角色名 + + + + + 角色编码 + + + + + 描述 + + + + + 角色数据范围 + + + + + 状态 + + + + + 角色菜单关系表 + + + + + 主键 + + + + + + + + + + + + + + + 用户表 + + + + + 主键 + + + + + 逻辑删除 + + + + + 姓名 + + + + + 年龄 + + + + + 用户名 + + + + + 密码 + + + + + 加密盐值 + + + + + 头像 + + + + + 昵称 + + + + + 邮箱 + + + + + Ip + + + + + 地址 + + + + + 电话 + + + + + 简介 + + + + + 备注 + + + + + 性别 + + + + + 部门id + + + + + 创建时间 + + + + + 创建者 + + + + + 最后修改者 + + + + + 最后修改时间 + + + + + 排序 + + + + + 状态 + + + + + 角色 + + + + + 岗位 + + + + + 部门 + + + + + 构建密码,MD5盐值加密 + + + + + 判断密码和加密后的密码是否相同 + + + + + + + 用户岗位表 + + + + + 主键 + + + + + 用户id + + + + + 岗位id + + + + + 用户角色关系表 + + + + + 主键 + + + + + 角色id + + + + + 用户id + + + + + 用户领域服务 + + + + + 登录效验 + + + + + + + + + 判断账户合法存在 + + + + + + + + 令牌转换 + + + + + + + 更新密码 + + + + + + + + + + 重置密码 + + + + + + + + 给角色设置菜单 + + + + + + + + 给用户设置角色 + + + + + + + + 给用户设置岗位 + + + + + + + + 获取当前登录用户的所有信息 + + + + + + + 客户端连接Id + + + + + 用户id + + + + + 成功连接 + + + + + + 断开连接 + + + + + + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/YiFrameworkRbacDomainModule.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/YiFrameworkRbacDomainModule.cs new file mode 100644 index 00000000..edba774c --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/YiFrameworkRbacDomainModule.cs @@ -0,0 +1,32 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.SignalR; +using Volo.Abp.Caching; +using Volo.Abp.Domain; +using Volo.Abp.Modularity; +using Yi.Framework.Mapster; +using Yi.Framework.Rbac.Domain.Authorization; +using Yi.Framework.Rbac.Domain.Operlog; +using Yi.Framework.Rbac.Domain.Shared; + +namespace Yi.Framework.Rbac.Domain +{ + [DependsOn( + typeof(YiFrameworkRbacDomainSharedModule), + + typeof(AbpAspNetCoreSignalRModule), + typeof(AbpDddDomainModule), + typeof(AbpCachingModule) + )] + public class YiFrameworkRbacDomainModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var service = context.Services; + service.AddControllers(options => + { + options.Filters.Add(); + options.Filters.Add(); + }); + } + } +} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/DeptDataSeed.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/DeptDataSeed.cs similarity index 59% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/DeptDataSeed.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/DeptDataSeed.cs index e4092cce..c61b08e1 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/DeptDataSeed.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/DeptDataSeed.cs @@ -1,38 +1,47 @@ -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Rbac.Entities; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Guids; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Core.Rbac.DataSeeds +namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds { - public class DeptDataSeed : AbstractDataSeed,ITransient + public class DeptDataSeed : IDataSeedContributor, ITransientDependency { - public DeptDataSeed(IRepository repository) : base(repository) + private ISqlSugarRepository _repository; + private IGuidGenerator _guidGenerator; + public DeptDataSeed(ISqlSugarRepository repository, IGuidGenerator guidGenerator) { + _repository = repository; + _guidGenerator = guidGenerator; } - - public override List GetSeedData() + public async Task SeedAsync(DataSeedContext context) + { + if (!await _repository.IsAnyAsync(x => true)) + { + await _repository.InsertManyAsync(GetSeedData()); + } + } + public List GetSeedData() { var entities = new List(); - DeptEntity chengziDept = new DeptEntity() + DeptEntity chengziDept = new DeptEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, DeptName = "橙子科技", DeptCode = "Yi", OrderNum = 100, IsDeleted = false, - ParentId = 0, Leader = "橙子", Remark = "如名所指" }; entities.Add(chengziDept); - DeptEntity shenzhenDept = new DeptEntity() + DeptEntity shenzhenDept = new DeptEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + DeptName = "深圳总公司", OrderNum = 100, IsDeleted = false, @@ -41,9 +50,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(shenzhenDept); - DeptEntity jiangxiDept = new DeptEntity() + DeptEntity jiangxiDept = new DeptEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + DeptName = "江西总公司", OrderNum = 100, IsDeleted = false, @@ -53,9 +62,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds - DeptEntity szDept1 = new DeptEntity() + DeptEntity szDept1 = new DeptEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + DeptName = "研发部门", OrderNum = 100, IsDeleted = false, @@ -63,9 +72,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(szDept1); - DeptEntity szDept2 = new DeptEntity() + DeptEntity szDept2 = new DeptEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + DeptName = "市场部门", OrderNum = 100, IsDeleted = false, @@ -73,9 +82,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(szDept2); - DeptEntity szDept3 = new DeptEntity() + DeptEntity szDept3 = new DeptEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + DeptName = "测试部门", OrderNum = 100, IsDeleted = false, @@ -83,9 +92,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(szDept3); - DeptEntity szDept4 = new DeptEntity() + DeptEntity szDept4 = new DeptEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + DeptName = "财务部门", OrderNum = 100, IsDeleted = false, @@ -93,9 +102,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(szDept4); - DeptEntity szDept5 = new DeptEntity() + DeptEntity szDept5 = new DeptEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + DeptName = "运维部门", OrderNum = 100, IsDeleted = false, @@ -104,9 +113,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(szDept5); - DeptEntity jxDept1 = new DeptEntity() + DeptEntity jxDept1 = new DeptEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + DeptName = "市场部门", OrderNum = 100, IsDeleted = false, @@ -115,9 +124,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(jxDept1); - DeptEntity jxDept2 = new DeptEntity() + DeptEntity jxDept2 = new DeptEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + DeptName = "财务部门", OrderNum = 100, IsDeleted = false, diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/DictionaryDataSeed.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/DictionaryDataSeed.cs similarity index 84% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/DictionaryDataSeed.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/DictionaryDataSeed.cs index 2695ae8d..bbd99546 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/DictionaryDataSeed.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/DictionaryDataSeed.cs @@ -1,22 +1,31 @@ using SqlSugar; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Module.DictionaryManager.Entities; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Core.Rbac.DataSeeds +namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds { - public class DictionaryDataSeed : AbstractDataSeed, ITransient + public class DictionaryDataSeed : IDataSeedContributor, ITransientDependency { - public DictionaryDataSeed(IRepository repository) : base(repository) + private ISqlSugarRepository _repository; + public DictionaryDataSeed(ISqlSugarRepository repository) { + _repository= repository; } - - public override List GetSeedData() + public async Task SeedAsync(DataSeedContext context) + { + if (!await _repository.IsAnyAsync(x => true)) + { + await _repository.InsertManyAsync(GetSeedData()); + } + } + public List GetSeedData() { List entities = new List(); DictionaryEntity dictInfo1 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "男", DictValue = "0", DictType = "sys_user_sex", @@ -30,7 +39,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo2 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "女", DictValue = "1", DictType = "sys_user_sex", @@ -43,7 +52,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo3 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "未知", DictValue = "2", DictType = "sys_user_sex", @@ -58,7 +67,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo4 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "显示", DictValue = "true", DictType = "sys_show_hide", @@ -71,7 +80,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo5 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "隐藏", DictValue = "false", DictType = "sys_show_hide", @@ -86,7 +95,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo6 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "正常", DictValue = "true", DictType = "sys_normal_disable", @@ -98,7 +107,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo6); DictionaryEntity dictInfo7 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "停用", DictValue = "false", DictType = "sys_normal_disable", @@ -114,7 +123,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo8 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "正常", DictValue = "0", DictType = "sys_job_status", @@ -126,7 +135,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo8); DictionaryEntity dictInfo9 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "暂停", DictValue = "1", DictType = "sys_job_status", @@ -143,7 +152,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo10 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "默认", DictValue = "DEFAULT", DictType = "sys_job_group", @@ -155,7 +164,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo10); DictionaryEntity dictInfo11 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "系统", DictValue = "SYSTEM", DictType = "sys_job_group", @@ -170,7 +179,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo12 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "是", DictValue = "Y", DictType = "sys_yes_no", @@ -182,7 +191,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo12); DictionaryEntity dictInfo13 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "否", DictValue = "N", DictType = "sys_yes_no", @@ -198,7 +207,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo14 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "通知", DictValue = "1", DictType = "sys_notice_type", @@ -210,7 +219,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo14); DictionaryEntity dictInfo15 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "公告", DictValue = "2", DictType = "sys_notice_type", @@ -223,7 +232,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo16 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "正常", DictValue = "0", DictType = "sys_notice_status", @@ -235,7 +244,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo16); DictionaryEntity dictInfo17 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "关闭", DictValue = "1", DictType = "sys_notice_status", @@ -249,7 +258,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo18 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "新增", DictValue = "1", DictType = "sys_oper_type", @@ -261,7 +270,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo18); DictionaryEntity dictInfo19 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "修改", DictValue = "2", DictType = "sys_oper_type", @@ -273,7 +282,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo19); DictionaryEntity dictInfo22 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "删除", DictValue = "3", DictType = "sys_oper_type", @@ -286,7 +295,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo22); DictionaryEntity dictInfo23 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "授权", DictValue = "4", DictType = "sys_oper_type", @@ -298,7 +307,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo23); DictionaryEntity dictInfo24 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "导出", DictValue = "5", DictType = "sys_oper_type", @@ -310,7 +319,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo24); DictionaryEntity dictInfo25 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "导入", DictValue = "6", DictType = "sys_oper_type", @@ -322,7 +331,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo25); DictionaryEntity dictInfo26 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "强退", DictValue = "7", DictType = "sys_oper_type", @@ -334,7 +343,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo26); DictionaryEntity dictInfo27 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "生成代码", DictValue = "8", DictType = "sys_oper_type", @@ -346,7 +355,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo27); DictionaryEntity dictInfo28 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "清空数据", DictValue = "9", DictType = "sys_oper_type", @@ -362,7 +371,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryEntity dictInfo20 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "成功", DictValue = "false", DictType = "sys_common_status", @@ -374,7 +383,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dictInfo20); DictionaryEntity dictInfo21 = new DictionaryEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictLabel = "失败", DictValue = "true", DictType = "sys_common_status", diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/DictionaryTypeDataSeed.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/DictionaryTypeDataSeed.cs similarity index 78% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/DictionaryTypeDataSeed.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/DictionaryTypeDataSeed.cs index f968d33c..4ca0ba83 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/DictionaryTypeDataSeed.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/DictionaryTypeDataSeed.cs @@ -1,34 +1,43 @@ using SqlSugar; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Module.DictionaryManager.Entities; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Core.Rbac.DataSeeds +namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds { - public class DictionaryTypeDataSeed : AbstractDataSeed, ITransient + public class DictionaryTypeDataSeed : IDataSeedContributor, ITransientDependency { - public DictionaryTypeDataSeed(IRepository repository) : base(repository) + private ISqlSugarRepository _repository; + public DictionaryTypeDataSeed(ISqlSugarRepository repository) { + _repository = repository; } - - public override List GetSeedData() + public async Task SeedAsync(DataSeedContext context) + { + if (!await _repository.IsAnyAsync(x => true)) + { + await _repository.InsertManyAsync(GetSeedData()); + } + } + public List GetSeedData() { List entities = new List(); DictionaryTypeEntity dict1 = new DictionaryTypeEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictName = "用户性别", DictType = "sys_user_sex", OrderNum = 100, Remark = "用户性别列表", IsDeleted = false, - State=true + State = true }; entities.Add(dict1); DictionaryTypeEntity dict2 = new DictionaryTypeEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictName = "菜单状态", DictType = "sys_show_hide", OrderNum = 100, @@ -40,7 +49,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryTypeEntity dict3 = new DictionaryTypeEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictName = "系统开关", DictType = "sys_normal_disable", OrderNum = 100, @@ -52,7 +61,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryTypeEntity dict4 = new DictionaryTypeEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictName = "任务状态", DictType = "sys_job_status", OrderNum = 100, @@ -64,7 +73,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryTypeEntity dict5 = new DictionaryTypeEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictName = "任务分组", DictType = "sys_job_group", OrderNum = 100, @@ -76,7 +85,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryTypeEntity dict6 = new DictionaryTypeEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictName = "系统是否", DictType = "sys_yes_no", OrderNum = 100, @@ -88,7 +97,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryTypeEntity dict7 = new DictionaryTypeEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictName = "通知类型", DictType = "sys_notice_type", OrderNum = 100, @@ -99,7 +108,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(dict7); DictionaryTypeEntity dict8 = new DictionaryTypeEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictName = "通知状态", DictType = "sys_notice_status", OrderNum = 100, @@ -111,7 +120,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryTypeEntity dict9 = new DictionaryTypeEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictName = "操作类型", DictType = "sys_oper_type", OrderNum = 100, @@ -124,7 +133,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds DictionaryTypeEntity dict10 = new DictionaryTypeEntity() { - Id = SnowFlakeSingle.Instance.NextId(), + DictName = "系统状态", DictType = "sys_common_status", OrderNum = 100, diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/MenuDataSeed.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/MenuDataSeed.cs similarity index 76% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/MenuDataSeed.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/MenuDataSeed.cs index 36d9f550..16e30083 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/MenuDataSeed.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/MenuDataSeed.cs @@ -1,31 +1,36 @@ -using System.Linq; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Rbac.Entities; -using Yi.Furion.Core.Rbac.Enums; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Guids; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Shared.Enums; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Core.Rbac.DataSeeds +namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds { - public class MenuDataSeed : AbstractDataSeed, ITransient + public class MenuDataSeed : IDataSeedContributor, ITransientDependency { - public MenuDataSeed(IRepository repository) : base(repository) + private ISqlSugarRepository _repository; + private IGuidGenerator _guidGenerator; + public MenuDataSeed(ISqlSugarRepository repository, IGuidGenerator guidGenerator) { + _repository = repository; + _guidGenerator = guidGenerator; } - public override async Task IsInvoker() + public async Task SeedAsync(DataSeedContext context) { - return !await _repository.IsAnyAsync(x => x.MenuName == "系统管理"); + if (!await _repository.IsAnyAsync(x => x.MenuName == "系统管理")) + { + await _repository.InsertManyAsync(GetSeedData()); + } } - public override List GetSeedData() + public List GetSeedData() { List entities = new List(); //系统管理 - MenuEntity system = new MenuEntity() + MenuEntity system = new MenuEntity(_guidGenerator.Create(), Guid.Empty) { - Id = SnowflakeHelper.NextId, MenuName = "系统管理", MenuType = MenuTypeEnum.Catalogue, Router = "/system", @@ -33,15 +38,13 @@ namespace Yi.Furion.Core.Rbac.DataSeeds IsLink = false, MenuIcon = "system", OrderNum = 100, - ParentId = 0, IsDeleted = false }; entities.Add(system); //WebFirst - MenuEntity webfirst = new MenuEntity() + MenuEntity webfirst = new MenuEntity(_guidGenerator.Create(), Guid.Empty) { - Id = SnowflakeHelper.NextId, MenuName = "WebFirst", MenuType = MenuTypeEnum.Catalogue, Router = "/webfirst", @@ -49,15 +52,13 @@ namespace Yi.Furion.Core.Rbac.DataSeeds IsLink = false, MenuIcon = "build", OrderNum = 91, - ParentId = 0, IsDeleted = false }; entities.Add(webfirst); //数据表管理 - MenuEntity table = new MenuEntity() + MenuEntity table = new MenuEntity(_guidGenerator.Create(), webfirst.Id) { - Id = SnowflakeHelper.NextId, MenuName = "数据表管理", PermissionCode = "webfirst:table:list", MenuType = MenuTypeEnum.Menu, @@ -68,15 +69,13 @@ namespace Yi.Furion.Core.Rbac.DataSeeds Component = "webfirst/table/index", MenuIcon = "online", OrderNum = 100, - ParentId = webfirst.Id, IsDeleted = false }; entities.Add(table); //字段管理 - MenuEntity field = new MenuEntity() + MenuEntity field = new MenuEntity(_guidGenerator.Create(), webfirst.Id) { - Id = SnowflakeHelper.NextId, MenuName = "字段管理", PermissionCode = "webfirst:field:list", MenuType = MenuTypeEnum.Menu, @@ -94,9 +93,8 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //模板管理 - MenuEntity template = new MenuEntity() + MenuEntity template = new MenuEntity(_guidGenerator.Create(), webfirst.Id) { - Id = SnowflakeHelper.NextId, MenuName = "模板管理", PermissionCode = "webfirst:template:list", MenuType = MenuTypeEnum.Menu, @@ -107,7 +105,6 @@ namespace Yi.Furion.Core.Rbac.DataSeeds Component = "webfirst/template/index", MenuIcon = "documentation", OrderNum = 98, - ParentId = webfirst.Id, IsDeleted = false }; entities.Add(template); @@ -119,9 +116,8 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //系统监控 - MenuEntity monitoring = new MenuEntity() + MenuEntity monitoring = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, MenuName = "系统监控", MenuType = MenuTypeEnum.Catalogue, Router = "/monitor", @@ -129,16 +125,14 @@ namespace Yi.Furion.Core.Rbac.DataSeeds IsLink = false, MenuIcon = "monitor", OrderNum = 99, - ParentId = 0, IsDeleted = false }; entities.Add(monitoring); //在线用户 - MenuEntity online = new MenuEntity() + MenuEntity online = new MenuEntity(_guidGenerator.Create(), monitoring.Id) { - Id = SnowflakeHelper.NextId, MenuName = "在线用户", PermissionCode = "monitor:online:list", MenuType = MenuTypeEnum.Menu, @@ -149,15 +143,13 @@ namespace Yi.Furion.Core.Rbac.DataSeeds Component = "monitor/online/index", MenuIcon = "online", OrderNum = 100, - ParentId = monitoring.Id, IsDeleted = false }; entities.Add(online); //缓存列表 - MenuEntity cache = new MenuEntity() + MenuEntity cache = new MenuEntity(_guidGenerator.Create(), monitoring.Id) { - Id = SnowflakeHelper.NextId, MenuName = "缓存列表", PermissionCode = "monitor:cache:list", MenuType = MenuTypeEnum.Menu, @@ -168,15 +160,13 @@ namespace Yi.Furion.Core.Rbac.DataSeeds Component = "monitor/cache/list", MenuIcon = "redis-list", OrderNum = 99, - ParentId = monitoring.Id, IsDeleted = false }; entities.Add(cache); //服务监控 - MenuEntity server = new MenuEntity() + MenuEntity server = new MenuEntity(_guidGenerator.Create(), monitoring.Id) { - Id = SnowflakeHelper.NextId, MenuName = "服务监控", PermissionCode = "monitor:server:list", MenuType = MenuTypeEnum.Menu, @@ -187,15 +177,13 @@ namespace Yi.Furion.Core.Rbac.DataSeeds Component = "monitor/server/index", MenuIcon = "server", OrderNum = 98, - ParentId = monitoring.Id, IsDeleted = false }; entities.Add(server); //定时任务 - MenuEntity task = new MenuEntity() + MenuEntity task = new MenuEntity(_guidGenerator.Create(), monitoring.Id) { - Id = SnowflakeHelper.NextId, MenuName = "定时任务", PermissionCode = "monitor:job:list", MenuType = MenuTypeEnum.Menu, @@ -206,16 +194,14 @@ namespace Yi.Furion.Core.Rbac.DataSeeds Component = "monitor/job/index", MenuIcon = "job", OrderNum = 97, - ParentId = monitoring.Id, IsDeleted = false }; entities.Add(task); //系统工具 - MenuEntity tool = new MenuEntity() + MenuEntity tool = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, MenuName = "系统工具", MenuType = MenuTypeEnum.Catalogue, Router = "/tool", @@ -223,31 +209,27 @@ namespace Yi.Furion.Core.Rbac.DataSeeds IsLink = false, MenuIcon = "tool", OrderNum = 98, - ParentId = 0, IsDeleted = false }; entities.Add(tool); //swagger文档 - MenuEntity swagger = new MenuEntity() + MenuEntity swagger = new MenuEntity(_guidGenerator.Create(), tool.Id) { - Id = SnowflakeHelper.NextId, MenuName = "接口文档", MenuType = MenuTypeEnum.Menu, - Router = "http://localhost:19001", + Router = "http://localhost:19001/swagger", IsShow = true, IsLink = true, MenuIcon = "list", OrderNum = 100, - ParentId = tool.Id, IsDeleted = false, }; entities.Add(swagger); //ERP - MenuEntity erp = new MenuEntity() + MenuEntity erp = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, MenuName = "ERP", MenuType = MenuTypeEnum.Catalogue, Router = "/erp", @@ -255,7 +237,6 @@ namespace Yi.Furion.Core.Rbac.DataSeeds IsLink = false, MenuIcon = "international", OrderNum = 96, - ParentId = 0, IsDeleted = false }; entities.Add(erp); @@ -263,9 +244,8 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //供应商定义 - MenuEntity supplier = new MenuEntity() + MenuEntity supplier = new MenuEntity(_guidGenerator.Create(), erp.Id) { - Id = SnowflakeHelper.NextId, MenuName = "供应商定义", PermissionCode = "erp:supplier:list", MenuType = MenuTypeEnum.Menu, @@ -276,64 +256,55 @@ namespace Yi.Furion.Core.Rbac.DataSeeds Component = "erp/supplier/index", MenuIcon = "education", OrderNum = 100, - ParentId = erp.Id, IsDeleted = false }; entities.Add(supplier); - MenuEntity supplierQuery = new MenuEntity() + MenuEntity supplierQuery = new MenuEntity(_guidGenerator.Create(), supplier.Id) { - Id = SnowflakeHelper.NextId, MenuName = "供应商查询", PermissionCode = "erp:supplier:query", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = supplier.Id, IsDeleted = false }; entities.Add(supplierQuery); - MenuEntity supplierAdd = new MenuEntity() + MenuEntity supplierAdd = new MenuEntity(_guidGenerator.Create(), supplier.Id) { - Id = SnowflakeHelper.NextId, MenuName = "供应商新增", PermissionCode = "erp:supplier:add", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = supplier.Id, + IsDeleted = false }; entities.Add(supplierAdd); - MenuEntity supplierEdit = new MenuEntity() + MenuEntity supplierEdit = new MenuEntity(_guidGenerator.Create(), supplier.Id) { - Id = SnowflakeHelper.NextId, MenuName = "供应商修改", PermissionCode = "erp:supplier:edit", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = supplier.Id, IsDeleted = false }; entities.Add(supplierEdit); - MenuEntity supplierRemove = new MenuEntity() + MenuEntity supplierRemove = new MenuEntity(_guidGenerator.Create(), supplier.Id) { - Id = SnowflakeHelper.NextId, MenuName = "供应商删除", PermissionCode = "erp:supplier:remove", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = supplier.Id, IsDeleted = false }; entities.Add(supplierRemove); //仓库定义 - MenuEntity warehouse = new MenuEntity() + MenuEntity warehouse = new MenuEntity(_guidGenerator.Create(), erp.Id) { - Id = SnowflakeHelper.NextId, MenuName = "仓库定义", PermissionCode = "erp:warehouse:list", MenuType = MenuTypeEnum.Menu, @@ -344,14 +315,12 @@ namespace Yi.Furion.Core.Rbac.DataSeeds Component = "erp/warehouse/index", MenuIcon = "education", OrderNum = 100, - ParentId = erp.Id, IsDeleted = false }; entities.Add(warehouse); - MenuEntity warehouseQuery = new MenuEntity() + MenuEntity warehouseQuery = new MenuEntity(_guidGenerator.Create(), warehouse.Id) { - Id = SnowflakeHelper.NextId, MenuName = "仓库查询", PermissionCode = "erp:warehouse:query", MenuType = MenuTypeEnum.Component, @@ -361,47 +330,40 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(warehouseQuery); - MenuEntity warehouseAdd = new MenuEntity() + MenuEntity warehouseAdd = new MenuEntity(_guidGenerator.Create(), warehouse.Id) { - Id = SnowflakeHelper.NextId, MenuName = "仓库新增", PermissionCode = "erp:warehouse:add", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = warehouse.Id, IsDeleted = false }; entities.Add(warehouseAdd); - MenuEntity warehouseEdit = new MenuEntity() + MenuEntity warehouseEdit = new MenuEntity(_guidGenerator.Create(), warehouse.Id) { - Id = SnowflakeHelper.NextId, MenuName = "仓库修改", PermissionCode = "erp:warehouse:edit", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = warehouse.Id, IsDeleted = false }; entities.Add(warehouseEdit); - MenuEntity warehouseRemove = new MenuEntity() + MenuEntity warehouseRemove = new MenuEntity(_guidGenerator.Create(), warehouse.Id) { - Id = SnowflakeHelper.NextId, MenuName = "仓库删除", PermissionCode = "erp:warehouse:remove", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = warehouse.Id, IsDeleted = false }; entities.Add(warehouseRemove); //单位定义 - MenuEntity unit = new MenuEntity() + MenuEntity unit = new MenuEntity(_guidGenerator.Create(), erp.Id) { - Id = SnowflakeHelper.NextId, MenuName = "单位定义", PermissionCode = "erp:unit:list", MenuType = MenuTypeEnum.Menu, @@ -412,64 +374,55 @@ namespace Yi.Furion.Core.Rbac.DataSeeds Component = "erp/unit/index", MenuIcon = "education", OrderNum = 100, - ParentId = erp.Id, IsDeleted = false }; entities.Add(unit); - MenuEntity unitQuery = new MenuEntity() + MenuEntity unitQuery = new MenuEntity(_guidGenerator.Create(), unit.Id) { - Id = SnowflakeHelper.NextId, MenuName = "单位查询", PermissionCode = "erp:unit:query", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = unit.Id, IsDeleted = false }; entities.Add(unitQuery); - MenuEntity unitAdd = new MenuEntity() + MenuEntity unitAdd = new MenuEntity(_guidGenerator.Create(), unit.Id) { - Id = SnowflakeHelper.NextId, MenuName = "单位新增", PermissionCode = "erp:unit:add", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = unit.Id, IsDeleted = false }; entities.Add(unitAdd); - MenuEntity unitEdit = new MenuEntity() + MenuEntity unitEdit = new MenuEntity(_guidGenerator.Create(), unit.Id) { - Id = SnowflakeHelper.NextId, MenuName = "单位修改", PermissionCode = "erp:unit:edit", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = unit.Id, IsDeleted = false }; entities.Add(unitEdit); - MenuEntity unitRemove = new MenuEntity() + MenuEntity unitRemove = new MenuEntity(_guidGenerator.Create(), unit.Id) { - Id = SnowflakeHelper.NextId, MenuName = "单位删除", PermissionCode = "erp:unit:remove", MenuType = MenuTypeEnum.Component, OrderNum = 100, - ParentId = unit.Id, IsDeleted = false }; entities.Add(unitRemove); //物料定义 - MenuEntity material = new MenuEntity() + MenuEntity material = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "物料定义", PermissionCode = "erp:material:list", MenuType = MenuTypeEnum.Menu, @@ -485,9 +438,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(material); - MenuEntity materialQuery = new MenuEntity() + MenuEntity materialQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "物料查询", PermissionCode = "erp:material:query", MenuType = MenuTypeEnum.Component, @@ -497,9 +450,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(materialQuery); - MenuEntity materialAdd = new MenuEntity() + MenuEntity materialAdd = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "物料新增", PermissionCode = "erp:material:add", MenuType = MenuTypeEnum.Component, @@ -509,9 +462,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(materialAdd); - MenuEntity materialEdit = new MenuEntity() + MenuEntity materialEdit = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "物料修改", PermissionCode = "erp:material:edit", MenuType = MenuTypeEnum.Component, @@ -521,9 +474,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(materialEdit); - MenuEntity materialRemove = new MenuEntity() + MenuEntity materialRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "物料删除", PermissionCode = "erp:material:remove", MenuType = MenuTypeEnum.Component, @@ -535,9 +488,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //采购订单 - MenuEntity purchase = new MenuEntity() + MenuEntity purchase = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "采购订单", PermissionCode = "erp:purchase:list", MenuType = MenuTypeEnum.Menu, @@ -553,9 +506,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(purchase); - MenuEntity purchaseQuery = new MenuEntity() + MenuEntity purchaseQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "采购订单查询", PermissionCode = "erp:purchase:query", MenuType = MenuTypeEnum.Component, @@ -565,9 +518,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(purchaseQuery); - MenuEntity purchaseAdd = new MenuEntity() + MenuEntity purchaseAdd = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "采购订单新增", PermissionCode = "erp:purchase:add", MenuType = MenuTypeEnum.Component, @@ -577,9 +530,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(purchaseAdd); - MenuEntity purchaseEdit = new MenuEntity() + MenuEntity purchaseEdit = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "采购订单修改", PermissionCode = "erp:purchase:edit", MenuType = MenuTypeEnum.Component, @@ -589,9 +542,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(purchaseEdit); - MenuEntity purchaseRemove = new MenuEntity() + MenuEntity purchaseRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "采购订单删除", PermissionCode = "erp:purchase:remove", MenuType = MenuTypeEnum.Component, @@ -604,9 +557,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //Yi框架 - MenuEntity guide = new MenuEntity() + MenuEntity guide = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "Yi框架", MenuType = MenuTypeEnum.Catalogue, Router = "https://gitee.com/ccnetcore/yi", @@ -614,15 +567,14 @@ namespace Yi.Furion.Core.Rbac.DataSeeds IsLink = true, MenuIcon = "guide", OrderNum = 90, - ParentId = 0, IsDeleted = false, }; entities.Add(guide); //用户管理 - MenuEntity user = new MenuEntity() + MenuEntity user = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "用户管理", PermissionCode = "system:user:list", MenuType = MenuTypeEnum.Menu, @@ -638,9 +590,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(user); - MenuEntity userQuery = new MenuEntity() + MenuEntity userQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "用户查询", PermissionCode = "system:user:query", MenuType = MenuTypeEnum.Component, @@ -650,9 +602,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(userQuery); - MenuEntity userAdd = new MenuEntity() + MenuEntity userAdd = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "用户新增", PermissionCode = "system:user:add", MenuType = MenuTypeEnum.Component, @@ -662,9 +614,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(userAdd); - MenuEntity userEdit = new MenuEntity() + MenuEntity userEdit = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "用户修改", PermissionCode = "system:user:edit", MenuType = MenuTypeEnum.Component, @@ -674,9 +626,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(userEdit); - MenuEntity userRemove = new MenuEntity() + MenuEntity userRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "用户删除", PermissionCode = "system:user:remove", MenuType = MenuTypeEnum.Component, @@ -688,9 +640,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //角色管理 - MenuEntity role = new MenuEntity() + MenuEntity role = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "角色管理", PermissionCode = "system:role:list", MenuType = MenuTypeEnum.Menu, @@ -706,9 +658,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(role); - MenuEntity roleQuery = new MenuEntity() + MenuEntity roleQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "角色查询", PermissionCode = "system:role:query", MenuType = MenuTypeEnum.Component, @@ -718,9 +670,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(roleQuery); - MenuEntity roleAdd = new MenuEntity() + MenuEntity roleAdd = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "角色新增", PermissionCode = "system:role:add", MenuType = MenuTypeEnum.Component, @@ -730,9 +682,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(roleAdd); - MenuEntity roleEdit = new MenuEntity() + MenuEntity roleEdit = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "角色修改", PermissionCode = "system:role:edit", MenuType = MenuTypeEnum.Component, @@ -742,9 +694,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(roleEdit); - MenuEntity roleRemove = new MenuEntity() + MenuEntity roleRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "角色删除", PermissionCode = "system:role:remove", MenuType = MenuTypeEnum.Component, @@ -756,9 +708,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //菜单管理 - MenuEntity menu = new MenuEntity() + MenuEntity menu = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "菜单管理", PermissionCode = "system:menu:list", MenuType = MenuTypeEnum.Menu, @@ -774,9 +726,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(menu); - MenuEntity menuQuery = new MenuEntity() + MenuEntity menuQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "菜单查询", PermissionCode = "system:menu:query", MenuType = MenuTypeEnum.Component, @@ -786,9 +738,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(menuQuery); - MenuEntity menuAdd = new MenuEntity() + MenuEntity menuAdd = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "菜单新增", PermissionCode = "system:menu:add", MenuType = MenuTypeEnum.Component, @@ -798,9 +750,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(menuAdd); - MenuEntity menuEdit = new MenuEntity() + MenuEntity menuEdit = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "菜单修改", PermissionCode = "system:menu:edit", MenuType = MenuTypeEnum.Component, @@ -810,9 +762,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(menuEdit); - MenuEntity menuRemove = new MenuEntity() + MenuEntity menuRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "菜单删除", PermissionCode = "system:menu:remove", MenuType = MenuTypeEnum.Component, @@ -823,9 +775,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(menuRemove); //部门管理 - MenuEntity dept = new MenuEntity() + MenuEntity dept = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "部门管理", PermissionCode = "system:dept:list", MenuType = MenuTypeEnum.Menu, @@ -841,9 +793,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(dept); - MenuEntity deptQuery = new MenuEntity() + MenuEntity deptQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "部门查询", PermissionCode = "system:dept:query", MenuType = MenuTypeEnum.Component, @@ -853,9 +805,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(deptQuery); - MenuEntity deptAdd = new MenuEntity() + MenuEntity deptAdd = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "部门新增", PermissionCode = "system:dept:add", MenuType = MenuTypeEnum.Component, @@ -865,9 +817,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(deptAdd); - MenuEntity deptEdit = new MenuEntity() + MenuEntity deptEdit = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "部门修改", PermissionCode = "system:dept:edit", MenuType = MenuTypeEnum.Component, @@ -877,9 +829,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(deptEdit); - MenuEntity deptRemove = new MenuEntity() + MenuEntity deptRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "部门删除", PermissionCode = "system:dept:remove", MenuType = MenuTypeEnum.Component, @@ -892,9 +844,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //岗位管理 - MenuEntity post = new MenuEntity() + MenuEntity post = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "岗位管理", PermissionCode = "system:post:list", MenuType = MenuTypeEnum.Menu, @@ -910,9 +862,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(post); - MenuEntity postQuery = new MenuEntity() + MenuEntity postQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "岗位查询", PermissionCode = "system:post:query", MenuType = MenuTypeEnum.Component, @@ -922,9 +874,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(postQuery); - MenuEntity postAdd = new MenuEntity() + MenuEntity postAdd = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "岗位新增", PermissionCode = "system:post:add", MenuType = MenuTypeEnum.Component, @@ -934,9 +886,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(postAdd); - MenuEntity postEdit = new MenuEntity() + MenuEntity postEdit = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "岗位修改", PermissionCode = "system:post:edit", MenuType = MenuTypeEnum.Component, @@ -946,9 +898,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(postEdit); - MenuEntity postRemove = new MenuEntity() + MenuEntity postRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "岗位删除", PermissionCode = "system:post:remove", MenuType = MenuTypeEnum.Component, @@ -959,9 +911,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(postRemove); //字典管理 - MenuEntity dict = new MenuEntity() + MenuEntity dict = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "字典管理", PermissionCode = "system:dict:list", MenuType = MenuTypeEnum.Menu, @@ -977,9 +929,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(dict); - MenuEntity dictQuery = new MenuEntity() + MenuEntity dictQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "字典查询", PermissionCode = "system:dict:query", MenuType = MenuTypeEnum.Component, @@ -989,9 +941,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(dictQuery); - MenuEntity dictAdd = new MenuEntity() + MenuEntity dictAdd = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "字典新增", PermissionCode = "system:dict:add", MenuType = MenuTypeEnum.Component, @@ -1001,9 +953,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(dictAdd); - MenuEntity dictEdit = new MenuEntity() + MenuEntity dictEdit = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "字典修改", PermissionCode = "system:dict:edit", MenuType = MenuTypeEnum.Component, @@ -1013,9 +965,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(dictEdit); - MenuEntity dictRemove = new MenuEntity() + MenuEntity dictRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "字典删除", PermissionCode = "system:dict:remove", MenuType = MenuTypeEnum.Component, @@ -1027,9 +979,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //参数设置 - MenuEntity config = new MenuEntity() + MenuEntity config = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "参数设置", PermissionCode = "system:config:list", MenuType = MenuTypeEnum.Menu, @@ -1045,9 +997,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(config); - MenuEntity configQuery = new MenuEntity() + MenuEntity configQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "参数查询", PermissionCode = "system:config:query", MenuType = MenuTypeEnum.Component, @@ -1057,9 +1009,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(configQuery); - MenuEntity configAdd = new MenuEntity() + MenuEntity configAdd = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "参数新增", PermissionCode = "system:config:add", MenuType = MenuTypeEnum.Component, @@ -1069,9 +1021,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(configAdd); - MenuEntity configEdit = new MenuEntity() + MenuEntity configEdit = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "参数修改", PermissionCode = "system:config:edit", MenuType = MenuTypeEnum.Component, @@ -1081,9 +1033,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(configEdit); - MenuEntity configRemove = new MenuEntity() + MenuEntity configRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "参数删除", PermissionCode = "system:config:remove", MenuType = MenuTypeEnum.Component, @@ -1097,9 +1049,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //日志管理 - MenuEntity log = new MenuEntity() + MenuEntity log = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "日志管理", MenuType = MenuTypeEnum.Catalogue, Router = "log", @@ -1113,9 +1065,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds entities.Add(log); //操作日志 - MenuEntity operationLog = new MenuEntity() + MenuEntity operationLog = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "操作日志", PermissionCode = "monitor:operlog:list", MenuType = MenuTypeEnum.Menu, @@ -1131,9 +1083,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(operationLog); - MenuEntity operationLogQuery = new MenuEntity() + MenuEntity operationLogQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "操作查询", PermissionCode = "monitor:operlog:query", MenuType = MenuTypeEnum.Component, @@ -1143,9 +1095,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(operationLogQuery); - MenuEntity operationLogRemove = new MenuEntity() + MenuEntity operationLogRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "操作删除", PermissionCode = "monitor:operlog:remove", MenuType = MenuTypeEnum.Component, @@ -1157,9 +1109,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds //登录日志 - MenuEntity loginLog = new MenuEntity() + MenuEntity loginLog = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "登录日志", PermissionCode = "monitor:logininfor:list", MenuType = MenuTypeEnum.Menu, @@ -1175,9 +1127,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(loginLog); - MenuEntity loginLogQuery = new MenuEntity() + MenuEntity loginLogQuery = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "登录查询", PermissionCode = "monitor:logininfor:query", MenuType = MenuTypeEnum.Component, @@ -1187,9 +1139,9 @@ namespace Yi.Furion.Core.Rbac.DataSeeds }; entities.Add(loginLogQuery); - MenuEntity loginLogRemove = new MenuEntity() + MenuEntity loginLogRemove = new MenuEntity(_guidGenerator.Create()) { - Id = SnowflakeHelper.NextId, + MenuName = "登录删除", PermissionCode = "monitor:logininfor:remove", MenuType = MenuTypeEnum.Component, diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/PostDataSeed.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/PostDataSeed.cs similarity index 61% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/PostDataSeed.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/PostDataSeed.cs index 4cb1414f..dab651d4 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/PostDataSeed.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/PostDataSeed.cs @@ -1,23 +1,31 @@ -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Rbac.Entities; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Core.Rbac.DataSeeds +namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds { - public class PostDataSeed : AbstractDataSeed, ITransient + public class PostDataSeed : IDataSeedContributor, ITransientDependency { - public PostDataSeed(IRepository repository) : base(repository) + private ISqlSugarRepository _repository; + public PostDataSeed(ISqlSugarRepository repository) { + _repository = repository; } - - public override List GetSeedData() + public async Task SeedAsync(DataSeedContext context) + { + if (!await _repository.IsAnyAsync(x => true)) + { + await _repository.InsertManyAsync(GetSeedData()); + } + } + public List GetSeedData() { var entites = new List(); PostEntity Post1 = new PostEntity() { - Id = SnowflakeHelper.NextId, + PostName = "董事长", PostCode = "ceo", OrderNum = 100, @@ -27,7 +35,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds PostEntity Post2 = new PostEntity() { - Id = SnowflakeHelper.NextId, + PostName = "项目经理", PostCode = "se", OrderNum = 100, @@ -37,7 +45,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds PostEntity Post3 = new PostEntity() { - Id = SnowflakeHelper.NextId, + PostName = "人力资源", PostCode = "hr", OrderNum = 100, @@ -47,7 +55,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds PostEntity Post4 = new PostEntity() { - Id = SnowflakeHelper.NextId, + PostName = "普通员工", PostCode = "user", OrderNum = 100, diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/RoleDataSeed.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/RoleDataSeed.cs similarity index 66% rename from Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/RoleDataSeed.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/RoleDataSeed.cs index 855d8469..13bee7d4 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/RoleDataSeed.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/RoleDataSeed.cs @@ -1,23 +1,25 @@ -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Rbac.Entities; -using Yi.Furion.Core.Rbac.Enums; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Shared.Enums; +using Yi.Framework.SqlSugarCore.Abstractions; -namespace Yi.Furion.Core.Rbac.DataSeeds +namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds { - public class RoleDataSeed : AbstractDataSeed, ITransient + public class RoleDataSeed : IDataSeedContributor, ITransientDependency { - public RoleDataSeed(IRepository repository) : base(repository) + private ISqlSugarRepository _repository; + public RoleDataSeed(ISqlSugarRepository repository) { + _repository = repository; } - public override List GetSeedData() + public List GetSeedData() { var entities = new List(); RoleEntity role1 = new RoleEntity() { - Id = SnowflakeHelper.NextId, + RoleName = "管理员", RoleCode = "admin", DataScope = DataScopeEnum.ALL, @@ -29,7 +31,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds RoleEntity role2 = new RoleEntity() { - Id = SnowflakeHelper.NextId, + RoleName = "测试角色", RoleCode = "test", DataScope = DataScopeEnum.ALL, @@ -41,7 +43,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds RoleEntity role3 = new RoleEntity() { - Id = SnowflakeHelper.NextId, + RoleName = "普通用户", RoleCode = "common", DataScope = DataScopeEnum.ALL, @@ -53,7 +55,7 @@ namespace Yi.Furion.Core.Rbac.DataSeeds RoleEntity role4 = new RoleEntity() { - Id = SnowflakeHelper.NextId, + RoleName = "游客用户", RoleCode = "guest", DataScope = DataScopeEnum.ALL, @@ -66,5 +68,13 @@ namespace Yi.Furion.Core.Rbac.DataSeeds return entities; } + + public async Task SeedAsync(DataSeedContext context) + { + if (!await _repository.IsAnyAsync(x => true)) + { + await _repository.InsertManyAsync(GetSeedData()); + } + } } } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/UserDataSeed.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/UserDataSeed.cs new file mode 100644 index 00000000..4253a4c5 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/UserDataSeed.cs @@ -0,0 +1,87 @@ +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Shared.Enums; +using Yi.Framework.SqlSugarCore.Abstractions; + +namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds +{ + public class UserDataSeed : IDataSeedContributor, ITransientDependency + { + private ISqlSugarRepository _repository; + public UserDataSeed(ISqlSugarRepository repository) + { + _repository = repository; + } + public async Task SeedAsync(DataSeedContext context) + { + if (!await _repository.IsAnyAsync(x => true)) + { + var entities = new List(); + UserEntity user1 = new UserEntity() + { + Name = "大橙子", + UserName = "cc", + Nick = "橙子", + Password = "123456", + Email = "454313500@qq.com", + Phone = 13800000000, + Sex = SexEnum.Male, + Address = "深圳", + Age = 20, + Introduction = "还有谁?", + OrderNum = 999, + Remark = "描述是什么呢?", + State = true + }; + user1.BuildPassword(); + entities.Add(user1); + + UserEntity user2 = new UserEntity() + { + + Name = "大测试", + UserName = "test", + Nick = "测试", + Password = "123456", + Email = "454313500@qq.com", + Phone = 15900000000, + Sex = SexEnum.Woman, + Address = "深圳", + Age = 18, + Introduction = "还有我!", + OrderNum = 1, + Remark = "我没有描述!", + State = true + + }; + user2.BuildPassword(); + entities.Add(user2); + + UserEntity user3 = new UserEntity() + { + + Name = "游客", + UserName = "guest", + Nick = "测试", + Password = "123456", + Email = "454313500@qq.com", + Phone = 15900000000, + Sex = SexEnum.Woman, + Address = "深圳", + Age = 18, + Introduction = "临时游客", + OrderNum = 1, + Remark = "懒得创账号", + State = true + + }; + user3.BuildPassword(); + entities.Add(user3); + + + await _repository.InsertManyAsync(entities); + } + } + } +} diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Repositories/DeptRepository.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Repositories/DeptRepository.cs new file mode 100644 index 00000000..b4e82519 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Repositories/DeptRepository.cs @@ -0,0 +1,27 @@ +using SqlSugar; +using Volo.Abp.DependencyInjection; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Repositories; +using Yi.Framework.SqlSugarCore.Abstractions; +using Yi.Framework.SqlSugarCore.Repositories; + +namespace Yi.Framework.Rbac.SqlSugarCore.Repositories +{ + public class DeptRepository : SqlSugarRepository, IDeptRepository, ITransientDependency + { + public DeptRepository(ISugarDbContextProvider sugarDbContextProvider) : base(sugarDbContextProvider) + { + } + + public async Task> GetChildListAsync(Guid deptId) + { + var entities = await _DbQueryable.ToChildListAsync(x => x.ParentId, deptId); + return entities.Select(x => x.Id).ToList(); + } + public async Task> GetListRoleIdAsync(Guid roleId) + { + + return await _DbQueryable.Where(d => SqlFunc.Subqueryable().Where(rd => rd.RoleId == roleId && d.Id == rd.DeptId).Any()).ToListAsync(); + } + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/Impl/UserRepository.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Repositories/UserRepository.cs similarity index 65% rename from Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/Impl/UserRepository.cs rename to Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Repositories/UserRepository.cs index 25c496d8..e5d95b7d 100644 --- a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/Impl/UserRepository.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Repositories/UserRepository.cs @@ -1,31 +1,29 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Furion.DependencyInjection; +using Mapster; using SqlSugar; -using Yi.Framework.Infrastructure.Sqlsugar.Repositories; -using Yi.Furion.Core.Rbac.Consts; -using Yi.Furion.Core.Rbac.Dtos; -using Yi.Furion.Core.Rbac.Entities; +using Volo.Abp.DependencyInjection; +using Yi.Framework.Rbac.Domain.Entities; +using Yi.Framework.Rbac.Domain.Repositories; +using Yi.Framework.Rbac.Domain.Shared.Consts; +using Yi.Framework.Rbac.Domain.Shared.Dtos; +using Yi.Framework.SqlSugarCore.Abstractions; +using Yi.Framework.SqlSugarCore.Repositories; -namespace Yi.Furion.Sqlsugar.Core.Repositories.Impl +namespace Yi.Framework.Rbac.SqlSugarCore.Repositories { - public class UserRepository : SqlsugarRepository, IUserRepository, ITransient + public class UserRepository : SqlSugarRepository, IUserRepository, ITransientDependency { - public UserRepository(ISqlSugarClient context) : base(context) + public UserRepository(ISugarDbContextProvider sugarDbContextProvider) : base(sugarDbContextProvider) { } - /// /// 获取用户id的全部信息 /// /// /// /// - public async Task GetUserAllInfoAsync(long userId) + public async Task GetUserAllInfoAsync(Guid userId) { var userRoleMenu = new UserRoleMenuDto(); //首先获取到该用户全部信息,导航到角色、菜单,(菜单需要去重,完全交给Set来处理即可) @@ -34,7 +32,7 @@ namespace Yi.Furion.Sqlsugar.Core.Repositories.Impl var user = await _DbQueryable.Includes(u => u.Roles.Where(r => r.IsDeleted == false).ToList(), r => r.Menus.Where(m => m.IsDeleted == false).ToList()).InSingleAsync(userId); if (user is null) { - throw new ArgumentNullException(nameof(userId)); + throw new ArgumentNullException($"参数错误,用户id:{nameof(userId)} 不存在"); } user.Password = string.Empty; user.Salt = string.Empty; @@ -42,7 +40,7 @@ namespace Yi.Furion.Sqlsugar.Core.Repositories.Impl //超级管理员特殊处理 if (UserConst.Admin.Equals(user.UserName)) { - userRoleMenu.User = user; + userRoleMenu.User = user.Adapt(); userRoleMenu.RoleCodes.Add(UserConst.AdminRolesCode); userRoleMenu.PermissionCodes.Add(UserConst.AdminPermissionCode); return userRoleMenu; @@ -64,17 +62,17 @@ namespace Yi.Furion.Sqlsugar.Core.Repositories.Impl { userRoleMenu.PermissionCodes.Add(menu.PermissionCode); } - userRoleMenu.Menus.Add(menu); + userRoleMenu.Menus.Add(menu.Adapt()); } } //刚好可以去除一下多余的导航属性 role.Menus = new List(); - userRoleMenu.Roles.Add(role); + userRoleMenu.Roles.Add(role.Adapt()); } user.Roles = new List(); - userRoleMenu.User = user; + userRoleMenu.User = user.Adapt(); return userRoleMenu; } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Yi.Framework.Rbac.SqlSugarCore.csproj b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Yi.Framework.Rbac.SqlSugarCore.csproj new file mode 100644 index 00000000..09eb82d6 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Yi.Framework.Rbac.SqlSugarCore.csproj @@ -0,0 +1,15 @@ + + + + net7.0 + enable + enable + + + + + + + + + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Yi.Framework.Rbac.SqlSugarCore.xml b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Yi.Framework.Rbac.SqlSugarCore.xml new file mode 100644 index 00000000..64e7125a --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/Yi.Framework.Rbac.SqlSugarCore.xml @@ -0,0 +1,16 @@ + + + + Yi.Framework.Rbac.SqlSugarCore + + + + + 获取用户id的全部信息 + + + + + + + diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/YiFrameworkRbacSqlSugarCoreModule.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/YiFrameworkRbacSqlSugarCoreModule.cs new file mode 100644 index 00000000..1c85803d --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/YiFrameworkRbacSqlSugarCoreModule.cs @@ -0,0 +1,21 @@ +using Volo.Abp.Modularity; +using Yi.Framework.Mapster; +using Yi.Framework.Rbac.Domain; +using Yi.Framework.SqlSugarCore; + +namespace Yi.Framework.Rbac.SqlSugarCore +{ + [DependsOn( + typeof(YiFrameworkRbacDomainModule), + + typeof(YiFrameworkMapsterModule), + typeof(YiFrameworkSqlSugarCoreModule) + )] + public class YiFrameworkRbacSqlSugarCoreModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddYiDbContext(); + } + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/YiRbacDbContext.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/YiRbacDbContext.cs new file mode 100644 index 00000000..5c0a8427 --- /dev/null +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/YiRbacDbContext.cs @@ -0,0 +1,44 @@ +using Microsoft.Extensions.Logging; +using SqlSugar; +using Volo.Abp.DependencyInjection; +using Yi.Framework.SqlSugarCore; + +namespace Yi.Framework.Rbac.SqlSugarCore +{ + public class YiRbacDbContext : SqlSugarDbContext + { + public YiRbacDbContext(IAbpLazyServiceProvider lazyServiceProvider) : base(lazyServiceProvider) + { + } + + protected override void CustomDataFilter() + { + base.CustomDataFilter(); + } + + protected override void DataExecuted(object oldValue, DataAfterModel entityInfo) + { + base.DataExecuted(oldValue, entityInfo); + } + + protected override void DataExecuting(object oldValue, DataFilterModel entityInfo) + { + base.DataExecuting(oldValue, entityInfo); + } + + protected override void OnLogExecuting(string sql, SugarParameter[] pars) + { + base.OnLogExecuting(sql,pars); + } + + protected override void OnLogExecuted(string sql, SugarParameter[] pars) + { + base.OnLogExecuted(sql, pars); + } + + protected override void OnSqlSugarClientConfig(ISqlSugarClient sqlSugarClient) + { + base.OnSqlSugarClientConfig(sqlSugarClient); + } + } +} diff --git a/Yi.Abp.Net8/src/Yi.Abp.Application.Contracts/Yi.Abp.Application.Contracts.csproj b/Yi.Abp.Net8/src/Yi.Abp.Application.Contracts/Yi.Abp.Application.Contracts.csproj new file mode 100644 index 00000000..8cd45e13 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Application.Contracts/Yi.Abp.Application.Contracts.csproj @@ -0,0 +1,16 @@ + + + + net7.0 + enable + enable + + + + + + + + + + diff --git a/Yi.Abp.Net8/src/Yi.Abp.Application.Contracts/Yi.Abp.Application.Contracts.xml b/Yi.Abp.Net8/src/Yi.Abp.Application.Contracts/Yi.Abp.Application.Contracts.xml new file mode 100644 index 00000000..c5cb4252 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Application.Contracts/Yi.Abp.Application.Contracts.xml @@ -0,0 +1,8 @@ + + + + Yi.Abp.Application.Contracts + + + + diff --git a/Yi.Abp.Net8/src/Yi.Abp.Application.Contracts/YiAbpApplicationContractsModule.cs b/Yi.Abp.Net8/src/Yi.Abp.Application.Contracts/YiAbpApplicationContractsModule.cs new file mode 100644 index 00000000..61b959c6 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Application.Contracts/YiAbpApplicationContractsModule.cs @@ -0,0 +1,20 @@ +using Volo.Abp.Modularity; +using Yi.Abp.Domain.Shared; +using Yi.Framework.Bbs.Application.Contracts; +using Yi.Framework.Ddd.Application.Contracts; +using Yi.Framework.Rbac.Application.Contracts; + +namespace Yi.Abp.Application.Contracts +{ + [DependsOn( + typeof(YiAbpDomainSharedModule), + + typeof(YiFrameworkRbacApplicationContractsModule), + typeof(YiFrameworkBbsApplicationContractsModule), + + typeof(YiFrameworkDddApplicationContractsModule))] + public class YiAbpApplicationContractsModule:AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/src/Yi.Abp.Application/Yi.Abp.Application.csproj b/Yi.Abp.Net8/src/Yi.Abp.Application/Yi.Abp.Application.csproj new file mode 100644 index 00000000..774a3f52 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Application/Yi.Abp.Application.csproj @@ -0,0 +1,21 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + + + diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Core/Yi.Furion.Web.Core.xml b/Yi.Abp.Net8/src/Yi.Abp.Application/Yi.Abp.Application.xml similarity index 70% rename from Yi.Furion.Net6/Yi.Furion.Web.Core/Yi.Furion.Web.Core.xml rename to Yi.Abp.Net8/src/Yi.Abp.Application/Yi.Abp.Application.xml index b1536825..5a820a84 100644 --- a/Yi.Furion.Net6/Yi.Furion.Web.Core/Yi.Furion.Web.Core.xml +++ b/Yi.Abp.Net8/src/Yi.Abp.Application/Yi.Abp.Application.xml @@ -1,7 +1,7 @@ - Yi.Furion.Web.Core + Yi.Abp.Application diff --git a/Yi.Abp.Net8/src/Yi.Abp.Application/YiAbpApplicationModule.cs b/Yi.Abp.Net8/src/Yi.Abp.Application/YiAbpApplicationModule.cs new file mode 100644 index 00000000..b7caf81c --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Application/YiAbpApplicationModule.cs @@ -0,0 +1,23 @@ +using Volo.Abp.Modularity; +using Yi.Abp.Application.Contracts; +using Yi.Abp.Domain; +using Yi.Framework.Bbs.Application; +using Yi.Framework.Ddd.Application; +using Yi.Framework.Rbac.Application; + +namespace Yi.Abp.Application +{ + [DependsOn( + typeof(YiAbpApplicationContractsModule), + typeof(YiAbpDomainModule), + + + typeof(YiFrameworkRbacApplicationModule), + typeof(YiFrameworkBbsApplicationModule), + + typeof(YiFrameworkDddApplicationModule) + )] + public class YiAbpApplicationModule : AbpModule + { + } +} diff --git a/Yi.Abp.Net8/src/Yi.Abp.Domain.Shared/Yi.Abp.Domain.Shared.csproj b/Yi.Abp.Net8/src/Yi.Abp.Domain.Shared/Yi.Abp.Domain.Shared.csproj new file mode 100644 index 00000000..b6be1099 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Domain.Shared/Yi.Abp.Domain.Shared.csproj @@ -0,0 +1,18 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + diff --git a/Yi.Abp.Net8/src/Yi.Abp.Domain.Shared/Yi.Abp.Domain.Shared.xml b/Yi.Abp.Net8/src/Yi.Abp.Domain.Shared/Yi.Abp.Domain.Shared.xml new file mode 100644 index 00000000..fa6893c6 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Domain.Shared/Yi.Abp.Domain.Shared.xml @@ -0,0 +1,8 @@ + + + + Yi.Abp.Domain.Shared + + + + diff --git a/Yi.Abp.Net8/src/Yi.Abp.Domain.Shared/YiAbpDomainSharedModule.cs b/Yi.Abp.Net8/src/Yi.Abp.Domain.Shared/YiAbpDomainSharedModule.cs new file mode 100644 index 00000000..78b2724d --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Domain.Shared/YiAbpDomainSharedModule.cs @@ -0,0 +1,17 @@ +using Volo.Abp.Domain; +using Volo.Abp.Modularity; +using Yi.Framework.Bbs.Domain.Shared; +using Yi.Framework.Rbac.Domain.Shared; + +namespace Yi.Abp.Domain.Shared +{ + [DependsOn( + typeof(YiFrameworkRbacDomainSharedModule), + typeof(YiFrameworkBbsDomainSharedModule), + + typeof(AbpDddDomainSharedModule))] + public class YiAbpDomainSharedModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/src/Yi.Abp.Domain/Yi.Abp.Domain.csproj b/Yi.Abp.Net8/src/Yi.Abp.Domain/Yi.Abp.Domain.csproj new file mode 100644 index 00000000..8bd8f309 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Domain/Yi.Abp.Domain.csproj @@ -0,0 +1,23 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + + + + + diff --git a/Yi.Abp.Net8/src/Yi.Abp.Domain/Yi.Abp.Domain.xml b/Yi.Abp.Net8/src/Yi.Abp.Domain/Yi.Abp.Domain.xml new file mode 100644 index 00000000..82702d4b --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Domain/Yi.Abp.Domain.xml @@ -0,0 +1,8 @@ + + + + Yi.Abp.Domain + + + + diff --git a/Yi.Abp.Net8/src/Yi.Abp.Domain/YiAbpDomainModule.cs b/Yi.Abp.Net8/src/Yi.Abp.Domain/YiAbpDomainModule.cs new file mode 100644 index 00000000..89d59769 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Domain/YiAbpDomainModule.cs @@ -0,0 +1,26 @@ +using Volo.Abp.Caching; +using Volo.Abp.Domain; +using Volo.Abp.Modularity; +using Yi.Abp.Domain.Shared; +using Yi.Framework.Bbs.Domain; +using Yi.Framework.Mapster; +using Yi.Framework.Rbac.Domain; + +namespace Yi.Abp.Domain +{ + [DependsOn( + typeof(YiAbpDomainSharedModule), + + + typeof(YiFrameworkRbacDomainModule), + typeof(YiFrameworkBbsDomainModule), + + typeof(YiFrameworkMapsterModule), + typeof(AbpDddDomainModule), + typeof(AbpCachingModule) + )] + public class YiAbpDomainModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/Yi.Abp.SqlSugarCore.csproj b/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/Yi.Abp.SqlSugarCore.csproj new file mode 100644 index 00000000..15f7d085 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/Yi.Abp.SqlSugarCore.csproj @@ -0,0 +1,17 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + diff --git a/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/Yi.Abp.SqlSugarCore.xml b/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/Yi.Abp.SqlSugarCore.xml new file mode 100644 index 00000000..f34a650a --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/Yi.Abp.SqlSugarCore.xml @@ -0,0 +1,8 @@ + + + + Yi.Abp.SqlSugarCore + + + + diff --git a/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/YiAbpSqlSugarCoreModule.cs b/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/YiAbpSqlSugarCoreModule.cs new file mode 100644 index 00000000..42a1ac3d --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/YiAbpSqlSugarCoreModule.cs @@ -0,0 +1,27 @@ +using Volo.Abp.Modularity; +using Yi.Abp.Domain; +using Yi.Abp.SqlSugarCore; +using Yi.Framework.Bbs.SqlSugarCore; +using Yi.Framework.Mapster; +using Yi.Framework.Rbac.SqlSugarCore; +using Yi.Framework.SqlSugarCore; + +namespace Yi.Abp.SqlsugarCore +{ + [DependsOn( + typeof(YiAbpDomainModule), + + typeof(YiFrameworkRbacSqlSugarCoreModule), + typeof(YiFrameworkBbsSqlSugarCoreModule), + + typeof(YiFrameworkMapsterModule), + typeof(YiFrameworkSqlSugarCoreModule) + )] + public class YiAbpSqlSugarCoreModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddYiDbContext(); + } + } +} \ No newline at end of file diff --git a/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/YiDbContext.cs b/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/YiDbContext.cs new file mode 100644 index 00000000..f50bfed9 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.SqlSugarCore/YiDbContext.cs @@ -0,0 +1,48 @@ +using Microsoft.Extensions.Logging; +using SqlSugar; +using Volo.Abp.DependencyInjection; +using Yi.Framework.Rbac.SqlSugarCore; + +namespace Yi.Abp.SqlSugarCore +{ + public class YiDbContext : YiRbacDbContext + { + public YiDbContext(IAbpLazyServiceProvider lazyServiceProvider) : base(lazyServiceProvider) + { + } + + protected override void CustomDataFilter() + { + base.CustomDataFilter(); + } + + protected override void DataExecuted(object oldValue, DataAfterModel entityInfo) + { + base.DataExecuted(oldValue, entityInfo); + } + + protected override void DataExecuting(object oldValue, DataFilterModel entityInfo) + { + base.DataExecuting(oldValue, entityInfo); + } + + protected override void OnLogExecuting(string sql, SugarParameter[] pars) + { + //获取原生SQL推荐 5.1.4.63 性能OK + //UtilMethods.GetNativeSql(sql,pars) + + //获取无参数化SQL 影响性能只适合调试 + this.Logger.CreateLogger().LogInformation(UtilMethods.GetSqlString(DbType.SqlServer, sql, pars)); + } + + protected override void OnLogExecuted(string sql, SugarParameter[] pars) + { + base.OnLogExecuted(sql, pars); + } + + protected override void OnSqlSugarClientConfig(ISqlSugarClient sqlSugarClient) + { + base.OnSqlSugarClientConfig(sqlSugarClient); + } + } +} diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs b/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs new file mode 100644 index 00000000..4f323b0a --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs @@ -0,0 +1,9 @@ +using Yi.Abp.Web; + +var builder = WebApplication.CreateBuilder(args); +builder.WebHost.UseUrls(builder.Configuration["App:SelfUrl"]); +builder.Host.UseAutofac(); +await builder.Services.AddApplicationAsync(); +var app = builder.Build(); +await app.InitializeApplicationAsync(); +await app.RunAsync(); diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/Properties/launchSettings.json b/Yi.Abp.Net8/src/Yi.Abp.Web/Properties/launchSettings.json new file mode 100644 index 00000000..2ab9480b --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/Properties/launchSettings.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "Yi.Abp.Web": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:19001", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj b/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj new file mode 100644 index 00000000..6f887469 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj @@ -0,0 +1,37 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + + + + + + + + + Always + + + + + + Always + + + + diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.xml b/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.xml new file mode 100644 index 00000000..0273f3dc --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.xml @@ -0,0 +1,8 @@ + + + + Yi.Abp.Web + + + + diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs b/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs new file mode 100644 index 00000000..1a80d210 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs @@ -0,0 +1,173 @@ +using System.Text; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Cors; +using Microsoft.IdentityModel.Tokens; +using Microsoft.OpenApi.Models; +using Volo.Abp; +using Volo.Abp.AspNetCore.Authentication.JwtBearer; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.AntiForgery; +using Volo.Abp.AspNetCore.Serilog; +using Volo.Abp.Auditing; +using Volo.Abp.Autofac; +using Volo.Abp.Json; +using Volo.Abp.Modularity; +using Volo.Abp.Swashbuckle; +using Yi.Abp.Application; +using Yi.Abp.SqlsugarCore; +using Yi.Framework.AspNetCore; +using Yi.Framework.AspNetCore.Microsoft.AspNetCore.Builder; +using Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection; +using Yi.Framework.Rbac.Application; +using Yi.Framework.Rbac.Domain.Shared.Options; + +namespace Yi.Abp.Web +{ + [DependsOn( + typeof(YiAbpSqlSugarCoreModule), + typeof(YiAbpApplicationModule), + + typeof(AbpAspNetCoreMvcModule), + typeof(AbpAutofacModule), + typeof(AbpSwashbuckleModule), + typeof(AbpAspNetCoreSerilogModule), + typeof(AbpAuditingModule), + typeof(AbpAspNetCoreAuthenticationJwtBearerModule), + typeof(YiFrameworkAspNetCoreModule) + + )] + public class YiAbpWebModule : AbpModule + { + private const string DefaultCorsPolicyName = "Default"; + public override Task ConfigureServicesAsync(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + var service = context.Services; + //请求日志 + Configure(optios => + { + optios.IsEnabled = true; + optios.AlwaysLogSelectors.Add(x => Task.FromResult(true)); + }); + + //动态Api + Configure(options => + { + options.ConventionalControllers.Create(typeof(YiAbpApplicationModule).Assembly); + options.ConventionalControllers.Create(typeof(YiFrameworkRbacApplicationModule).Assembly); + }); + + //设置api格式 + service.AddControllers().AddNewtonsoftJson(options => + { + // options.SerializerSettings.Converters.Add(new DateTimeJsonConverter("yyyy-MM-dd HH:mm:ss")); + options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss"; + }); + Configure(options => + { + options.OutputDateTimeFormat = "yyyy-MM-dd HH:mm:ss"; + }); + + Configure(options => + { + options.AutoValidate = false; + + }); + + //Swagger + context.Services.AddYiSwaggerGen( + options => + { + options.SwaggerDoc("v1", new OpenApiInfo { Title = "Yi-Abp", Version = "v1" }); + options.DocInclusionPredicate((docName, description) => true); + options.CustomSchemaIds(type => type.FullName); + } + ); + + //跨域 + context.Services.AddCors(options => + { + options.AddPolicy(DefaultCorsPolicyName, builder => + { + builder + .WithOrigins( + configuration["App:CorsOrigins"]! + .Split(";", StringSplitOptions.RemoveEmptyEntries) + .Select(o => o.RemovePostFix("/")) + .ToArray() + ) + .WithAbpExposedHeaders() + .SetIsOriginAllowedToAllowWildcardSubdomains() + .AllowAnyHeader() + .AllowAnyMethod() + .AllowCredentials(); + }); + }); + + + + + //jwt鉴权 + var section = configuration.GetSection(nameof(JwtOptions)); + Configure(section); + var jwtOptions = section.Get(); + context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) + .AddJwtBearer(options => + { + options.TokenValidationParameters = new TokenValidationParameters + { + ClockSkew = TimeSpan.Zero, + ValidateIssuer = true, + ValidateAudience = true, + ValidateLifetime = true, + ValidateIssuerSigningKey = true, + ValidIssuer = jwtOptions.Issuer, + ValidAudience = jwtOptions.Audience, + RequireExpirationTime = true, + IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(jwtOptions.SecurityKey)) + }; + options.Events = new JwtBearerEvents + { + OnMessageReceived = context => + { + var accessToken = context.Request.Query["access_token"]; + if (!string.IsNullOrEmpty(accessToken)) + { + context.Token = accessToken; + } + return Task.CompletedTask; + } + }; + }); + + //授权 + context.Services.AddAuthorization(); + return Task.CompletedTask; + } + + public override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) + { + var service = context.ServiceProvider; + + var env = context.GetEnvironment(); + var app = context.GetApplicationBuilder(); + + + app.UseRouting(); + app.UseCors(DefaultCorsPolicyName); + app.UseAuthentication(); + + app.UseYiSwagger(); + //app.UseYiApiHandlinge(); + app.UseUnitOfWork(); + app.UseAuthorization(); + app.UseAuditing(); + + app.UseAbpSerilogEnrichers(); + + app.UseConfiguredEndpoints(); + + return Task.CompletedTask; + } + } +} diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/appsettings.json b/Yi.Abp.Net8/src/Yi.Abp.Web/appsettings.json new file mode 100644 index 00000000..6fd733d5 --- /dev/null +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/appsettings.json @@ -0,0 +1,39 @@ +{ + "Logging": { + "LogLevel": { + //"Default": "Information", + "Default": "Debug", + "Microsoft.AspNetCore": "Warning" + } + }, + //应用启动 + "App": { + "SelfUrl": "http://*:19001", + "CorsOrigins": "http://localhost:19001;http://localhost:18000" + }, + + //数据库类型列表 + "DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ], + + "DbConnOptions": { + "Url": "DataSource=yi-abp-dev.db", + "DbType": "Sqlite", + "EnabledReadWrite": false, + "EnabledCodeFirst": true, + "EnabledSqlLog":true + //读写分离地址 + //"ReadUrl": [ + // "DataSource=[xxxx]", //Sqlite + // "server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]", //Mysql + // "Data Source=[xxxx];Initial Catalog=[xxxx];User ID=[xxxx];password=[xxxx]" //Sqlserver + //] + }, + + //鉴权 + "JwtOptions": { + "Issuer": "https://ccnetcore.com", + "Audience": "https://ccnetcore.com", + "SecurityKey": "zqxwcevrbtnymu312412ihe9rfwhe78rh23djoi32hrui3ryf9e8wfh34iuj54y0934uti4h97fgw7hf97wyh8yy69520", + "ExpiresMinuteTime": 86400 + } +} diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/ip2region.db b/Yi.Abp.Net8/src/Yi.Abp.Web/ip2region.db similarity index 100% rename from Yi.Furion.Net6/Yi.Furion.Web.Entry/ip2region.db rename to Yi.Abp.Net8/src/Yi.Abp.Web/ip2region.db diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/yi-furion-dev.db b/Yi.Abp.Net8/src/Yi.Abp.Web/yi-abp-dev.db similarity index 66% rename from Yi.Furion.Net6/Yi.Furion.Web.Entry/yi-furion-dev.db rename to Yi.Abp.Net8/src/Yi.Abp.Web/yi-abp-dev.db index f843672f..a244c812 100644 Binary files a/Yi.Furion.Net6/Yi.Furion.Web.Entry/yi-furion-dev.db and b/Yi.Abp.Net8/src/Yi.Abp.Web/yi-abp-dev.db differ diff --git a/Yi.App.Vue3/.env.development b/Yi.App.Vue3/.env.development deleted file mode 100644 index fa4ea55e..00000000 --- a/Yi.App.Vue3/.env.development +++ /dev/null @@ -1,17 +0,0 @@ -# 页面标题 -VITE_APP_TITLE = 意框架管理系统 - -# 开发环境配置 -VITE_APP_ENV = 'development' - -# 若依管理系统/开发环境 -VITE_APP_BASE_API = '/dev-api' - -# ws/开发环境 -VITE_APP_BASE_WS = '/dev-ws' - - -VITE_APP_BASE_URL='http://localhost:19001/api' - - - diff --git a/Yi.App.Vue3/.env.production b/Yi.App.Vue3/.env.production deleted file mode 100644 index 565a45ef..00000000 --- a/Yi.App.Vue3/.env.production +++ /dev/null @@ -1,15 +0,0 @@ -# 页面标题 -VITE_APP_TITLE = 意框架管理系统 - -# 生产环境配置 -VITE_APP_ENV = 'production' - -# 意框架管理系统/生产环境 -VITE_APP_BASE_API = '/prod-api' - -# ws/开发环境 -VITE_APP_BASE_WS = '/prod-ws' - -# 是否在打包时开启压缩,支持 gzip 和 brotli -VITE_BUILD_COMPRESS = gzip - diff --git a/Yi.App.Vue3/.env.staging b/Yi.App.Vue3/.env.staging deleted file mode 100644 index 58e3fbcd..00000000 --- a/Yi.App.Vue3/.env.staging +++ /dev/null @@ -1,15 +0,0 @@ -# 页面标题 -VITE_APP_TITLE = 意框架管理系统 - -# 生产环境配置 -VITE_APP_ENV = 'staging' - -# 若依管理系统/生产环境 -VITE_APP_BASE_API = '/stage-api' - -# ws/开发环境 -VITE_APP_BASE_WS = '/stage-ws' - -# 是否在打包时开启压缩,支持 gzip 和 brotli -VITE_BUILD_COMPRESS = gzip - diff --git a/Yi.App.Vue3/.gitignore b/Yi.App.Vue3/.gitignore deleted file mode 100644 index a547bf36..00000000 --- a/Yi.App.Vue3/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/Yi.App.Vue3/.vscode/extensions.json b/Yi.App.Vue3/.vscode/extensions.json deleted file mode 100644 index a7cea0b0..00000000 --- a/Yi.App.Vue3/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["Vue.volar"] -} diff --git a/Yi.App.Vue3/README.md b/Yi.App.Vue3/README.md deleted file mode 100644 index 30b15e21..00000000 --- a/Yi.App.Vue3/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Vue 3 + TypeScript + Vite - -This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 ` - - diff --git a/Yi.App.Vue3/package-lock.json b/Yi.App.Vue3/package-lock.json deleted file mode 100644 index 33c14624..00000000 --- a/Yi.App.Vue3/package-lock.json +++ /dev/null @@ -1,2543 +0,0 @@ -{ - "name": "yi", - "version": "0.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "yi", - "version": "0.0.0", - "dependencies": { - "axios": "^1.1.2", - "json-bigint": "^1.0.0", - "pinia": "^2.0.23", - "vant": "^3.6.3", - "vue": "^3.2.37", - "vue-router": "^4.1.5", - "vuex": "^4.0.2" - }, - "devDependencies": { - "@types/json-bigint": "^1.0.1", - "@types/node": "^18.8.2", - "@vitejs/plugin-vue": "^3.1.0", - "typescript": "^4.6.4", - "unplugin-vue-components": "^0.22.7", - "vite": "^3.1.0", - "vue-tsc": "^0.40.4" - } - }, - "node_modules/@antfu/utils": { - "version": "0.5.2", - "resolved": "https://registry.npmmirror.com/@antfu/utils/-/utils-0.5.2.tgz", - "integrity": "sha512-CQkeV+oJxUazwjlHD0/3ZD08QWKuGQkhnrKo3e6ly5pd48VUpXbb77q0xMU4+vc2CkJnDS02Eq/M9ugyX20XZA==", - "dev": true - }, - "node_modules/@babel/parser": { - "version": "7.19.3", - "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.19.3.tgz", - "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.15.10.tgz", - "integrity": "sha512-FNONeQPy/ox+5NBkcSbYJxoXj9GWu8gVGJTVmUyoOCKQFDTrHVKgNSzChdNt0I8Aj/iKcsDf2r9BFwv+FSNUXg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.15.10.tgz", - "integrity": "sha512-w0Ou3Z83LOYEkwaui2M8VwIp+nLi/NA60lBLMvaJ+vXVMcsARYdEzLNE7RSm4+lSg4zq4d7fAVuzk7PNQ5JFgg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@rollup/pluginutils": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", - "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", - "dev": true, - "dependencies": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/@types/json-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.1.tgz", - "integrity": "sha512-zpchZLNsNuzJHi6v64UBoFWAvQlPhch7XAi36FkH6tL1bbbmimIF+cS7vwkzY4u5RaSWMoflQfu+TshMPPw8uw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "18.8.2", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-18.8.2.tgz", - "integrity": "sha512-cRMwIgdDN43GO4xMWAfJAecYn8wV4JbsOGHNfNUIDiuYkUYAR5ec4Rj7IO2SAhFPEfpPtLtUTbbny/TCT7aDwA==", - "dev": true - }, - "node_modules/@vant/icons": { - "version": "1.8.0", - "resolved": "https://registry.npmmirror.com/@vant/icons/-/icons-1.8.0.tgz", - "integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg==" - }, - "node_modules/@vant/popperjs": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz", - "integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw==" - }, - "node_modules/@vant/use": { - "version": "1.4.3", - "resolved": "https://registry.npmmirror.com/@vant/use/-/use-1.4.3.tgz", - "integrity": "sha512-rSnETN7P9qT1WbItMpQxBqe3cHeK2ZFYp1sCxWUXaTeI71TqA8sOdzC36ledZ36NQgFNTch9fsRPYOkrCgZfQA==" - }, - "node_modules/@vitejs/plugin-vue": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-3.1.2.tgz", - "integrity": "sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==", - "dev": true, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "peerDependencies": { - "vite": "^3.0.0", - "vue": "^3.2.25" - } - }, - "node_modules/@volar/code-gen": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/@volar/code-gen/-/code-gen-0.40.13.tgz", - "integrity": "sha512-4gShBWuMce868OVvgyA1cU5WxHbjfEme18Tw6uVMfweZCF5fB2KECG0iPrA9D54vHk3FeHarODNwgIaaFfUBlA==", - "dev": true, - "dependencies": { - "@volar/source-map": "0.40.13" - } - }, - "node_modules/@volar/source-map": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/@volar/source-map/-/source-map-0.40.13.tgz", - "integrity": "sha512-dbdkAB2Nxb0wLjAY5O64o3ywVWlAGONnBIoKAkXSf6qkGZM+nJxcizsoiI66K+RHQG0XqlyvjDizfnTxr+6PWg==", - "dev": true, - "dependencies": { - "@vue/reactivity": "3.2.38" - } - }, - "node_modules/@volar/source-map/node_modules/@vue/reactivity": { - "version": "3.2.38", - "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.2.38.tgz", - "integrity": "sha512-6L4myYcH9HG2M25co7/BSo0skKFHpAN8PhkNPM4xRVkyGl1K5M3Jx4rp5bsYhvYze2K4+l+pioN4e6ZwFLUVtw==", - "dev": true, - "dependencies": { - "@vue/shared": "3.2.38" - } - }, - "node_modules/@volar/source-map/node_modules/@vue/shared": { - "version": "3.2.38", - "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.38.tgz", - "integrity": "sha512-dTyhTIRmGXBjxJE+skC8tTWCGLCVc4wQgRRLt8+O9p5ewBAjoBwtCAkLPrtToSr1xltoe3st21Pv953aOZ7alg==", - "dev": true - }, - "node_modules/@volar/typescript-faster": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/@volar/typescript-faster/-/typescript-faster-0.40.13.tgz", - "integrity": "sha512-uy+TlcFkKoNlKEnxA4x5acxdxLyVDIXGSc8cYDNXpPKjBKXrQaetzCzlO3kVBqu1VLMxKNGJMTKn35mo+ILQmw==", - "dev": true, - "dependencies": { - "semver": "^7.3.7" - } - }, - "node_modules/@volar/vue-language-core": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/@volar/vue-language-core/-/vue-language-core-0.40.13.tgz", - "integrity": "sha512-QkCb8msi2KUitTdM6Y4kAb7/ZlEvuLcbBFOC2PLBlFuoZwyxvSP7c/dBGmKGtJlEvMX0LdCyrg5V2aBYxD38/Q==", - "dev": true, - "dependencies": { - "@volar/code-gen": "0.40.13", - "@volar/source-map": "0.40.13", - "@vue/compiler-core": "^3.2.38", - "@vue/compiler-dom": "^3.2.38", - "@vue/compiler-sfc": "^3.2.38", - "@vue/reactivity": "^3.2.38", - "@vue/shared": "^3.2.38" - } - }, - "node_modules/@volar/vue-typescript": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/@volar/vue-typescript/-/vue-typescript-0.40.13.tgz", - "integrity": "sha512-o7bNztwjs8JmbQjVkrnbZUOfm7q4B8ZYssETISN1tRaBdun6cfNqgpkvDYd+VUBh1O4CdksvN+5BUNnwAz4oCQ==", - "dev": true, - "dependencies": { - "@volar/code-gen": "0.40.13", - "@volar/typescript-faster": "0.40.13", - "@volar/vue-language-core": "0.40.13" - } - }, - "node_modules/@vue/compiler-core": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.2.40.tgz", - "integrity": "sha512-2Dc3Stk0J/VyQ4OUr2yEC53kU28614lZS+bnrCbFSAIftBJ40g/2yQzf4mPBiFuqguMB7hyHaujdgZAQ67kZYA==", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.40", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "node_modules/@vue/compiler-dom": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.2.40.tgz", - "integrity": "sha512-OZCNyYVC2LQJy4H7h0o28rtk+4v+HMQygRTpmibGoG9wZyomQiS5otU7qo3Wlq5UfHDw2RFwxb9BJgKjVpjrQw==", - "dependencies": { - "@vue/compiler-core": "3.2.40", - "@vue/shared": "3.2.40" - } - }, - "node_modules/@vue/compiler-sfc": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.2.40.tgz", - "integrity": "sha512-tzqwniIN1fu1PDHC3CpqY/dPCfN/RN1thpBC+g69kJcrl7mbGiHKNwbA6kJ3XKKy8R6JLKqcpVugqN4HkeBFFg==", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.40", - "@vue/compiler-dom": "3.2.40", - "@vue/compiler-ssr": "3.2.40", - "@vue/reactivity-transform": "3.2.40", - "@vue/shared": "3.2.40", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "node_modules/@vue/compiler-ssr": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.2.40.tgz", - "integrity": "sha512-80cQcgasKjrPPuKcxwuCx7feq+wC6oFl5YaKSee9pV3DNq+6fmCVwEEC3vvkf/E2aI76rIJSOYHsWSEIxK74oQ==", - "dependencies": { - "@vue/compiler-dom": "3.2.40", - "@vue/shared": "3.2.40" - } - }, - "node_modules/@vue/devtools-api": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.4.4.tgz", - "integrity": "sha512-Ku31WzpOV/8cruFaXaEZKF81WkNnvCSlBY4eOGtz5WMSdJvX1v1WWlSMGZeqUwPtQ27ZZz7B62erEMq8JDjcXw==" - }, - "node_modules/@vue/reactivity": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.2.40.tgz", - "integrity": "sha512-N9qgGLlZmtUBMHF9xDT4EkD9RdXde1Xbveb+niWMXuHVWQP5BzgRmE3SFyUBBcyayG4y1lhoz+lphGRRxxK4RA==", - "dependencies": { - "@vue/shared": "3.2.40" - } - }, - "node_modules/@vue/reactivity-transform": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/reactivity-transform/-/reactivity-transform-3.2.40.tgz", - "integrity": "sha512-HQUCVwEaacq6fGEsg2NUuGKIhUveMCjOk8jGHqLXPI2w6zFoPrlQhwWEaINTv5kkZDXKEnCijAp+4gNEHG03yw==", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.40", - "@vue/shared": "3.2.40", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - } - }, - "node_modules/@vue/runtime-core": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.2.40.tgz", - "integrity": "sha512-U1+rWf0H8xK8aBUZhnrN97yoZfHbjgw/bGUzfgKPJl69/mXDuSg8CbdBYBn6VVQdR947vWneQBFzdhasyzMUKg==", - "dependencies": { - "@vue/reactivity": "3.2.40", - "@vue/shared": "3.2.40" - } - }, - "node_modules/@vue/runtime-dom": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.2.40.tgz", - "integrity": "sha512-AO2HMQ+0s2+MCec8hXAhxMgWhFhOPJ/CyRXnmTJ6XIOnJFLrH5Iq3TNwvVcODGR295jy77I6dWPj+wvFoSYaww==", - "dependencies": { - "@vue/runtime-core": "3.2.40", - "@vue/shared": "3.2.40", - "csstype": "^2.6.8" - } - }, - "node_modules/@vue/server-renderer": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.2.40.tgz", - "integrity": "sha512-gtUcpRwrXOJPJ4qyBpU3EyxQa4EkV8I4f8VrDePcGCPe4O/hd0BPS7v9OgjIQob6Ap8VDz9G+mGTKazE45/95w==", - "dependencies": { - "@vue/compiler-ssr": "3.2.40", - "@vue/shared": "3.2.40" - }, - "peerDependencies": { - "vue": "3.2.40" - } - }, - "node_modules/@vue/shared": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.40.tgz", - "integrity": "sha512-0PLQ6RUtZM0vO3teRfzGi4ltLUO5aO+kLgwh4Um3THSR03rpQWLTuRCkuO5A41ITzwdWeKdPHtSARuPkoo5pCQ==" - }, - "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/axios": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.1.2.tgz", - "integrity": "sha512-bznQyETwElsXl2RK7HLLwb5GPpOLlycxHCtrpDR/4RqqBzjARaOTo3jz4IgtntWUYee7Ne4S8UHd92VCuzPaWA==", - "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/bignumber.js": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz", - "integrity": "sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==", - "engines": { - "node": "*" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmmirror.com/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/esbuild": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.15.10.tgz", - "integrity": "sha512-N7wBhfJ/E5fzn/SpNgX+oW2RLRjwaL8Y0ezqNqhjD6w0H2p0rDuEz2FKZqpqLnO8DCaWumKe8dsC/ljvVSSxng==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.15.10", - "@esbuild/linux-loong64": "0.15.10", - "esbuild-android-64": "0.15.10", - "esbuild-android-arm64": "0.15.10", - "esbuild-darwin-64": "0.15.10", - "esbuild-darwin-arm64": "0.15.10", - "esbuild-freebsd-64": "0.15.10", - "esbuild-freebsd-arm64": "0.15.10", - "esbuild-linux-32": "0.15.10", - "esbuild-linux-64": "0.15.10", - "esbuild-linux-arm": "0.15.10", - "esbuild-linux-arm64": "0.15.10", - "esbuild-linux-mips64le": "0.15.10", - "esbuild-linux-ppc64le": "0.15.10", - "esbuild-linux-riscv64": "0.15.10", - "esbuild-linux-s390x": "0.15.10", - "esbuild-netbsd-64": "0.15.10", - "esbuild-openbsd-64": "0.15.10", - "esbuild-sunos-64": "0.15.10", - "esbuild-windows-32": "0.15.10", - "esbuild-windows-64": "0.15.10", - "esbuild-windows-arm64": "0.15.10" - } - }, - "node_modules/esbuild-android-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-android-64/-/esbuild-android-64-0.15.10.tgz", - "integrity": "sha512-UI7krF8OYO1N7JYTgLT9ML5j4+45ra3amLZKx7LO3lmLt1Ibn8t3aZbX5Pu4BjWiqDuJ3m/hsvhPhK/5Y/YpnA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-android-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.10.tgz", - "integrity": "sha512-EOt55D6xBk5O05AK8brXUbZmoFj4chM8u3riGflLa6ziEoVvNjRdD7Cnp82NHQGfSHgYR06XsPI8/sMuA/cUwg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.10.tgz", - "integrity": "sha512-hbDJugTicqIm+WKZgp208d7FcXcaK8j2c0l+fqSJ3d2AzQAfjEYDRM3Z2oMeqSJ9uFxyj/muSACLdix7oTstRA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.10.tgz", - "integrity": "sha512-M1t5+Kj4IgSbYmunf2BB6EKLkWUq+XlqaFRiGOk8bmBapu9bCDrxjf4kUnWn59Dka3I27EiuHBKd1rSO4osLFQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.10.tgz", - "integrity": "sha512-KMBFMa7C8oc97nqDdoZwtDBX7gfpolkk6Bcmj6YFMrtCMVgoU/x2DI1p74DmYl7CSS6Ppa3xgemrLrr5IjIn0w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.10.tgz", - "integrity": "sha512-m2KNbuCX13yQqLlbSojFMHpewbn8wW5uDS6DxRpmaZKzyq8Dbsku6hHvh2U+BcLwWY4mpgXzFUoENEf7IcioGg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-32": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-32/-/esbuild-linux-32-0.15.10.tgz", - "integrity": "sha512-guXrwSYFAvNkuQ39FNeV4sNkNms1bLlA5vF1H0cazZBOLdLFIny6BhT+TUbK/hdByMQhtWQ5jI9VAmPKbVPu1w==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-64/-/esbuild-linux-64-0.15.10.tgz", - "integrity": "sha512-jd8XfaSJeucMpD63YNMO1JCrdJhckHWcMv6O233bL4l6ogQKQOxBYSRP/XLWP+6kVTu0obXovuckJDcA0DKtQA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.10.tgz", - "integrity": "sha512-6N8vThLL/Lysy9y4Ex8XoLQAlbZKUyExCWyayGi2KgTBelKpPgj6RZnUaKri0dHNPGgReJriKVU6+KDGQwn10A==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.10.tgz", - "integrity": "sha512-GByBi4fgkvZFTHFDYNftu1DQ1GzR23jws0oWyCfhnI7eMOe+wgwWrc78dbNk709Ivdr/evefm2PJiUBMiusS1A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-mips64le": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.10.tgz", - "integrity": "sha512-BxP+LbaGVGIdQNJUNF7qpYjEGWb0YyHVSKqYKrn+pTwH/SiHUxFyJYSP3pqkku61olQiSBnSmWZ+YUpj78Tw7Q==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-ppc64le": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.10.tgz", - "integrity": "sha512-LoSQCd6498PmninNgqd/BR7z3Bsk/mabImBWuQ4wQgmQEeanzWd5BQU2aNi9mBURCLgyheuZS6Xhrw5luw3OkQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-riscv64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.10.tgz", - "integrity": "sha512-Lrl9Cr2YROvPV4wmZ1/g48httE8z/5SCiXIyebiB5N8VT7pX3t6meI7TQVHw/wQpqP/AF4SksDuFImPTM7Z32Q==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-s390x": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.10.tgz", - "integrity": "sha512-ReP+6q3eLVVP2lpRrvl5EodKX7EZ1bS1/z5j6hsluAlZP5aHhk6ghT6Cq3IANvvDdscMMCB4QEbI+AjtvoOFpA==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-netbsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.10.tgz", - "integrity": "sha512-iGDYtJCMCqldMskQ4eIV+QSS/CuT7xyy9i2/FjpKvxAuCzrESZXiA1L64YNj6/afuzfBe9i8m/uDkFHy257hTw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-openbsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.10.tgz", - "integrity": "sha512-ftMMIwHWrnrYnvuJQRJs/Smlcb28F9ICGde/P3FUTCgDDM0N7WA0o9uOR38f5Xe2/OhNCgkjNeb7QeaE3cyWkQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-sunos-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.10.tgz", - "integrity": "sha512-mf7hBL9Uo2gcy2r3rUFMjVpTaGpFJJE5QTDDqUFf1632FxteYANffDZmKbqX0PfeQ2XjUDE604IcE7OJeoHiyg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-32": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-windows-32/-/esbuild-windows-32-0.15.10.tgz", - "integrity": "sha512-ttFVo+Cg8b5+qHmZHbEc8Vl17kCleHhLzgT8X04y8zudEApo0PxPg9Mz8Z2cKH1bCYlve1XL8LkyXGFjtUYeGg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-windows-64/-/esbuild-windows-64-0.15.10.tgz", - "integrity": "sha512-2H0gdsyHi5x+8lbng3hLbxDWR7mKHWh5BXZGKVG830KUmXOOWFE2YKJ4tHRkejRduOGDrBvHBriYsGtmTv3ntA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.10.tgz", - "integrity": "sha512-S+th4F+F8VLsHLR0zrUcG+Et4hx0RKgK1eyHc08kztmLOES8BWwMiaGdoW9hiXuzznXQ0I/Fg904MNbr11Nktw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" - }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/local-pkg": { - "version": "0.4.2", - "resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-0.4.2.tgz", - "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/pinia": { - "version": "2.0.23", - "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.23.tgz", - "integrity": "sha512-N15hFf4o5STrxpNrib1IEb1GOArvPYf1zPvQVRGOO1G1d74Ak0J0lVyalX/SmrzdT4Q0nlEFjbURsmBmIGUR5Q==", - "dependencies": { - "@vue/devtools-api": "^6.4.4", - "vue-demi": "*" - }, - "peerDependencies": { - "@vue/composition-api": "^1.4.0", - "typescript": ">=4.4.4", - "vue": "^2.6.14 || ^3.2.0" - }, - "peerDependenciesMeta": { - "@vue/composition-api": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/pinia/node_modules/vue-demi": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", - "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", - "hasInstallScript": true, - "bin": { - "vue-demi-fix": "bin/vue-demi-fix.js", - "vue-demi-switch": "bin/vue-demi-switch.js" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "@vue/composition-api": "^1.0.0-rc.1", - "vue": "^3.0.0-0 || ^2.6.0" - }, - "peerDependenciesMeta": { - "@vue/composition-api": { - "optional": true - } - } - }, - "node_modules/postcss": { - "version": "8.4.17", - "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.17.tgz", - "integrity": "sha512-UNxNOLQydcOFi41yHNMcKRZ39NeXlr8AxGuZJsdub8vIb12fHzcq37DTU/QtbI6WLxNg2gF9Z+8qtRwTj1UI1Q==", - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rollup": { - "version": "2.78.1", - "resolved": "https://registry.npmmirror.com/rollup/-/rollup-2.78.1.tgz", - "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=10.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmmirror.com/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead" - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmmirror.com/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", - "devOptional": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/unplugin": { - "version": "0.9.6", - "resolved": "https://registry.npmmirror.com/unplugin/-/unplugin-0.9.6.tgz", - "integrity": "sha512-YYLtfoNiie/lxswy1GOsKXgnLJTE27la/PeCGznSItk+8METYZErO+zzV9KQ/hXhPwzIJsfJ4s0m1Rl7ZCWZ4Q==", - "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "chokidar": "^3.5.3", - "webpack-sources": "^3.2.3", - "webpack-virtual-modules": "^0.4.5" - } - }, - "node_modules/unplugin-vue-components": { - "version": "0.22.7", - "resolved": "https://registry.npmmirror.com/unplugin-vue-components/-/unplugin-vue-components-0.22.7.tgz", - "integrity": "sha512-MJEAKJF9bRykTRvJ4WXF0FNMAyt1PX3iwpu2NN+li35sAKjQv6sC1col5aZDLiwDZDo2AGwxNkzLJFKaun9qHw==", - "dev": true, - "dependencies": { - "@antfu/utils": "^0.5.2", - "@rollup/pluginutils": "^4.2.1", - "chokidar": "^3.5.3", - "debug": "^4.3.4", - "fast-glob": "^3.2.12", - "local-pkg": "^0.4.2", - "magic-string": "^0.26.3", - "minimatch": "^5.1.0", - "resolve": "^1.22.1", - "unplugin": "^0.9.5" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@babel/parser": "^7.15.8", - "vue": "2 || 3" - }, - "peerDependenciesMeta": { - "@babel/parser": { - "optional": true - } - } - }, - "node_modules/unplugin-vue-components/node_modules/magic-string": { - "version": "0.26.5", - "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.26.5.tgz", - "integrity": "sha512-yXUIYOOQnEHKHOftp5shMWpB9ImfgfDJpapa38j/qMtTj5QHWucvxP4lUtuRmHT9vAzvtpHkWKXW9xBwimXeNg==", - "dev": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/vant": { - "version": "3.6.3", - "resolved": "https://registry.npmmirror.com/vant/-/vant-3.6.3.tgz", - "integrity": "sha512-OmqQXgtgJgNNoGV8FzvGkm/fvXOB70ZmruOUU4iJaEmEwdsdYl+31D6niisWZLVAbGW1Xx9rLrOu9hivdxQbbg==", - "dependencies": { - "@vant/icons": "^1.8.0", - "@vant/popperjs": "^1.2.1", - "@vant/use": "^1.4.2" - }, - "peerDependencies": { - "vue": "^3.0.0" - } - }, - "node_modules/vite": { - "version": "3.1.4", - "resolved": "https://registry.npmmirror.com/vite/-/vite-3.1.4.tgz", - "integrity": "sha512-JoQI08aBjY9lycL7jcEq4p9o1xUjq5aRvdH4KWaXtkSx7e7RpAh9D3IjzDWRD4Fg44LS3oDAIOG/Kq1L+82psA==", - "dev": true, - "dependencies": { - "esbuild": "^0.15.6", - "postcss": "^8.4.16", - "resolve": "^1.22.1", - "rollup": "~2.78.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "less": "*", - "sass": "*", - "stylus": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/vue": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/vue/-/vue-3.2.40.tgz", - "integrity": "sha512-1mGHulzUbl2Nk3pfvI5aXYYyJUs1nm4kyvuz38u4xlQkLUn1i2R7nDbI4TufECmY8v1qNBHYy62bCaM+3cHP2A==", - "dependencies": { - "@vue/compiler-dom": "3.2.40", - "@vue/compiler-sfc": "3.2.40", - "@vue/runtime-dom": "3.2.40", - "@vue/server-renderer": "3.2.40", - "@vue/shared": "3.2.40" - } - }, - "node_modules/vue-router": { - "version": "4.1.5", - "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.1.5.tgz", - "integrity": "sha512-IsvoF5D2GQ/EGTs/Th4NQms9gd2NSqV+yylxIyp/OYp8xOwxmU8Kj/74E9DTSYAyH5LX7idVUngN3JSj1X4xcQ==", - "dependencies": { - "@vue/devtools-api": "^6.1.4" - }, - "peerDependencies": { - "vue": "^3.2.0" - } - }, - "node_modules/vue-tsc": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/vue-tsc/-/vue-tsc-0.40.13.tgz", - "integrity": "sha512-xzuN3g5PnKfJcNrLv4+mAjteMd5wLm5fRhW0034OfNJZY4WhB07vhngea/XeGn7wNYt16r7syonzvW/54dcNiA==", - "dev": true, - "dependencies": { - "@volar/vue-language-core": "0.40.13", - "@volar/vue-typescript": "0.40.13" - }, - "bin": { - "vue-tsc": "bin/vue-tsc.js" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "node_modules/vuex": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.0.2.tgz", - "integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==", - "dependencies": { - "@vue/devtools-api": "^6.0.0-beta.11" - }, - "peerDependencies": { - "vue": "^3.0.2" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack-virtual-modules": { - "version": "0.4.5", - "resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.4.5.tgz", - "integrity": "sha512-8bWq0Iluiv9lVf9YaqWQ9+liNgXSHICm+rg544yRgGYaR8yXZTVBaHZkINZSB2yZSWo4b0F6MIxqJezVfOEAlg==", - "dev": true - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - }, - "dependencies": { - "@antfu/utils": { - "version": "0.5.2", - "resolved": "https://registry.npmmirror.com/@antfu/utils/-/utils-0.5.2.tgz", - "integrity": "sha512-CQkeV+oJxUazwjlHD0/3ZD08QWKuGQkhnrKo3e6ly5pd48VUpXbb77q0xMU4+vc2CkJnDS02Eq/M9ugyX20XZA==", - "dev": true - }, - "@babel/parser": { - "version": "7.19.3", - "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.19.3.tgz", - "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==" - }, - "@esbuild/android-arm": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.15.10.tgz", - "integrity": "sha512-FNONeQPy/ox+5NBkcSbYJxoXj9GWu8gVGJTVmUyoOCKQFDTrHVKgNSzChdNt0I8Aj/iKcsDf2r9BFwv+FSNUXg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.15.10.tgz", - "integrity": "sha512-w0Ou3Z83LOYEkwaui2M8VwIp+nLi/NA60lBLMvaJ+vXVMcsARYdEzLNE7RSm4+lSg4zq4d7fAVuzk7PNQ5JFgg==", - "dev": true, - "optional": true - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@rollup/pluginutils": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", - "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", - "dev": true, - "requires": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - } - }, - "@types/json-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.1.tgz", - "integrity": "sha512-zpchZLNsNuzJHi6v64UBoFWAvQlPhch7XAi36FkH6tL1bbbmimIF+cS7vwkzY4u5RaSWMoflQfu+TshMPPw8uw==", - "dev": true - }, - "@types/node": { - "version": "18.8.2", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-18.8.2.tgz", - "integrity": "sha512-cRMwIgdDN43GO4xMWAfJAecYn8wV4JbsOGHNfNUIDiuYkUYAR5ec4Rj7IO2SAhFPEfpPtLtUTbbny/TCT7aDwA==", - "dev": true - }, - "@vant/icons": { - "version": "1.8.0", - "resolved": "https://registry.npmmirror.com/@vant/icons/-/icons-1.8.0.tgz", - "integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg==" - }, - "@vant/popperjs": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz", - "integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw==" - }, - "@vant/use": { - "version": "1.4.3", - "resolved": "https://registry.npmmirror.com/@vant/use/-/use-1.4.3.tgz", - "integrity": "sha512-rSnETN7P9qT1WbItMpQxBqe3cHeK2ZFYp1sCxWUXaTeI71TqA8sOdzC36ledZ36NQgFNTch9fsRPYOkrCgZfQA==" - }, - "@vitejs/plugin-vue": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-3.1.2.tgz", - "integrity": "sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==", - "dev": true, - "requires": {} - }, - "@volar/code-gen": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/@volar/code-gen/-/code-gen-0.40.13.tgz", - "integrity": "sha512-4gShBWuMce868OVvgyA1cU5WxHbjfEme18Tw6uVMfweZCF5fB2KECG0iPrA9D54vHk3FeHarODNwgIaaFfUBlA==", - "dev": true, - "requires": { - "@volar/source-map": "0.40.13" - } - }, - "@volar/source-map": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/@volar/source-map/-/source-map-0.40.13.tgz", - "integrity": "sha512-dbdkAB2Nxb0wLjAY5O64o3ywVWlAGONnBIoKAkXSf6qkGZM+nJxcizsoiI66K+RHQG0XqlyvjDizfnTxr+6PWg==", - "dev": true, - "requires": { - "@vue/reactivity": "3.2.38" - }, - "dependencies": { - "@vue/reactivity": { - "version": "3.2.38", - "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.2.38.tgz", - "integrity": "sha512-6L4myYcH9HG2M25co7/BSo0skKFHpAN8PhkNPM4xRVkyGl1K5M3Jx4rp5bsYhvYze2K4+l+pioN4e6ZwFLUVtw==", - "dev": true, - "requires": { - "@vue/shared": "3.2.38" - } - }, - "@vue/shared": { - "version": "3.2.38", - "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.38.tgz", - "integrity": "sha512-dTyhTIRmGXBjxJE+skC8tTWCGLCVc4wQgRRLt8+O9p5ewBAjoBwtCAkLPrtToSr1xltoe3st21Pv953aOZ7alg==", - "dev": true - } - } - }, - "@volar/typescript-faster": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/@volar/typescript-faster/-/typescript-faster-0.40.13.tgz", - "integrity": "sha512-uy+TlcFkKoNlKEnxA4x5acxdxLyVDIXGSc8cYDNXpPKjBKXrQaetzCzlO3kVBqu1VLMxKNGJMTKn35mo+ILQmw==", - "dev": true, - "requires": { - "semver": "^7.3.7" - } - }, - "@volar/vue-language-core": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/@volar/vue-language-core/-/vue-language-core-0.40.13.tgz", - "integrity": "sha512-QkCb8msi2KUitTdM6Y4kAb7/ZlEvuLcbBFOC2PLBlFuoZwyxvSP7c/dBGmKGtJlEvMX0LdCyrg5V2aBYxD38/Q==", - "dev": true, - "requires": { - "@volar/code-gen": "0.40.13", - "@volar/source-map": "0.40.13", - "@vue/compiler-core": "^3.2.38", - "@vue/compiler-dom": "^3.2.38", - "@vue/compiler-sfc": "^3.2.38", - "@vue/reactivity": "^3.2.38", - "@vue/shared": "^3.2.38" - } - }, - "@volar/vue-typescript": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/@volar/vue-typescript/-/vue-typescript-0.40.13.tgz", - "integrity": "sha512-o7bNztwjs8JmbQjVkrnbZUOfm7q4B8ZYssETISN1tRaBdun6cfNqgpkvDYd+VUBh1O4CdksvN+5BUNnwAz4oCQ==", - "dev": true, - "requires": { - "@volar/code-gen": "0.40.13", - "@volar/typescript-faster": "0.40.13", - "@volar/vue-language-core": "0.40.13" - } - }, - "@vue/compiler-core": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.2.40.tgz", - "integrity": "sha512-2Dc3Stk0J/VyQ4OUr2yEC53kU28614lZS+bnrCbFSAIftBJ40g/2yQzf4mPBiFuqguMB7hyHaujdgZAQ67kZYA==", - "requires": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.40", - "estree-walker": "^2.0.2", - "source-map": "^0.6.1" - } - }, - "@vue/compiler-dom": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.2.40.tgz", - "integrity": "sha512-OZCNyYVC2LQJy4H7h0o28rtk+4v+HMQygRTpmibGoG9wZyomQiS5otU7qo3Wlq5UfHDw2RFwxb9BJgKjVpjrQw==", - "requires": { - "@vue/compiler-core": "3.2.40", - "@vue/shared": "3.2.40" - } - }, - "@vue/compiler-sfc": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.2.40.tgz", - "integrity": "sha512-tzqwniIN1fu1PDHC3CpqY/dPCfN/RN1thpBC+g69kJcrl7mbGiHKNwbA6kJ3XKKy8R6JLKqcpVugqN4HkeBFFg==", - "requires": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.40", - "@vue/compiler-dom": "3.2.40", - "@vue/compiler-ssr": "3.2.40", - "@vue/reactivity-transform": "3.2.40", - "@vue/shared": "3.2.40", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" - } - }, - "@vue/compiler-ssr": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.2.40.tgz", - "integrity": "sha512-80cQcgasKjrPPuKcxwuCx7feq+wC6oFl5YaKSee9pV3DNq+6fmCVwEEC3vvkf/E2aI76rIJSOYHsWSEIxK74oQ==", - "requires": { - "@vue/compiler-dom": "3.2.40", - "@vue/shared": "3.2.40" - } - }, - "@vue/devtools-api": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.4.4.tgz", - "integrity": "sha512-Ku31WzpOV/8cruFaXaEZKF81WkNnvCSlBY4eOGtz5WMSdJvX1v1WWlSMGZeqUwPtQ27ZZz7B62erEMq8JDjcXw==" - }, - "@vue/reactivity": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.2.40.tgz", - "integrity": "sha512-N9qgGLlZmtUBMHF9xDT4EkD9RdXde1Xbveb+niWMXuHVWQP5BzgRmE3SFyUBBcyayG4y1lhoz+lphGRRxxK4RA==", - "requires": { - "@vue/shared": "3.2.40" - } - }, - "@vue/reactivity-transform": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/reactivity-transform/-/reactivity-transform-3.2.40.tgz", - "integrity": "sha512-HQUCVwEaacq6fGEsg2NUuGKIhUveMCjOk8jGHqLXPI2w6zFoPrlQhwWEaINTv5kkZDXKEnCijAp+4gNEHG03yw==", - "requires": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.40", - "@vue/shared": "3.2.40", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - } - }, - "@vue/runtime-core": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.2.40.tgz", - "integrity": "sha512-U1+rWf0H8xK8aBUZhnrN97yoZfHbjgw/bGUzfgKPJl69/mXDuSg8CbdBYBn6VVQdR947vWneQBFzdhasyzMUKg==", - "requires": { - "@vue/reactivity": "3.2.40", - "@vue/shared": "3.2.40" - } - }, - "@vue/runtime-dom": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.2.40.tgz", - "integrity": "sha512-AO2HMQ+0s2+MCec8hXAhxMgWhFhOPJ/CyRXnmTJ6XIOnJFLrH5Iq3TNwvVcODGR295jy77I6dWPj+wvFoSYaww==", - "requires": { - "@vue/runtime-core": "3.2.40", - "@vue/shared": "3.2.40", - "csstype": "^2.6.8" - } - }, - "@vue/server-renderer": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.2.40.tgz", - "integrity": "sha512-gtUcpRwrXOJPJ4qyBpU3EyxQa4EkV8I4f8VrDePcGCPe4O/hd0BPS7v9OgjIQob6Ap8VDz9G+mGTKazE45/95w==", - "requires": { - "@vue/compiler-ssr": "3.2.40", - "@vue/shared": "3.2.40" - } - }, - "@vue/shared": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.40.tgz", - "integrity": "sha512-0PLQ6RUtZM0vO3teRfzGi4ltLUO5aO+kLgwh4Um3THSR03rpQWLTuRCkuO5A41ITzwdWeKdPHtSARuPkoo5pCQ==" - }, - "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "axios": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.1.2.tgz", - "integrity": "sha512-bznQyETwElsXl2RK7HLLwb5GPpOLlycxHCtrpDR/4RqqBzjARaOTo3jz4IgtntWUYee7Ne4S8UHd92VCuzPaWA==", - "requires": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "bignumber.js": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz", - "integrity": "sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==" - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmmirror.com/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - }, - "esbuild": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.15.10.tgz", - "integrity": "sha512-N7wBhfJ/E5fzn/SpNgX+oW2RLRjwaL8Y0ezqNqhjD6w0H2p0rDuEz2FKZqpqLnO8DCaWumKe8dsC/ljvVSSxng==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.15.10", - "@esbuild/linux-loong64": "0.15.10", - "esbuild-android-64": "0.15.10", - "esbuild-android-arm64": "0.15.10", - "esbuild-darwin-64": "0.15.10", - "esbuild-darwin-arm64": "0.15.10", - "esbuild-freebsd-64": "0.15.10", - "esbuild-freebsd-arm64": "0.15.10", - "esbuild-linux-32": "0.15.10", - "esbuild-linux-64": "0.15.10", - "esbuild-linux-arm": "0.15.10", - "esbuild-linux-arm64": "0.15.10", - "esbuild-linux-mips64le": "0.15.10", - "esbuild-linux-ppc64le": "0.15.10", - "esbuild-linux-riscv64": "0.15.10", - "esbuild-linux-s390x": "0.15.10", - "esbuild-netbsd-64": "0.15.10", - "esbuild-openbsd-64": "0.15.10", - "esbuild-sunos-64": "0.15.10", - "esbuild-windows-32": "0.15.10", - "esbuild-windows-64": "0.15.10", - "esbuild-windows-arm64": "0.15.10" - } - }, - "esbuild-android-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-android-64/-/esbuild-android-64-0.15.10.tgz", - "integrity": "sha512-UI7krF8OYO1N7JYTgLT9ML5j4+45ra3amLZKx7LO3lmLt1Ibn8t3aZbX5Pu4BjWiqDuJ3m/hsvhPhK/5Y/YpnA==", - "dev": true, - "optional": true - }, - "esbuild-android-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.10.tgz", - "integrity": "sha512-EOt55D6xBk5O05AK8brXUbZmoFj4chM8u3riGflLa6ziEoVvNjRdD7Cnp82NHQGfSHgYR06XsPI8/sMuA/cUwg==", - "dev": true, - "optional": true - }, - "esbuild-darwin-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.10.tgz", - "integrity": "sha512-hbDJugTicqIm+WKZgp208d7FcXcaK8j2c0l+fqSJ3d2AzQAfjEYDRM3Z2oMeqSJ9uFxyj/muSACLdix7oTstRA==", - "dev": true, - "optional": true - }, - "esbuild-darwin-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.10.tgz", - "integrity": "sha512-M1t5+Kj4IgSbYmunf2BB6EKLkWUq+XlqaFRiGOk8bmBapu9bCDrxjf4kUnWn59Dka3I27EiuHBKd1rSO4osLFQ==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.10.tgz", - "integrity": "sha512-KMBFMa7C8oc97nqDdoZwtDBX7gfpolkk6Bcmj6YFMrtCMVgoU/x2DI1p74DmYl7CSS6Ppa3xgemrLrr5IjIn0w==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.10.tgz", - "integrity": "sha512-m2KNbuCX13yQqLlbSojFMHpewbn8wW5uDS6DxRpmaZKzyq8Dbsku6hHvh2U+BcLwWY4mpgXzFUoENEf7IcioGg==", - "dev": true, - "optional": true - }, - "esbuild-linux-32": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-32/-/esbuild-linux-32-0.15.10.tgz", - "integrity": "sha512-guXrwSYFAvNkuQ39FNeV4sNkNms1bLlA5vF1H0cazZBOLdLFIny6BhT+TUbK/hdByMQhtWQ5jI9VAmPKbVPu1w==", - "dev": true, - "optional": true - }, - "esbuild-linux-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-64/-/esbuild-linux-64-0.15.10.tgz", - "integrity": "sha512-jd8XfaSJeucMpD63YNMO1JCrdJhckHWcMv6O233bL4l6ogQKQOxBYSRP/XLWP+6kVTu0obXovuckJDcA0DKtQA==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.10.tgz", - "integrity": "sha512-6N8vThLL/Lysy9y4Ex8XoLQAlbZKUyExCWyayGi2KgTBelKpPgj6RZnUaKri0dHNPGgReJriKVU6+KDGQwn10A==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.10.tgz", - "integrity": "sha512-GByBi4fgkvZFTHFDYNftu1DQ1GzR23jws0oWyCfhnI7eMOe+wgwWrc78dbNk709Ivdr/evefm2PJiUBMiusS1A==", - "dev": true, - "optional": true - }, - "esbuild-linux-mips64le": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.10.tgz", - "integrity": "sha512-BxP+LbaGVGIdQNJUNF7qpYjEGWb0YyHVSKqYKrn+pTwH/SiHUxFyJYSP3pqkku61olQiSBnSmWZ+YUpj78Tw7Q==", - "dev": true, - "optional": true - }, - "esbuild-linux-ppc64le": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.10.tgz", - "integrity": "sha512-LoSQCd6498PmninNgqd/BR7z3Bsk/mabImBWuQ4wQgmQEeanzWd5BQU2aNi9mBURCLgyheuZS6Xhrw5luw3OkQ==", - "dev": true, - "optional": true - }, - "esbuild-linux-riscv64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.10.tgz", - "integrity": "sha512-Lrl9Cr2YROvPV4wmZ1/g48httE8z/5SCiXIyebiB5N8VT7pX3t6meI7TQVHw/wQpqP/AF4SksDuFImPTM7Z32Q==", - "dev": true, - "optional": true - }, - "esbuild-linux-s390x": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.10.tgz", - "integrity": "sha512-ReP+6q3eLVVP2lpRrvl5EodKX7EZ1bS1/z5j6hsluAlZP5aHhk6ghT6Cq3IANvvDdscMMCB4QEbI+AjtvoOFpA==", - "dev": true, - "optional": true - }, - "esbuild-netbsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.10.tgz", - "integrity": "sha512-iGDYtJCMCqldMskQ4eIV+QSS/CuT7xyy9i2/FjpKvxAuCzrESZXiA1L64YNj6/afuzfBe9i8m/uDkFHy257hTw==", - "dev": true, - "optional": true - }, - "esbuild-openbsd-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.10.tgz", - "integrity": "sha512-ftMMIwHWrnrYnvuJQRJs/Smlcb28F9ICGde/P3FUTCgDDM0N7WA0o9uOR38f5Xe2/OhNCgkjNeb7QeaE3cyWkQ==", - "dev": true, - "optional": true - }, - "esbuild-sunos-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.10.tgz", - "integrity": "sha512-mf7hBL9Uo2gcy2r3rUFMjVpTaGpFJJE5QTDDqUFf1632FxteYANffDZmKbqX0PfeQ2XjUDE604IcE7OJeoHiyg==", - "dev": true, - "optional": true - }, - "esbuild-windows-32": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-windows-32/-/esbuild-windows-32-0.15.10.tgz", - "integrity": "sha512-ttFVo+Cg8b5+qHmZHbEc8Vl17kCleHhLzgT8X04y8zudEApo0PxPg9Mz8Z2cKH1bCYlve1XL8LkyXGFjtUYeGg==", - "dev": true, - "optional": true - }, - "esbuild-windows-64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-windows-64/-/esbuild-windows-64-0.15.10.tgz", - "integrity": "sha512-2H0gdsyHi5x+8lbng3hLbxDWR7mKHWh5BXZGKVG830KUmXOOWFE2YKJ4tHRkejRduOGDrBvHBriYsGtmTv3ntA==", - "dev": true, - "optional": true - }, - "esbuild-windows-arm64": { - "version": "0.15.10", - "resolved": "https://registry.npmmirror.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.10.tgz", - "integrity": "sha512-S+th4F+F8VLsHLR0zrUcG+Et4hx0RKgK1eyHc08kztmLOES8BWwMiaGdoW9hiXuzznXQ0I/Fg904MNbr11Nktw==", - "dev": true, - "optional": true - }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" - }, - "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "requires": { - "bignumber.js": "^9.0.0" - } - }, - "local-pkg": { - "version": "0.4.2", - "resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-0.4.2.tgz", - "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "requires": { - "sourcemap-codec": "^1.4.8" - } - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pinia": { - "version": "2.0.23", - "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.23.tgz", - "integrity": "sha512-N15hFf4o5STrxpNrib1IEb1GOArvPYf1zPvQVRGOO1G1d74Ak0J0lVyalX/SmrzdT4Q0nlEFjbURsmBmIGUR5Q==", - "requires": { - "@vue/devtools-api": "^6.4.4", - "vue-demi": "*" - }, - "dependencies": { - "vue-demi": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", - "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==", - "requires": {} - } - } - }, - "postcss": { - "version": "8.4.17", - "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.17.tgz", - "integrity": "sha512-UNxNOLQydcOFi41yHNMcKRZ39NeXlr8AxGuZJsdub8vIb12fHzcq37DTU/QtbI6WLxNg2gF9Z+8qtRwTj1UI1Q==", - "requires": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - } - }, - "proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rollup": { - "version": "2.78.1", - "resolved": "https://registry.npmmirror.com/rollup/-/rollup-2.78.1.tgz", - "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmmirror.com/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" - }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmmirror.com/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", - "devOptional": true - }, - "unplugin": { - "version": "0.9.6", - "resolved": "https://registry.npmmirror.com/unplugin/-/unplugin-0.9.6.tgz", - "integrity": "sha512-YYLtfoNiie/lxswy1GOsKXgnLJTE27la/PeCGznSItk+8METYZErO+zzV9KQ/hXhPwzIJsfJ4s0m1Rl7ZCWZ4Q==", - "dev": true, - "requires": { - "acorn": "^8.8.0", - "chokidar": "^3.5.3", - "webpack-sources": "^3.2.3", - "webpack-virtual-modules": "^0.4.5" - } - }, - "unplugin-vue-components": { - "version": "0.22.7", - "resolved": "https://registry.npmmirror.com/unplugin-vue-components/-/unplugin-vue-components-0.22.7.tgz", - "integrity": "sha512-MJEAKJF9bRykTRvJ4WXF0FNMAyt1PX3iwpu2NN+li35sAKjQv6sC1col5aZDLiwDZDo2AGwxNkzLJFKaun9qHw==", - "dev": true, - "requires": { - "@antfu/utils": "^0.5.2", - "@rollup/pluginutils": "^4.2.1", - "chokidar": "^3.5.3", - "debug": "^4.3.4", - "fast-glob": "^3.2.12", - "local-pkg": "^0.4.2", - "magic-string": "^0.26.3", - "minimatch": "^5.1.0", - "resolve": "^1.22.1", - "unplugin": "^0.9.5" - }, - "dependencies": { - "magic-string": { - "version": "0.26.5", - "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.26.5.tgz", - "integrity": "sha512-yXUIYOOQnEHKHOftp5shMWpB9ImfgfDJpapa38j/qMtTj5QHWucvxP4lUtuRmHT9vAzvtpHkWKXW9xBwimXeNg==", - "dev": true, - "requires": { - "sourcemap-codec": "^1.4.8" - } - } - } - }, - "vant": { - "version": "3.6.3", - "resolved": "https://registry.npmmirror.com/vant/-/vant-3.6.3.tgz", - "integrity": "sha512-OmqQXgtgJgNNoGV8FzvGkm/fvXOB70ZmruOUU4iJaEmEwdsdYl+31D6niisWZLVAbGW1Xx9rLrOu9hivdxQbbg==", - "requires": { - "@vant/icons": "^1.8.0", - "@vant/popperjs": "^1.2.1", - "@vant/use": "^1.4.2" - } - }, - "vite": { - "version": "3.1.4", - "resolved": "https://registry.npmmirror.com/vite/-/vite-3.1.4.tgz", - "integrity": "sha512-JoQI08aBjY9lycL7jcEq4p9o1xUjq5aRvdH4KWaXtkSx7e7RpAh9D3IjzDWRD4Fg44LS3oDAIOG/Kq1L+82psA==", - "dev": true, - "requires": { - "esbuild": "^0.15.6", - "fsevents": "~2.3.2", - "postcss": "^8.4.16", - "resolve": "^1.22.1", - "rollup": "~2.78.0" - } - }, - "vue": { - "version": "3.2.40", - "resolved": "https://registry.npmmirror.com/vue/-/vue-3.2.40.tgz", - "integrity": "sha512-1mGHulzUbl2Nk3pfvI5aXYYyJUs1nm4kyvuz38u4xlQkLUn1i2R7nDbI4TufECmY8v1qNBHYy62bCaM+3cHP2A==", - "requires": { - "@vue/compiler-dom": "3.2.40", - "@vue/compiler-sfc": "3.2.40", - "@vue/runtime-dom": "3.2.40", - "@vue/server-renderer": "3.2.40", - "@vue/shared": "3.2.40" - } - }, - "vue-router": { - "version": "4.1.5", - "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.1.5.tgz", - "integrity": "sha512-IsvoF5D2GQ/EGTs/Th4NQms9gd2NSqV+yylxIyp/OYp8xOwxmU8Kj/74E9DTSYAyH5LX7idVUngN3JSj1X4xcQ==", - "requires": { - "@vue/devtools-api": "^6.1.4" - } - }, - "vue-tsc": { - "version": "0.40.13", - "resolved": "https://registry.npmmirror.com/vue-tsc/-/vue-tsc-0.40.13.tgz", - "integrity": "sha512-xzuN3g5PnKfJcNrLv4+mAjteMd5wLm5fRhW0034OfNJZY4WhB07vhngea/XeGn7wNYt16r7syonzvW/54dcNiA==", - "dev": true, - "requires": { - "@volar/vue-language-core": "0.40.13", - "@volar/vue-typescript": "0.40.13" - } - }, - "vuex": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.0.2.tgz", - "integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==", - "requires": { - "@vue/devtools-api": "^6.0.0-beta.11" - } - }, - "webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true - }, - "webpack-virtual-modules": { - "version": "0.4.5", - "resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.4.5.tgz", - "integrity": "sha512-8bWq0Iluiv9lVf9YaqWQ9+liNgXSHICm+rg544yRgGYaR8yXZTVBaHZkINZSB2yZSWo4b0F6MIxqJezVfOEAlg==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } -} diff --git a/Yi.App.Vue3/package.json b/Yi.App.Vue3/package.json deleted file mode 100644 index 1042a10b..00000000 --- a/Yi.App.Vue3/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "yi", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vue-tsc --noEmit && vite build", - "preview": "vite preview" - }, - "dependencies": { - "axios": "^1.1.2", - "json-bigint": "^1.0.0", - "pinia": "^2.0.23", - "vant": "^3.6.3", - "vue": "^3.2.37", - "vue-router": "^4.1.5", - "vuex": "^4.0.2" - }, - "devDependencies": { - "@types/json-bigint": "^1.0.1", - "@types/node": "^18.8.2", - "@vitejs/plugin-vue": "^3.1.0", - "typescript": "^4.6.4", - "unplugin-vue-components": "^0.22.7", - "vite": "^3.1.0", - "vue-tsc": "^0.40.4" - } -} diff --git a/Yi.App.Vue3/public/icon.jpg b/Yi.App.Vue3/public/icon.jpg deleted file mode 100644 index 57c1f446..00000000 Binary files a/Yi.App.Vue3/public/icon.jpg and /dev/null differ diff --git a/Yi.App.Vue3/public/vite.svg b/Yi.App.Vue3/public/vite.svg deleted file mode 100644 index e7b8dfb1..00000000 --- a/Yi.App.Vue3/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Yi.App.Vue3/src/App.vue b/Yi.App.Vue3/src/App.vue deleted file mode 100644 index 3fd7a8f0..00000000 --- a/Yi.App.Vue3/src/App.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/Yi.App.Vue3/src/api/agreeApi.ts b/Yi.App.Vue3/src/api/agreeApi.ts deleted file mode 100644 index a9b2d164..00000000 --- a/Yi.App.Vue3/src/api/agreeApi.ts +++ /dev/null @@ -1,11 +0,0 @@ -import myaxios from '@/utils/myaxios' - -export default { - operate(data:any) { - return myaxios({ - url: `/agree/operate`, - method: 'get', - params: {articleId:data} - }) - }, -} \ No newline at end of file diff --git a/Yi.App.Vue3/src/api/articleApi.ts b/Yi.App.Vue3/src/api/articleApi.ts deleted file mode 100644 index b76f955e..00000000 --- a/Yi.App.Vue3/src/api/articleApi.ts +++ /dev/null @@ -1,18 +0,0 @@ -import myaxios from '@/utils/myaxios' - -export default { - add(data:any) { - return myaxios({ - url: `/Trends`, - method: 'post', - data: data - }) - }, - pageList(data:any) { - return myaxios({ - url: '/Trends', - method: 'get', - params: data - }) - } -} \ No newline at end of file diff --git a/Yi.App.Vue3/src/api/commentApi.ts b/Yi.App.Vue3/src/api/commentApi.ts deleted file mode 100644 index edcf0079..00000000 --- a/Yi.App.Vue3/src/api/commentApi.ts +++ /dev/null @@ -1,17 +0,0 @@ -import myaxios from '@/utils/myaxios' - -export default { - add(data:any) { - return myaxios({ - url: `/comment/add`, - method: 'post', - data: data - }) - }, - getListByArticleId(articleId:any) { - return myaxios({ - url: `/comment/GetListByArticleId/${articleId}`, - method: 'get', - }) - } -} \ No newline at end of file diff --git a/Yi.App.Vue3/src/api/fileApi.ts b/Yi.App.Vue3/src/api/fileApi.ts deleted file mode 100644 index f0b09f5d..00000000 --- a/Yi.App.Vue3/src/api/fileApi.ts +++ /dev/null @@ -1,12 +0,0 @@ -import myaxios from '@/utils/myaxios' - -export default{ - upload(data:any){ - return myaxios({ - url: `/file`, - headers:{"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}, - method: 'post', - data:data - }); -} -} \ No newline at end of file diff --git a/Yi.App.Vue3/src/api/login.ts b/Yi.App.Vue3/src/api/login.ts deleted file mode 100644 index 900fead9..00000000 --- a/Yi.App.Vue3/src/api/login.ts +++ /dev/null @@ -1,59 +0,0 @@ -import myaxios from '@/utils/myaxios' - -// 登录方法 -export function login(username:string, password:string, code:string, uuid:string) { - const data = { - username, - password, - code, - uuid - } - return myaxios({ - url: '/account/login', - headers: { - isToken: false - }, - method: 'post', - data: data - }) -} - -// 注册方法 -export function register(data:any) { - return myaxios({ - url: '/register', - headers: { - isToken: false - }, - method: 'post', - data: data - }) -} - -// 获取用户详细信息 -export function getInfo() { - return myaxios({ - url: '/account', - method: 'get' - }) -} - -// 退出方法 -export function logout() { - return myaxios({ - url: '/account/logout', - method: 'post' - }) -} - -// 获取验证码 -export function getCodeImg() { - return myaxios({ - url: '/account/captchaImage', - headers: { - isToken: false - }, - method: 'get', - timeout: 20000 - }) -} \ No newline at end of file diff --git a/Yi.App.Vue3/src/api/skuApi.ts b/Yi.App.Vue3/src/api/skuApi.ts deleted file mode 100644 index 5c268d36..00000000 --- a/Yi.App.Vue3/src/api/skuApi.ts +++ /dev/null @@ -1,18 +0,0 @@ -import myaxios from '@/utils/myaxios' - -export default { - add(data:any) { - return myaxios({ - url: `/sku/add`, - method: 'post', - data: data - }) - }, - pageList(data:any) { - return myaxios({ - url: '/sku/pageList', - method: 'get', - params: data - }) - } -} \ No newline at end of file diff --git a/Yi.App.Vue3/src/api/spuApi.ts b/Yi.App.Vue3/src/api/spuApi.ts deleted file mode 100644 index e2a1faf2..00000000 --- a/Yi.App.Vue3/src/api/spuApi.ts +++ /dev/null @@ -1,25 +0,0 @@ -import myaxios from '@/utils/myaxios' - -export default { - add(data: any) { - return myaxios({ - url: `/spu/add`, - method: 'post', - data: data - }) - }, - pageList(data: any) { - return myaxios({ - url: '/spu/pageList', - method: 'get', - params: data - }) - }, - getById(id: any) { - return myaxios({ - url: `/spu/GetById/${id}`, - method: 'get', - }) - }, - -} \ No newline at end of file diff --git a/Yi.App.Vue3/src/assets/vue.svg b/Yi.App.Vue3/src/assets/vue.svg deleted file mode 100644 index 770e9d33..00000000 --- a/Yi.App.Vue3/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Yi.App.Vue3/src/components/AppCard.vue b/Yi.App.Vue3/src/components/AppCard.vue deleted file mode 100644 index ad31cbbc..00000000 --- a/Yi.App.Vue3/src/components/AppCard.vue +++ /dev/null @@ -1,61 +0,0 @@ - - \ No newline at end of file diff --git a/Yi.App.Vue3/src/components/AppCreateTime.vue b/Yi.App.Vue3/src/components/AppCreateTime.vue deleted file mode 100644 index 6f38aea9..00000000 --- a/Yi.App.Vue3/src/components/AppCreateTime.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Yi.App.Vue3/src/components/AppGrid.vue b/Yi.App.Vue3/src/components/AppGrid.vue deleted file mode 100644 index 42dcc356..00000000 --- a/Yi.App.Vue3/src/components/AppGrid.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - - diff --git a/Yi.App.Vue3/src/components/AppUserIcon.vue b/Yi.App.Vue3/src/components/AppUserIcon.vue deleted file mode 100644 index 7f342221..00000000 --- a/Yi.App.Vue3/src/components/AppUserIcon.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - - diff --git a/Yi.App.Vue3/src/components/HelloWorld.vue b/Yi.App.Vue3/src/components/HelloWorld.vue deleted file mode 100644 index 0d45e0a4..00000000 --- a/Yi.App.Vue3/src/components/HelloWorld.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - - - diff --git a/Yi.App.Vue3/src/layout/bottom/index.vue b/Yi.App.Vue3/src/layout/bottom/index.vue deleted file mode 100644 index 8f9bdbe3..00000000 --- a/Yi.App.Vue3/src/layout/bottom/index.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - diff --git a/Yi.App.Vue3/src/layout/head/index.vue b/Yi.App.Vue3/src/layout/head/index.vue deleted file mode 100644 index d012f2e0..00000000 --- a/Yi.App.Vue3/src/layout/head/index.vue +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/Yi.App.Vue3/src/layout/index.vue b/Yi.App.Vue3/src/layout/index.vue deleted file mode 100644 index eb8ba425..00000000 --- a/Yi.App.Vue3/src/layout/index.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/Yi.App.Vue3/src/layout/main/index.vue b/Yi.App.Vue3/src/layout/main/index.vue deleted file mode 100644 index 29e21014..00000000 --- a/Yi.App.Vue3/src/layout/main/index.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - \ No newline at end of file diff --git a/Yi.App.Vue3/src/layout/tab/index.vue b/Yi.App.Vue3/src/layout/tab/index.vue deleted file mode 100644 index 53f85eb4..00000000 --- a/Yi.App.Vue3/src/layout/tab/index.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - diff --git a/Yi.App.Vue3/src/main.ts b/Yi.App.Vue3/src/main.ts deleted file mode 100644 index 50eb4bb1..00000000 --- a/Yi.App.Vue3/src/main.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { createApp } from 'vue' -import './style.css' -import 'vant/es/image-preview/style'; -import 'vant/es/toast/style'; -import 'vant/es/dialog/style'; -import 'vant/es/notify/style'; -import router from './router' -import store from './store' -import './permission' -import { Lazyload } from 'vant'; -import App from './App.vue' - -const app=createApp(App) -app.use(router) -app.use(store) -app.use(Lazyload); -app.mount('#app'); \ No newline at end of file diff --git a/Yi.App.Vue3/src/permission.ts b/Yi.App.Vue3/src/permission.ts deleted file mode 100644 index a9a940df..00000000 --- a/Yi.App.Vue3/src/permission.ts +++ /dev/null @@ -1,52 +0,0 @@ -import router from './router' -// import { ElMessage } from 'element-plus' -// import NProgress from 'nprogress' -// import 'nprogress/nprogress.css' -import { getToken } from '@/utils/auth' -// import { isHttp } from '@/utils/validate' -import useUserStore from '@/store/modules/user.js' -import { isRelogin } from '@/utils/myaxios' -// import useSettingsStore from '@/store/modules/settings' -// import usePermissionStore from '@/store/modules/permission' - -// NProgress.configure({ showSpinner: false }); - -const whiteList = ['/login', '/auth-redirect', '/bind', '/register']; - -router.beforeEach((to, from, next) => { - // NProgress.start() - if (getToken()) { - // to.meta.title && useSettingsStore().setTitle(to.meta.title) - /* has token*/ - if (to.path === '/login') { - next({ path: '/' }) - // NProgress.done() - } else { - if (useUserStore().roles.length === 0) { - isRelogin.show = true - useUserStore().getInfo().then((response: any) => { - next() - }); - - } - else - { - next() - } - } - } else { - - // 没有token - if (whiteList.indexOf(to.path) !== -1) { - // 在免登录白名单,直接进入 - next() - } else { - next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 - // NProgress.done() - } - } -}) - -router.afterEach(() => { - // NProgress.done() -}) diff --git a/Yi.App.Vue3/src/router/index.ts b/Yi.App.Vue3/src/router/index.ts deleted file mode 100644 index 2ea52cdf..00000000 --- a/Yi.App.Vue3/src/router/index.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { createWebHistory, createRouter } from 'vue-router'; -import Layout from '@/layout/index.vue'; -import HeadLayout from '@/layout/head/index.vue' - -export const constantRoutes = [ - - { - name:'Layout', - path: '/', - component: Layout, - redirect:"/recommend", - children: [ - { - path: '/shopIndex', - component: () => import('@/view/shop/shopIndex.vue'), - name: 'ShopIndex', - }, - { - path: '/my', - component: () => import('@/view/my.vue'), - name: 'My', - }, - { - path: '/main', - component: () => import('@/layout/main/index.vue'), - name: 'Main', - children:[ - { - path: '/recommend', - component: () => import('@/view/main/recommend.vue'), - name: 'Recommend', - }, - { - path: '/follow', - component: () => import('@/view/main/follow.vue'), - name: 'Follow', - }, - { - path: '/square', - component: () => import('@/view/main/square.vue'), - name: 'Square', - }, - - ] - } - ] - }, - { - path: '/imageText', - component: () => import('@/view/send/imageText.vue'), - name: 'ImageText', - }, - { - path: '/login', - component: () => import('@/view/login.vue'), - name: 'Login', - }, - - { - name:'Shop', - path: '/shop', - component: HeadLayout, - redirect:"/shopIndex", - children: [ - { - path: '/shopDetails', - component: () => import('@/view/shop/shopDetails.vue'), - name: 'ShopDetails', - }, - { - path: '/shopSearch', - component: () => import('@/view/shop/shopSearch.vue'), - name: 'ShopSearch', - }, - ] - } - ]; - - const router = createRouter({ - history: createWebHistory(), - routes: constantRoutes, - scrollBehavior(to, from, savedPosition) { - if (savedPosition) { - return savedPosition - } else { - return { top: 0 } - } - }, - }); - - export default router; - \ No newline at end of file diff --git a/Yi.App.Vue3/src/store/index.ts b/Yi.App.Vue3/src/store/index.ts deleted file mode 100644 index 2e68d207..00000000 --- a/Yi.App.Vue3/src/store/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { createPinia } from 'pinia' -const store = createPinia() - -export default store \ No newline at end of file diff --git a/Yi.App.Vue3/src/store/modules/user.ts b/Yi.App.Vue3/src/store/modules/user.ts deleted file mode 100644 index cbbec122..00000000 --- a/Yi.App.Vue3/src/store/modules/user.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { login, logout, getInfo } from '@/api/login' -import { getToken, setToken, removeToken } from '@/utils/auth' -// import defAva from '@/assets/images/profile.jpg' -import {defineStore} from 'pinia' -const useUserStore = defineStore( - 'user', - { - state: () => ({ - token: getToken(), - user:{username:"",nick:"",icon:""}, - roles: [], - permissions: [] - }), - actions: { - // 登录 - login(userInfo:any ) { - const username = userInfo.username.trim() - const password = userInfo.password - const code = userInfo.code - const uuid = userInfo.uuid - return new Promise((resolve, reject) => { - - login(username, password, code, uuid).then(res => { - if(!(res as any).succeeded) - { - reject(res) - } - setToken(res.data.token); - this.token = res.data.token; - - return resolve(res); - }).catch(error => { - return reject(error) - }) - }) - }, - // 获取用户信息 - getInfo() { - return new Promise((resolve, reject) => { - - getInfo().then(response => { - const res=response.data; - const user = res.user - // const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar; - - if (res.roleCodes && res.roleCodes.length > 0) { // 验证返回的roles是否是一个非空数组 - this.roles = res.roleCodes - this.permissions = res.permissionCodes - // this.roles = ["admin"]; - // this.permissions=["*:*:*"] - - } else { - this.roles = ["ROLE_DEFAULT"] as never[] - } - // this.roles = ["admin"]; - // this.permissions=["*:*:*"] - this.user.username = user.userName; - this.user.nick=user.nick - this.user.icon = user.icon; - resolve(res) - }).catch(error => { - reject(error) - }) - - - - }) - }, - // 退出系统 - logOut() { - return new Promise((resolve, reject) => { - //this.token - logout().then((response) => { - this.token = '' - this.roles = [] - this.permissions = [] - removeToken() - resolve(response) - }).catch(error => { - reject(error) - }) - }) - } - } - }) - -export default useUserStore diff --git a/Yi.App.Vue3/src/style.css b/Yi.App.Vue3/src/style.css deleted file mode 100644 index d5b647e5..00000000 --- a/Yi.App.Vue3/src/style.css +++ /dev/null @@ -1,87 +0,0 @@ -#app { - max-width: 1280px; - margin: 0 auto; - padding: 0rem; - text-align: center; -} -/* :root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -.card { - padding: 2em; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 0rem; - text-align: center; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} */ diff --git a/Yi.App.Vue3/src/type/class/AppGridData.ts b/Yi.App.Vue3/src/type/class/AppGridData.ts deleted file mode 100644 index 35a78c9d..00000000 --- a/Yi.App.Vue3/src/type/class/AppGridData.ts +++ /dev/null @@ -1,11 +0,0 @@ -export class AppGridData{ - head!: string; - body!: AppGridBody[]; -} - - - -class AppGridBody{ - icon!: string; - title!: string; -} \ No newline at end of file diff --git a/Yi.App.Vue3/src/type/interface/ArticleEntity.ts b/Yi.App.Vue3/src/type/interface/ArticleEntity.ts deleted file mode 100644 index 1fd0027a..00000000 --- a/Yi.App.Vue3/src/type/interface/ArticleEntity.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface ArticleEntity{ - title: string; - content: string; - images:string[]; - isDeleted:boolean; - creationTime:string; -} -// import { ArticleEntity } from '@/type/interface/ArticleEntity' \ No newline at end of file diff --git a/Yi.App.Vue3/src/utils/auth.ts b/Yi.App.Vue3/src/utils/auth.ts deleted file mode 100644 index 64a302e3..00000000 --- a/Yi.App.Vue3/src/utils/auth.ts +++ /dev/null @@ -1,13 +0,0 @@ -const TokenKey = 'Admin-Token' - -export function getToken() { - return localStorage.getItem(TokenKey) -} - -export function setToken(token:string) { - return localStorage.setItem(TokenKey, token) -} - -export function removeToken() { - return localStorage.removeItem(TokenKey) -} diff --git a/Yi.App.Vue3/src/utils/myaxios.ts b/Yi.App.Vue3/src/utils/myaxios.ts deleted file mode 100644 index 726f9a2e..00000000 --- a/Yi.App.Vue3/src/utils/myaxios.ts +++ /dev/null @@ -1,95 +0,0 @@ - -import axios from 'axios' -// import store from '../store/index' -// import vm from '../main' -import JsonBig from 'json-bigint' -import { getToken } from '@/utils/auth' -import { useRouter } from "vue-router"; -import useUserStore from '@/store/modules/user.js' -import { Notify } from 'vant'; -// import VuetifyDialogPlugin from 'vuetify-dialog/nuxt/index'; -export let isRelogin = { show: false }; -const myaxios = axios.create({ - // baseURL:'/'// - baseURL: import.meta.env.VITE_APP_BASE_API, // /dev-apis - timeout: 50000, - headers: { - 'Authorization': 'Bearer ' + "" - }, - //雪花id精度问题 - transformResponse: [data => { - const json = JsonBig({ - storeAsString: true - }); - try { - return json.parse(data); - } - catch - { - return data; - } - }], -}) -// 请求拦截器 -myaxios.interceptors.request.use(function (config:any) { - const isToken = (config.headers || {}).isToken === false - // 是否需要防止数据重复提交 - const isRepeatSubmit = (config.headers || {}).repeatSubmit === false - if (getToken() && !isToken) { - config.headers['Authorization'] = 'Bearer ' + getToken() - } - // store.dispatch("openLoad"); - return config; -}, function (error) { - return Promise.reject(error); -}); - -// 响应拦截器 -myaxios.interceptors.response.use(async function(response) { -//成功 - const resp = response.data - if(resp.code==401) - { - Notify({ type: 'warning', message: '登录过期' }); - //登出 - useUserStore().logOut().then(() => { - location.href = '/'; - }) - isRelogin.show = false; - } - // store.dispatch("closeLoad"); - return resp; -}, -async function(error) { -const code=error.response.status; -const message=error.message; -//未授权、失败 -if(error.response==undefined) -{ - Notify({ type: 'danger', message: `服务器异常:${error.message}` }); - - // useUserStore().logOut().then(() => { - // location.href = '/'; - // }) - - return Promise.reject(error);; -} - -if (code == undefined &&message == undefined) { - Notify({ type: 'danger', message: '未知错误' }); -} else if (code == 401) { - // if (!isRelogin.show) { - Notify({ type: 'warning', message: '登录过期' }); - //登出 - useUserStore().logOut().then(() => { - location.href = '/'; - }) - isRelogin.show = false; - // } -} else if (code !== 200) { - Notify({ type: 'danger', message: `错误代码:${code},原因:${message}` }); -} - return Promise.reject(error); -}); - -export default myaxios \ No newline at end of file diff --git a/Yi.App.Vue3/src/view/login.vue b/Yi.App.Vue3/src/view/login.vue deleted file mode 100644 index 14072869..00000000 --- a/Yi.App.Vue3/src/view/login.vue +++ /dev/null @@ -1,140 +0,0 @@ - - - \ No newline at end of file diff --git a/Yi.App.Vue3/src/view/main/follow.vue b/Yi.App.Vue3/src/view/main/follow.vue deleted file mode 100644 index e3b8f95a..00000000 --- a/Yi.App.Vue3/src/view/main/follow.vue +++ /dev/null @@ -1,16 +0,0 @@ - - \ No newline at end of file diff --git a/Yi.App.Vue3/src/view/main/recommend.vue b/Yi.App.Vue3/src/view/main/recommend.vue deleted file mode 100644 index 1ebf0e84..00000000 --- a/Yi.App.Vue3/src/view/main/recommend.vue +++ /dev/null @@ -1,301 +0,0 @@ - - - - \ No newline at end of file diff --git a/Yi.App.Vue3/src/view/main/square.vue b/Yi.App.Vue3/src/view/main/square.vue deleted file mode 100644 index 2515880a..00000000 --- a/Yi.App.Vue3/src/view/main/square.vue +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Yi.App.Vue3/src/view/my.vue b/Yi.App.Vue3/src/view/my.vue deleted file mode 100644 index 322274fd..00000000 --- a/Yi.App.Vue3/src/view/my.vue +++ /dev/null @@ -1,256 +0,0 @@ - - - \ No newline at end of file diff --git a/Yi.App.Vue3/src/view/send/imageText.vue b/Yi.App.Vue3/src/view/send/imageText.vue deleted file mode 100644 index 7fa37ada..00000000 --- a/Yi.App.Vue3/src/view/send/imageText.vue +++ /dev/null @@ -1,185 +0,0 @@ - - - \ No newline at end of file diff --git a/Yi.App.Vue3/src/view/shop/shopDetails.vue b/Yi.App.Vue3/src/view/shop/shopDetails.vue deleted file mode 100644 index 563411a4..00000000 --- a/Yi.App.Vue3/src/view/shop/shopDetails.vue +++ /dev/null @@ -1,44 +0,0 @@ - -> \ No newline at end of file diff --git a/Yi.App.Vue3/src/view/shop/shopIndex.vue b/Yi.App.Vue3/src/view/shop/shopIndex.vue deleted file mode 100644 index 9ce6a541..00000000 --- a/Yi.App.Vue3/src/view/shop/shopIndex.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - \ No newline at end of file diff --git a/Yi.App.Vue3/src/view/shop/shopSearch.vue b/Yi.App.Vue3/src/view/shop/shopSearch.vue deleted file mode 100644 index 0e478c53..00000000 --- a/Yi.App.Vue3/src/view/shop/shopSearch.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - \ No newline at end of file diff --git a/Yi.App.Vue3/src/vite-env.d.ts b/Yi.App.Vue3/src/vite-env.d.ts deleted file mode 100644 index 323c78a6..00000000 --- a/Yi.App.Vue3/src/vite-env.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// - -declare module '*.vue' { - import type { DefineComponent } from 'vue' - const component: DefineComponent<{}, {}, any> - export default component -} diff --git a/Yi.App.Vue3/tsconfig.json b/Yi.App.Vue3/tsconfig.json deleted file mode 100644 index cc7c32e7..00000000 --- a/Yi.App.Vue3/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "module": "ESNext", - "moduleResolution": "Node", - "strict": true, - "jsx": "preserve", - "sourceMap": true, - "resolveJsonModule": true, - "isolatedModules": true, - "esModuleInterop": true, - "lib": ["ESNext", "DOM"], - "skipLibCheck": true, - // "strictPropertyInitialization": false - "paths": { - "@": ["./src"], - // "@/*": ["./src/*"] // 多加个这个, - "@/*": ["./src/*"] - } - }, - "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "src/store/modules/user.ts", "src/utils/myaxios.ts"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/Yi.App.Vue3/tsconfig.node.json b/Yi.App.Vue3/tsconfig.node.json deleted file mode 100644 index 9d31e2ae..00000000 --- a/Yi.App.Vue3/tsconfig.node.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/Yi.App.Vue3/vite.config.ts b/Yi.App.Vue3/vite.config.ts deleted file mode 100644 index fbd12138..00000000 --- a/Yi.App.Vue3/vite.config.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { defineConfig, loadEnv } from 'vite' -import path from 'path' -import vue from '@vitejs/plugin-vue' -import Components from 'unplugin-vue-components/vite'; -import { VantResolver } from 'unplugin-vue-components/resolvers'; - - -// https://vitejs.dev/config/ -export default defineConfig(({ mode, command }) => { - const env = loadEnv(mode, process.cwd()) - const { VITE_APP_ENV, VITE_APP_BASE_URL} = env - return { - plugins: [vue(), Components({ - resolvers: [VantResolver()], - }),], - resolve: { - // https://cn.vitejs.dev/config/#resolve-alias - alias: { - // 设置路径 - '~': path.resolve(__dirname, './'), - // 设置别名 - // '@': path.resolve(__dirname, './src'), - "@": path.join(__dirname, "./src"), - } - }, - server: { - port: 17000, - host: true, - open: true, - - - proxy: { - // https://cn.vitejs.dev/config/#server-proxy - '/dev-api': { - target: VITE_APP_BASE_URL, - changeOrigin: true, - rewrite: (p) => p.replace(/^\/dev-api/, ''), - }, - - '/dev-ws': { - target: VITE_APP_BASE_URL, - changeOrigin: true, - rewrite: (p) => p.replace(/^\/dev-ws/, ''), - ws: true - } - - } - }, - } - -} - -) diff --git a/Yi.BBS.Vue3/.env.development b/Yi.BBS.Vue3/.env.development index fef1eee5..8229bdf9 100644 --- a/Yi.BBS.Vue3/.env.development +++ b/Yi.BBS.Vue3/.env.development @@ -1,2 +1,2 @@ VITE_APP_BASEAPI="/api-dev" -VITE_APP_URL="http://localhost:19001/api" \ No newline at end of file +VITE_APP_URL="http://localhost:19001/api/app" \ No newline at end of file diff --git a/Yi.BBS.Vue3/src/utils/request.js b/Yi.BBS.Vue3/src/utils/request.js index d765a851..3b7c3604 100644 --- a/Yi.BBS.Vue3/src/utils/request.js +++ b/Yi.BBS.Vue3/src/utils/request.js @@ -41,7 +41,7 @@ myaxios.interceptors.response.use(function (response) { { ElMessage.error(response.data.errors) } - return response.data; + return response; }, function (error) { const code = error.response.status; const msg = error.message; diff --git a/Yi.Furion.Net6/.template.config/template.json b/Yi.Furion.Net6/.template.config/template.json deleted file mode 100644 index 86262b2c..00000000 --- a/Yi.Furion.Net6/.template.config/template.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/template", - "author": "YI", - "classifications": [ "Common", "Code" ], - "identity": "yi", - "name": "YI", - "shortName": "yi", - "sourceName": "Yi.Furion", - "tags": { - "language": "C#", - "type": "item" - }, - "sources": [ - { - "modifiers": [ - { - "exclude": [ "Server.Bin/**/*", "obj/**/*", "*.user", "*.vspscc", "*.vssscc", "*.cache",".git/**/*",".vs/**/*" ] - } - ] - } - ] - -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/CurrentUserAddExtensions.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/CurrentUserAddExtensions.cs deleted file mode 100644 index 7a6f756d..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/CurrentUserAddExtensions.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.CurrentUsers.Accessor; - -namespace Yi.Framework.Infrastructure.AspNetCore -{ - public static class CurrentUserAddExtensions - { - public static IServiceCollection AddCurrentUserServer(this IServiceCollection services) - { - services.AddSingleton(); - return services.AddTransient(); - } - - - - } - - - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/StratUrlsExtensions.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/StratUrlsExtensions.cs deleted file mode 100644 index bd267c99..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/AspNetCore/StratUrlsExtensions.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.AspNetCore -{ - public static class StratUrlsExtensions - { - public static IWebHostBuilder UseStartUrlsServer(this IWebHostBuilder hostBuilder, IConfiguration configuration, string option = "StartUrl") - { - return hostBuilder.UseUrls(configuration.GetValue(option)); - } - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Attributes/PermissionAttribute.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Attributes/PermissionAttribute.cs deleted file mode 100644 index 41cc1543..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Attributes/PermissionAttribute.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Filters; - -namespace Yi.Framework.Infrastructure.Attributes -{ - [AttributeUsage(AttributeTargets.Method)] - - public class PermissionAttribute : ActionFilterAttribute - { - internal string Code { get; set; } - - public PermissionAttribute(string code) - { - Code = code; - } - - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Auth/DefaultPermissionHandler.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Auth/DefaultPermissionHandler.cs deleted file mode 100644 index 595e4a37..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Auth/DefaultPermissionHandler.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.CurrentUsers; - -namespace Yi.Framework.Infrastructure.Auth -{ - public class DefaultPermissionHandler : IPermissionHandler - { - private ICurrentUser _currentUser { get; set; } - - public DefaultPermissionHandler(ICurrentUser currentUser) - { - _currentUser = currentUser; - } - public bool IsPass(string permission) - { - if (_currentUser.Permission is not null) - { - if (_currentUser.Permission.Contains("*:*:*")) - { - return true; - } - - return _currentUser.Permission.Contains(permission); - - } - - return false; - } - } -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Auth/IPermissionHandler.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Auth/IPermissionHandler.cs deleted file mode 100644 index 3f4a50e6..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Auth/IPermissionHandler.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Auth -{ - public interface IPermissionHandler - { - bool IsPass(string permission); - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Const/PathConst.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Const/PathConst.cs deleted file mode 100644 index 1f42f0a8..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Const/PathConst.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Const -{ - /// - /// 定义公共文件常量 - /// - public class PathConst - { - public const string wwwroot = "wwwroot"; - public const string DataTemplate = "_DataTemplate"; - public const string DataExport = "_DataExport"; - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/CurrentPrincipalAccessorBase.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/CurrentPrincipalAccessorBase.cs deleted file mode 100644 index 009a2100..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/CurrentPrincipalAccessorBase.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Security.Claims; -using Yi.Framework.Infrastructure.Utils; - -namespace Yi.Framework.Infrastructure.CurrentUsers.Accessor -{ - public abstract class CurrentPrincipalAccessorBase : ICurrentPrincipalAccessor - { - public ClaimsPrincipal Principal => _currentPrincipal.Value ?? GetClaimsPrincipal(); - - private readonly AsyncLocal _currentPrincipal = new AsyncLocal(); - - protected abstract ClaimsPrincipal GetClaimsPrincipal(); - - public virtual IDisposable Change(ClaimsPrincipal principal) - { - return SetCurrent(principal); - } - - private IDisposable SetCurrent(ClaimsPrincipal principal) - { - var parent = Principal; - _currentPrincipal.Value = principal; - return new DisposeAction, ClaimsPrincipal>>(static (state) => - { - var (currentPrincipal, parent) = state; - currentPrincipal.Value = parent; - }, (_currentPrincipal, parent)); - - } - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/HttpContextCurrentPrincipalAccessor.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/HttpContextCurrentPrincipalAccessor.cs deleted file mode 100644 index 1d738af3..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/HttpContextCurrentPrincipalAccessor.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.AspNetCore.Http; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.CurrentUsers.Accessor -{ - public class HttpContextCurrentPrincipalAccessor : ThreadCurrentPrincipalAccessor - { - private readonly IHttpContextAccessor _httpContextAccessor; - - public HttpContextCurrentPrincipalAccessor(IHttpContextAccessor httpContextAccessor) - { - _httpContextAccessor = httpContextAccessor; - } - - protected override ClaimsPrincipal GetClaimsPrincipal() - { - return _httpContextAccessor.HttpContext?.User ?? base.GetClaimsPrincipal(); - } - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/ICurrentPrincipalAccessor.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/ICurrentPrincipalAccessor.cs deleted file mode 100644 index 2e773806..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/ICurrentPrincipalAccessor.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Security.Claims; - -namespace Yi.Framework.Infrastructure.CurrentUsers.Accessor -{ - public interface ICurrentPrincipalAccessor - { - ClaimsPrincipal Principal { get; } - IDisposable Change(ClaimsPrincipal principal); - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/StaticCurrentPrincipalAccessor.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/StaticCurrentPrincipalAccessor.cs deleted file mode 100644 index 10b57604..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/StaticCurrentPrincipalAccessor.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Security.Claims; - -namespace Yi.Framework.Infrastructure.CurrentUsers.Accessor -{ - public class StaticPrincipalAccessor : CurrentPrincipalAccessorBase - { - public static ClaimsPrincipal ClaimsPrincipal { get; set; } - protected override ClaimsPrincipal GetClaimsPrincipal() - { - return ClaimsPrincipal; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/ThreadCurrentPrincipalAccessor.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/ThreadCurrentPrincipalAccessor.cs deleted file mode 100644 index 874e01fe..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/Accessor/ThreadCurrentPrincipalAccessor.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Security.Claims; - -namespace Yi.Framework.Infrastructure.CurrentUsers.Accessor -{ - public class ThreadCurrentPrincipalAccessor : CurrentPrincipalAccessorBase - { - protected override ClaimsPrincipal GetClaimsPrincipal() - { - return Thread.CurrentPrincipal as ClaimsPrincipal; - } - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/CurrentUser.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/CurrentUser.cs deleted file mode 100644 index da8bfa38..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/CurrentUser.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Const; -using Yi.Framework.Infrastructure.CurrentUsers.Accessor; - -namespace Yi.Framework.Infrastructure.CurrentUsers -{ - public class CurrentUser : ICurrentUser - { - private readonly ICurrentPrincipalAccessor _principalAccessor; - public CurrentUser(ICurrentPrincipalAccessor principalAccessor) - { - _principalAccessor = principalAccessor; - } - public bool IsAuthenticated => Id != 0; - - public long Id => FindUserId(); - - public long DeptId => FindDeptId(); - - - public string UserName => this.FindClaimValue(TokenTypeConst.UserName); - - /// - /// 暂时为默认值 - /// - public Guid TenantId { get; set; } = Guid.Empty; - - public string Email => FindClaimValue(TokenTypeConst.Email); - - public bool EmailVerified => false; - - public string PhoneNumber => FindClaimValue(TokenTypeConst.PhoneNumber); - - public bool PhoneNumberVerified => false; - - public string[]? Roles => this.FindClaims(TokenTypeConst.Roles).Select(c => c.Value).Distinct().ToArray(); - - public string[]? Permission => this.FindClaims(TokenTypeConst.Permission).Select(c => c.Value).Distinct().ToArray(); - - public virtual Claim FindClaim(string claimType) - { - return _principalAccessor.Principal?.Claims.FirstOrDefault(c => c.Type == claimType); - } - - public virtual Claim[] FindClaims(string claimType) - { - return _principalAccessor.Principal?.Claims.Where(c => c.Type == claimType).ToArray() ?? new Claim[0]; - } - - public virtual Claim[] GetAllClaims() - { - return _principalAccessor.Principal?.Claims.ToArray() ?? new Claim[0]; - } - - public string FindClaimValue(string claimType) - { - return FindClaim(claimType)?.Value; - } - - public long FindDeptId() - { - var deptIdOrNull = _principalAccessor.Principal?.Claims?.FirstOrDefault(c => c.Type == TokenTypeConst.DeptId); - if (deptIdOrNull == null || string.IsNullOrWhiteSpace(deptIdOrNull.Value)) - { - return 0; - } - - if (long.TryParse(deptIdOrNull.Value, out long deptId)) - { - return deptId; - } - - return 0; - } - public long FindUserId() - { - var userIdOrNull = _principalAccessor.Principal?.Claims?.FirstOrDefault(c => c.Type == TokenTypeConst.Id); - if (userIdOrNull == null || string.IsNullOrWhiteSpace(userIdOrNull.Value)) - { - return 0; - } - - if (long.TryParse(userIdOrNull.Value, out long userId)) - { - return userId; - } - - return 0; - } - } -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/ICurrentUser.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/ICurrentUser.cs deleted file mode 100644 index d8301545..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/CurrentUsers/ICurrentUser.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.CurrentUsers -{ - public interface ICurrentUser - { - public bool IsAuthenticated { get; } - public long Id { get; } - - public long DeptId { get; } - - public string UserName { get; } - - public Guid TenantId { get; } - - public string Email { get; } - - public bool EmailVerified { get; } - - public string PhoneNumber { get; } - - public bool PhoneNumberVerified { get; } - - public string[]? Roles { get; } - - public string[]? Permission { get; } - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/AuditedObject.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/AuditedObject.cs deleted file mode 100644 index 8f298ce9..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/AuditedObject.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Auditing -{ - public class AuditedObject : IAuditedObject - { - public DateTime CreationTime { get; set; } = DateTime.Now; - - public long? CreatorId { get; set; } - - public long? LastModifierId { get; set; } - - public DateTime? LastModificationTime { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IAuditedObject.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IAuditedObject.cs deleted file mode 100644 index ef152e59..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IAuditedObject.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Auditing -{ - public interface IAuditedObject : ICreationAuditedObject, IModificationAuditedObject - { - } - - public interface IAuditedObject : IAuditedObject, ICreationAuditedObject, IModificationAuditedObject - { - - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/ICreationAuditedObject.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/ICreationAuditedObject.cs deleted file mode 100644 index 163abfd1..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/ICreationAuditedObject.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Auditing -{ - public interface ICreationAuditedObject : IHasCreationTime, IMayHaveCreator - { - - } - - public interface ICreationAuditedObject : ICreationAuditedObject, IMayHaveCreator - { - - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IDeletionAuditedObject.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IDeletionAuditedObject.cs deleted file mode 100644 index 7cfa8cd8..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IDeletionAuditedObject.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Auditing -{ - public interface IDeletionAuditedObject : IHasDeletionTime - { - long? DeleterId { get; } - } - - public interface IDeletionAuditedObject : IDeletionAuditedObject - { - - TUser Deleter { get; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IFullAuditedObject.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IFullAuditedObject.cs deleted file mode 100644 index d2e490cb..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IFullAuditedObject.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Auditing -{ - public interface IFullAuditedObject : IAuditedObject, IDeletionAuditedObject - { - - } - - public interface IFullAuditedObject : IAuditedObject, IFullAuditedObject, IDeletionAuditedObject - { - - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasCreationTime.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasCreationTime.cs deleted file mode 100644 index 3c295f18..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasCreationTime.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace Yi.Framework.Infrastructure.Data.Auditing; - - -public interface IHasCreationTime -{ - - DateTime CreationTime { get; set; } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasDeletionTime.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasDeletionTime.cs deleted file mode 100644 index 08546e2e..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasDeletionTime.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Data.Entities; - -namespace Yi.Framework.Infrastructure.Data.Auditing -{ - public interface IHasDeletionTime : ISoftDelete - { - DateTime? DeletionTime { get; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasEntityVersion.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasEntityVersion.cs deleted file mode 100644 index ec25e44f..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasEntityVersion.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Auditing -{ - public interface IHasEntityVersion - { - int EntityVersion { get; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasModificationTime.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasModificationTime.cs deleted file mode 100644 index 561b138b..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IHasModificationTime.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Yi.Framework.Infrastructure.Data.Auditing; - - -public interface IHasModificationTime -{ - - DateTime? LastModificationTime { get; } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IMayHaveCreator.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IMayHaveCreator.cs deleted file mode 100644 index 828b8255..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IMayHaveCreator.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Yi.Framework.Infrastructure.Data.Auditing; - -public interface IMayHaveCreator -{ - TCreator Creator { get; } -} - -public interface IMayHaveCreator -{ - long? CreatorId { get; } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IModificationAuditedObject.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IModificationAuditedObject.cs deleted file mode 100644 index 5699ed89..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IModificationAuditedObject.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Auditing -{ - public interface IModificationAuditedObject : IHasModificationTime - { - long? LastModifierId { get; } - } - - public interface IModificationAuditedObject : IModificationAuditedObject - { - TUser LastModifier { get; } - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IMustHaveCreator.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IMustHaveCreator.cs deleted file mode 100644 index 6fa8440f..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Auditing/IMustHaveCreator.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Yi.Framework.Infrastructure.Data.Auditing; - -public interface IMustHaveCreator : IMustHaveCreator -{ - TCreator Creator { get; } -} - -public interface IMustHaveCreator -{ - long CreatorId { get; } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataFiterExtensions.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataFiterExtensions.cs deleted file mode 100644 index bea4b155..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataFiterExtensions.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Logging; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Data.Filters; - -namespace Yi.Framework.Infrastructure.Data -{ - public static class DataFilterExtensions - { - public static IApplicationBuilder UseDataFiterServer(this IApplicationBuilder builder) - { - return builder.UseMiddleware(); - } - } - - public class DataFilterMiddleware - { - private readonly RequestDelegate _next; - private readonly ILogger _logger; - public DataFilterMiddleware(RequestDelegate next, ILoggerFactory loggerFactory) - { - _next = next; - _logger = loggerFactory.CreateLogger(); - } - public async Task InvokeAsync(HttpContext context, IDataFilter dataFilter) - { - //添加默认的过滤器 - dataFilter.AddFilter(u => u.IsDeleted == false); - //dataFilter.AddFilter(u => u.TenantId == Guid.Empty); - await _next(context); - - } - } - -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/AbstractDataSeed.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/AbstractDataSeed.cs deleted file mode 100644 index 07ce170b..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/AbstractDataSeed.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Repositories; - -namespace Yi.Framework.Infrastructure.Data.DataSeeds -{ - public abstract class AbstractDataSeed : IDataSeed - { - protected readonly IRepository _repository; - public AbstractDataSeed(IRepository repository) - { - _repository = repository; - } - - /// - /// 简单种子数据,重写该方法即可 - /// - /// - public abstract List GetSeedData(); - - - /// - /// 复杂数据,重写该方法即可 - /// - /// - public async virtual Task DataHandlerAsync() - { - return await _repository.InsertRangeAsync(GetSeedData()); - } - - /// - /// 这个用来处理判断是否数据库还存在数据 - /// - /// - public virtual async Task IsInvoker() - { - var p = await _repository.IsAnyAsync(x => true); - var p2 = await _repository.CountAsync(x => true); - if (await _repository.CountAsync(u => true) > 0) - { - return false; - } - return true; - } - - /// - /// 完全自定义数据,处理该方法即可 - /// - /// - public async virtual Task InvokerAsync() - { - bool res = true; - if (await IsInvoker()) - { - return await DataHandlerAsync(); - } - return res; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/DataSeedExecuteHandler.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/DataSeedExecuteHandler.cs deleted file mode 100644 index ccbe4dac..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/DataSeedExecuteHandler.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion.DependencyInjection; - -namespace Yi.Framework.Infrastructure.Data.DataSeeds -{ - - public class DataSeedExecuteHandler : ISingleton - { - private IEnumerable _dataSeeds; - public DataSeedExecuteHandler(IEnumerable dataSeeds) - { - _dataSeeds = dataSeeds; - } - - public async Task Invoker() - { - foreach (var dataSeed in _dataSeeds) - { - await dataSeed.InvokerAsync(); - } - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/DataSeedExtensions.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/DataSeedExtensions.cs deleted file mode 100644 index 292d1270..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/DataSeedExtensions.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion; -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using SqlSugar; - -namespace Yi.Framework.Infrastructure.Data.DataSeeds -{ - public static class DataSeedExtensions - { - public static async Task UseDataSeedServer(this IApplicationBuilder builder) - { - if (!App.Configuration.GetSection("EnabledDataSeed").Get()) - { - return builder; - } - - var dataSeeds = builder.ApplicationServices.GetServices(); - var iUnitOfWorkManager = builder.ApplicationServices.GetRequiredService(); - if (dataSeeds is not null) - { - //using (var uow = iUnitOfWorkManager.CreateContext()) - //{ - //var res = await iUnitOfWorkManager.Ado.UseTranAsync(async () => - // { - foreach (var seed in dataSeeds) - { - await seed.InvokerAsync(); - } - //}); - - //var res = uow.Commit(); - - //if (!res.IsSuccess) - //{ - //throw new ApplicationException("种子数据初始化异常"); - //} - //} - } - return builder; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/IDataSeed.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/IDataSeed.cs deleted file mode 100644 index 283aaf1b..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/DataSeeds/IDataSeed.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.DataSeeds -{ - public interface IDataSeed - { - Task InvokerAsync(); - } - - public interface IDataSeed : IDataSeed - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/IMultiTenant.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/IMultiTenant.cs deleted file mode 100644 index 9da9a648..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/IMultiTenant.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Entities -{ - public interface IMultiTenant - { - public Guid TenantId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/ISoftDelete.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/ISoftDelete.cs deleted file mode 100644 index 552dfadf..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Entities/ISoftDelete.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Entities -{ - public interface ISoftDelete - { - public bool IsDeleted { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Filters/DefaultDataFilter.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Filters/DefaultDataFilter.cs deleted file mode 100644 index 6d19bc51..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Filters/DefaultDataFilter.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Filters -{ - public class DefaultDataFilter : IDataFilter - { - private readonly IServiceProvider _serviceProvider; - - public DefaultDataFilter(IServiceProvider serviceProvider) - { - _serviceProvider = serviceProvider; - } - - - - public IDisposable Disable() where TFilter : class - { - return this; - } - - public IDisposable Enable() where TFilter : class - { - return this; - } - - public bool IsEnabled() where TFilter : class - { - return false; - } - - public void RemoveFilter() where TFilter : class - { - } - public void RemoveAndBackup() where TFilter : class - { - } - - public void AddFilter(Expression> expression) where TFilter : class - { - } - - public void Dispose() - { - - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Filters/IDataFilter.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Filters/IDataFilter.cs deleted file mode 100644 index 219a9e19..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Filters/IDataFilter.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Filters -{ - public interface IDataFilter : IDisposable - { - IDisposable Enable() where TFilter : class; - - IDisposable Disable() where TFilter : class; - - bool IsEnabled() where TFilter : class; - - void AddFilter(Expression> expression) where TFilter : class; - - void RemoveFilter() where TFilter : class; - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Json/DateTimeJsonConverter.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Json/DateTimeJsonConverter.cs deleted file mode 100644 index 291f54f9..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Json/DateTimeJsonConverter.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Data.Json -{ - public class DateTimeJsonConverter : JsonConverter - { - private readonly string Format; - public DateTimeJsonConverter(string format) - { - Format = format; - } - public override void Write(Utf8JsonWriter writer, DateTime date, JsonSerializerOptions options) - { - writer.WriteStringValue(date.ToString(Format)); - } - public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - return DateTime.ParseExact(reader.GetString(), Format, null); - } - } - - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Json/LongToStringConverter .cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Json/LongToStringConverter .cs deleted file mode 100644 index 1c3f1540..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Data/Json/LongToStringConverter .cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Buffers; -using System.Buffers.Text; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; -using SqlSugar; - -namespace Yi.Framework.Infrastructure.Data.Json -{ - /// - /// 长整形转字符串 - /// - public class LongToStringConverter : JsonConverter - { - public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType == JsonTokenType.String) - { - ReadOnlySpan span = reader.HasValueSequence ? reader.ValueSequence.ToArray() : reader.ValueSpan; - if (Utf8Parser.TryParse(span, out long number, out int bytesConsumed) && span.Length == bytesConsumed) - { - return number; - } - - if (long.TryParse(reader.GetString(), out number)) - { - return number; - } - return 0; - } - - return reader.GetInt64(); - } - - public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString()); - } - } -} - diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IEntityDto.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IEntityDto.cs deleted file mode 100644 index 1897dbe2..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IEntityDto.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos.Abstract -{ - public interface IEntityDto - { - } - - public interface IEntityDto : IEntityDto - { - TKey Id { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IHasTotalCount.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IHasTotalCount.cs deleted file mode 100644 index 5330e350..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IHasTotalCount.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos.Abstract -{ - public interface IHasTotalCount - { - long Total { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IListResult.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IListResult.cs deleted file mode 100644 index c772a35d..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IListResult.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos.Abstract -{ - public interface IListResult - { - IReadOnlyList Items { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IPagedAllResultRequestDto.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IPagedAllResultRequestDto.cs deleted file mode 100644 index 03efe9bc..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IPagedAllResultRequestDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos.Abstract -{ - public interface IPagedAllResultRequestDto : IPageTimeResultRequestDto, IPagedAndSortedResultRequestDto - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IPagedAndSortedResultRequestDto.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IPagedAndSortedResultRequestDto.cs deleted file mode 100644 index a616fa2f..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IPagedAndSortedResultRequestDto.cs +++ /dev/null @@ -1,15 +0,0 @@ - - -using Yi.Framework.Infrastructure.Enums; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos.Abstract -{ - public interface IPagedAndSortedResultRequestDto - { - int PageNum { get; set; } - int PageSize { get; set; } - string? SortBy { get; set; } - - OrderByEnum SortType { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IPagedResult.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IPagedResult.cs deleted file mode 100644 index 7547fd91..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/Abstract/IPagedResult.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos.Abstract -{ - public interface IPagedResult : IListResult, IHasTotalCount - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/EntityDto.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/EntityDto.cs deleted file mode 100644 index 73ccf3b9..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/EntityDto.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos -{ - [Serializable] - public abstract class EntityDto : EntityDto, IEntityDto, IEntityDto - { - // - // 摘要: - // Id of the entity. - public TKey Id { get; set; } - - public override string ToString() - { - return $"[DTO: {GetType().Name}] Id = {Id}"; - } - } - - [Serializable] - public abstract class EntityDto : IEntityDto - { - public override string ToString() - { - return "[DTO: " + GetType().Name + "]"; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/ListResultDto.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/ListResultDto.cs deleted file mode 100644 index bb35ef6a..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/ListResultDto.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos -{ - [Serializable] - public class ListResultDto : IListResult - { - public IReadOnlyList Items - { - get { return _items ?? (_items = new List()); } - set { _items = value; } - } - private IReadOnlyList _items; - - public ListResultDto() - { - - } - - public ListResultDto(IReadOnlyList items) - { - Items = items; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedAllResultRequestDto.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedAllResultRequestDto.cs deleted file mode 100644 index f92781a6..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedAllResultRequestDto.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos -{ - public class PagedAllResultRequestDto : PagedAndSortedResultRequestDto, IPagedAllResultRequestDto, IPagedAndSortedResultRequestDto, IPageTimeResultRequestDto - { - /// - /// 查询开始时间条件 - /// - public DateTime? StartTime { get; set; } - - /// - /// 查询结束时间条件 - /// - public DateTime? EndTime { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedAndSortedResultRequestDto.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedAndSortedResultRequestDto.cs deleted file mode 100644 index 1a9d685a..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedAndSortedResultRequestDto.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Framework.Infrastructure.Enums; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos -{ - public class PagedAndSortedResultRequestDto : IPagedAndSortedResultRequestDto - { - /// - /// 查询当前页条件 - /// - public int PageNum { get; set; } = 1; - - /// - /// 查询分页大小条件 - /// - public int PageSize { get; set; } = int.MaxValue; - - /// - /// 查询排序字段条件 - /// - public string? SortBy { get; set; } - - /// - /// 查询排序类别条件 - /// - public OrderByEnum SortType { get; set; } = OrderByEnum.Desc; - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedDto.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedDto.cs deleted file mode 100644 index b36e5683..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedDto.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos -{ - public class PagedDto - { - public PagedDto(long totalCount, List items) - { - Total = totalCount; - Items = items; - } - public long Total { get; set; } - - public List Items { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedResultDto.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedResultDto.cs deleted file mode 100644 index 030cb957..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Dtos/PagedResultDto.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Framework.Infrastructure.Ddd.Dtos -{ - public class PagedResultDto : ListResultDto, IPagedResult - { - public long Total { get; set; } - - public PagedResultDto() - { - - } - - public PagedResultDto(long totalCount, IReadOnlyList items) - : base(items) - { - Total = totalCount; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/AggregateRoot.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/AggregateRoot.cs deleted file mode 100644 index bae304e0..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/AggregateRoot.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Entities -{ - public class AggregateRoot : IEntity, IAggregateRoot - { - } - public class AggregateRoot : Entity, IEntity - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/Entity.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/Entity.cs deleted file mode 100644 index 9fc1f0ed..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/Entity.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Principal; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Entities -{ - [Serializable] - public abstract class Entity : IEntity - { - protected Entity() - { - } - - public override string ToString() - { - return "[ENTITY: " + GetType().Name + "] Keys = " + GetKeys(); - } - - public abstract object[] GetKeys(); - - //实体比较简化 - //public bool EntityEquals(IEntity other) - //{ - // return this.GetKeys().Equals(other.GetKeys()); - //} - - } - - [Serializable] - public abstract class Entity : Entity, IEntity, IEntity - { - public virtual TKey Id { get; set; } - - protected Entity() - { - } - - protected Entity(TKey id) - { - Id = id; - } - - public override object[] GetKeys() - { - return new object[1] { Id }; - } - - public override string ToString() - { - return $"[ENTITY: {GetType().Name}] Id = {Id}"; - } - - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/IAggregateRoot.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/IAggregateRoot.cs deleted file mode 100644 index b0d7cd17..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/IAggregateRoot.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.AspNetCore.DataProtection.KeyManagement; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Entities -{ - public interface IAggregateRoot : IEntity - { - } - public interface IAggregateRoot : IEntity - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/IEntity.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/IEntity.cs deleted file mode 100644 index 7e31d1a8..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Entities/IEntity.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Entities -{ - public interface IEntity - { - // - // 摘要: - // Returns an array of ordered keys for this entity. - - } - public interface IEntity : IEntity - { - // - // 摘要: - // Unique identifier for this entity. - TKey Id { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Repositories/IRepository.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Repositories/IRepository.cs deleted file mode 100644 index 80debb85..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Repositories/IRepository.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Linq.Expressions; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Framework.Infrastructure.Enums; - -namespace Yi.Framework.Infrastructure.Ddd.Repositories -{ - public interface IRepository - { - /// - /// 注释一下,严格意义这里应该protected,但是我认为 简易程度 与 耦合程度 中是需要进行衡量的 - /// - ISugarQueryable _DbQueryable { get; } - ISqlSugarClient _Db { get; } - //单查 - Task GetByIdAsync(dynamic id); - Task GetSingleAsync(Expression> whereExpression); - Task GetFirstAsync(Expression> whereExpression); - Task IsAnyAsync(Expression> whereExpression); - Task CountAsync(Expression> whereExpression); - - //多查 - Task> GetListAsync(); - Task> GetListAsync(Expression> whereExpression); - - //分页查 - Task> GetPageListAsync(Expression> whereExpression, int pageNum, int pageSize); - Task> GetPageListAsync(Expression> whereExpression, int pageNum, int pageSize, Expression>? orderByExpression = null, OrderByEnum orderByType = OrderByEnum.Asc); - Task> GetPageListAsync(Expression> whereExpression, int pageNum, int pageSize, string? orderBy, OrderByEnum orderByType = OrderByEnum.Asc); - Task> GetPageListAsync(Expression> whereExpression, IPagedAndSortedResultRequestDto page); - Task> GetPageListAsync(Expression> whereExpression, IPagedAndSortedResultRequestDto page, Expression>? orderByExpression = null, OrderByEnum orderByType = OrderByEnum.Asc); - Task> GetPageListAsync(Expression> whereExpression, IPagedAndSortedResultRequestDto page, string? orderBy, OrderByEnum orderByType = OrderByEnum.Asc); - - //插入 - Task InsertAsync(T insertObj); - Task InsertOrUpdateAsync(T data); - Task InsertOrUpdateAsync(List datas); - Task InsertReturnIdentityAsync(T insertObj); - Task InsertReturnBigIdentityAsync(T insertObj); - Task InsertReturnSnowflakeIdAsync(T insertObj); - Task InsertReturnEntityAsync(T insertObj); - Task InsertRangeAsync(List insertObjs); - - //更新 - Task UpdateAsync(T updateObj); - Task UpdateRangeAsync(List updateObjs); - Task UpdateAsync(Expression> columns, Expression> whereExpression); - Task UpdateIgnoreNullAsync(T updateObj); - - //删除 - Task DeleteAsync(T deleteObj); - Task DeleteAsync(List deleteObjs); - Task DeleteAsync(Expression> whereExpression); - Task DeleteByIdAsync(dynamic id); - Task DeleteByIdsAsync(dynamic[] ids); - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IApplicationService.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IApplicationService.cs deleted file mode 100644 index e4b422af..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IApplicationService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Services.Abstract -{ - public interface IApplicationService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/ICreateAppService.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/ICreateAppService.cs deleted file mode 100644 index 8880e9ef..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/ICreateAppService.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Services.Abstract -{ - public interface ICreateAppService - : ICreateAppService - { - - } - - public interface ICreateAppService - : IApplicationService - { - Task CreateAsync(TCreateInput input); - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/ICreateUpdateAppService.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/ICreateUpdateAppService.cs deleted file mode 100644 index dab0842c..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/ICreateUpdateAppService.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Services.Abstract -{ - public interface ICreateUpdateAppService - : ICreateUpdateAppService - { - - } - - public interface ICreateUpdateAppService - : ICreateUpdateAppService - { - - } - - public interface ICreateUpdateAppService - : ICreateAppService, - IUpdateAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/ICrudAppService.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/ICrudAppService.cs deleted file mode 100644 index e161a12a..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/ICrudAppService.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Framework.Infrastructure.Ddd.Services.Abstract -{ - - public interface ICrudAppService - : ICrudAppService - { - - } - - public interface ICrudAppService - : ICrudAppService - { - - } - - public interface ICrudAppService - : ICrudAppService - { - - } - - public interface ICrudAppService - : ICrudAppService - { - - } - - public interface ICrudAppService - : IReadOnlyAppService, - ICreateUpdateAppService, - IDeleteAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IDeleteAppService.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IDeleteAppService.cs deleted file mode 100644 index 87517a59..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IDeleteAppService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Services.Abstract -{ - public interface IDeleteAppService : IApplicationService - { - Task DeleteAsync(string id); - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IPageTimeResultRequestDto.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IPageTimeResultRequestDto.cs deleted file mode 100644 index e565557c..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IPageTimeResultRequestDto.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Framework.Infrastructure.Ddd.Services.Abstract -{ - public interface IPageTimeResultRequestDto : IPagedAndSortedResultRequestDto - { - DateTime? StartTime { get; set; } - DateTime? EndTime { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IReadOnlyAppService.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IReadOnlyAppService.cs deleted file mode 100644 index 55e81ccf..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IReadOnlyAppService.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Framework.Infrastructure.Ddd.Services.Abstract -{ - public interface IReadOnlyAppService - : IReadOnlyAppService - { - - } - - public interface IReadOnlyAppService - : IReadOnlyAppService - { - - } - - public interface IReadOnlyAppService - : IApplicationService - { - Task GetAsync(TKey id); - - Task> GetListAsync(TGetListInput input); - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IUpdateAppService.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IUpdateAppService.cs deleted file mode 100644 index 4c19a06c..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/Abstract/IUpdateAppService.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Ddd.Services.Abstract -{ - public interface IUpdateAppService - : IUpdateAppService - { - - } - - public interface IUpdateAppService - : IApplicationService - { - Task UpdateAsync(TKey id, TUpdateInput input); - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/ApplicationService.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/ApplicationService.cs deleted file mode 100644 index b9cb74d6..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/ApplicationService.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Furion; -using MapsterMapper; -using Microsoft.Extensions.DependencyInjection; - -namespace Yi.Framework.Infrastructure.Ddd.Services -{ - public abstract class ApplicationService - { - public IMapper _mapper { get => App.GetRequiredService(); } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/CrudAppService.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/CrudAppService.cs deleted file mode 100644 index cca23a49..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/CrudAppService.cs +++ /dev/null @@ -1,176 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Framework.Infrastructure.Helper; - -namespace Yi.Framework.Infrastructure.Ddd.Services -{ - - public abstract class CrudAppService - : CrudAppService - where TEntity : class, IEntity - where TEntityDto : IEntityDto - { - } - - public abstract class CrudAppService - : CrudAppService - where TEntity : class, IEntity - where TEntityDto : IEntityDto - { - } - - public abstract class CrudAppService - : CrudAppService - where TEntity : class, IEntity - where TEntityDto : IEntityDto - { - } - - - - - public abstract class CrudAppService - : CrudAppService - where TEntity : class, IEntity - where TEntityDto : IEntityDto - { - protected override Task MapToGetListOutputDtoAsync(TEntity entity) - { - return MapToGetOutputDtoAsync(entity); - } - - } - - public abstract class CrudAppService - : ReadOnlyAppService, - ICrudAppService - where TEntity : class, IEntity - where TGetOutputDto : IEntityDto - where TGetListOutputDto : IEntityDto - - { - protected virtual Task MapToEntityAsync(TGetListInput getListinput) - { - return Task.FromResult(_mapper.Map(getListinput)); - } - - - protected virtual Task MapToEntityAsync(TCreateInput createInput) - { - var entity = _mapper.Map(createInput); - - //这里判断实体的T,给id赋值 - - //雪花id - if (entity is IEntity entityForlongId) - { - if (entityForlongId.Id is default(long)) - { - //使用反射,暂时先使用sqlsuga的雪花id提供 - //ps: linshi - ReflexHelper.SetModelValue(nameof(IEntity.Id), SnowflakeHelper.NextId, entity); - } - } - if (entity is IEntity entityForGuidId) - { - if (entityForGuidId.Id == Guid.Empty) - { - ReflexHelper.SetModelValue(nameof(IEntity.Id), new Guid(), entity); - } - } - - return Task.FromResult(entity); - } - protected virtual Task MapToEntityAsync(TUpdateInput updateInput, TEntity entity) - { - _mapper.Map(updateInput, entity); - return Task.CompletedTask; - } - - protected virtual Task MapToEntityAsync(TUpdateInput updateInput) - { - var entity = _mapper.Map(updateInput); - return Task.FromResult(entity); - } - - /// - /// 增 - /// - /// - /// - public virtual async Task CreateAsync(TCreateInput input) - { - var entity = await MapToEntityAsync(input); - - //这里还可以设置租户 - await _repository.InsertAsync(entity); - - return await MapToGetOutputDtoAsync(entity); - } - - /// - /// 单、多删 - /// - /// - /// - /// - public virtual async Task DeleteAsync(string id) - { - if (id is null) - { - throw new ArgumentNullException(nameof(id)); - } - var idsValue = id.Split(','); - if (idsValue is null || idsValue.Length == 0) - { - throw new ArgumentNullException(nameof(id)); - } - return await _repository.DeleteByIdsAsync(idsValue.Select(x => (object)x!).ToArray()); - } - - ///// - ///// 删 - ///// - ///// - ///// - ///// - //public async Task DeleteAsync(TKey id) - //{ - // if (id is null) - // { - // throw new ArgumentNullException(nameof(id)); - // } - // return await _repository.DeleteByIdAsync(id); - //} - - /// - /// 改 - /// - /// - /// - /// - /// - public virtual async Task UpdateAsync(TKey id, TUpdateInput input) - { - if (id is null) - { - throw new ArgumentNullException(nameof(id)); - } - - var entity = await _repository.GetByIdAsync(id); - await MapToEntityAsync(input, entity); - await _repository.UpdateAsync(entity); - - return await MapToGetOutputDtoAsync(entity); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/ReadOnlyAppService.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/ReadOnlyAppService.cs deleted file mode 100644 index 5aefc3e4..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Ddd/Services/ReadOnlyAppService.cs +++ /dev/null @@ -1,130 +0,0 @@ -using Furion; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.DependencyInjection; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; - -namespace Yi.Framework.Infrastructure.Ddd.Services -{ - - public abstract class ReadOnlyAppService - : ReadOnlyAppService - where TEntity : class, IEntity - where TEntityDto : IEntityDto - { - } - - public abstract class ReadOnlyAppService -: ReadOnlyAppService -where TEntity : class, IEntity -where TEntityDto : IEntityDto - { - } - - - public abstract class ReadOnlyAppService : ApplicationService, - IReadOnlyAppService - where TEntity : class, IEntity - { - /// - /// 先暂时用服务定位的方式,之后将更改为属性注入 - /// - protected IRepository _repository { get => App.GetRequiredService>(); } - - protected ISugarQueryable _DbQueryable => _repository._DbQueryable; - - //Mapper - protected virtual Task MapToGetOutputDtoAsync(TEntity entity) - { - return Task.FromResult(_mapper.Map(entity)); - } - protected virtual Task> MapToGetListOutputDtosAsync(List entities) - { - var dtos = _mapper.Map>(entities); - - return Task.FromResult(dtos); - } - protected virtual Task MapToGetListOutputDtoAsync(TEntity entity) - { - var dto = _mapper.Map(entity); - return Task.FromResult(dto); - } - - /// - /// 单查 - /// - /// - /// - /// - public virtual async Task GetAsync(TKey id) - { - if (id is null) - { - throw new ArgumentNullException(nameof(id)); - } - - var entity = await _repository.GetByIdAsync(id); - - return await MapToGetOutputDtoAsync(entity); - } - - /// - /// 多查 - /// - /// - /// - [Route("")] - public virtual async Task> GetListAsync([FromQuery]TGetListInput input) - { - var totalCount = -1; - - var entities = new List(); - var entityDtos = new List(); - - bool isPageList = true; - - //if (totalCount > 0) - //{ - - //这里还可以追加如果是审计日志,继续拼接条件即可 - if (input is IPageTimeResultRequestDto timeInput) - { - if (timeInput.StartTime is not null) - { - timeInput.EndTime = timeInput.EndTime ?? DateTime.Now; - } - } - - - - - if (input is IPagedAndSortedResultRequestDto sortInput) - { - entities = await _repository.GetPageListAsync(_ => true, sortInput, sortInput.SortBy, sortInput.SortType); - } - - - else - { - isPageList = false; - entities = await _repository.GetListAsync(); - } - entityDtos = await MapToGetListOutputDtosAsync(entities); - //} - - //如果是分页查询,还需要统计数量 - if (isPageList) - { - totalCount = await _repository.CountAsync(_ => true); - } - return new PagedResultDto( - totalCount, - entityDtos - ); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/AuthException.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/AuthException.cs deleted file mode 100644 index ced77a07..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/AuthException.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Runtime.Serialization; -using Furion.FriendlyException; -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Logging; -using Yi.Framework.Infrastructure.Enums; - -namespace Yi.Framework.Infrastructure.Exceptions -{ - public class AuthException : AppFriendlyException, - IHasErrorCode, - IHasErrorDetails, - IHasLogLevel - { - public int Code { get; set; } - - public string? Details { get; set; } - - public LogLevel LogLevel { get; set; } - - public AuthException( - - string? message = null, - ResultCodeEnum code = ResultCodeEnum.NoPermission, - string? details = null, - Exception? innerException = null, - LogLevel logLevel = LogLevel.Warning) - : base(message, innerException) - { - Code = (int)code; - Details = details; - LogLevel = logLevel; - - - base.ErrorCode = code; - base.StatusCode = StatusCodes.Status401Unauthorized; - base.ErrorMessage = $"{message}{(details is not null ? ":" + details : "")}"; - base.ValidationException = true; - } - - /// - /// 序列化参数的构造函数 - /// - public AuthException(SerializationInfo serializationInfo, StreamingContext context) - : base(serializationInfo, context) - { - - } - - - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/BusinessException.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/BusinessException.cs deleted file mode 100644 index 2a6d12aa..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/BusinessException.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.Runtime.Serialization; -using Furion.FriendlyException; -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Logging; -using Yi.Framework.Infrastructure.Enums; - -namespace Yi.Framework.Infrastructure.Exceptions -{ - public class BusinessException : AppFriendlyException, - IHasErrorCode, - IHasErrorDetails, - IHasLogLevel - { - public int Code { get; set; } - - public string? Details { get; set; } - - public LogLevel LogLevel { get; set; } - - public BusinessException( - int code = (int)ResultCodeEnum.Denied, - string? message = null, - string? details = null, - Exception? innerException = null, - LogLevel logLevel = LogLevel.Warning) - : base(message, innerException) - { - Code = code; - Details = details; - LogLevel = logLevel; - base.ErrorCode= code; - base.StatusCode = StatusCodes.Status403Forbidden; - base.ErrorMessage = $"{message}{(details is not null? ":"+details:"")}"; - base.ValidationException = true; - } - - /// - /// 序列化参数的构造函数 - /// - public BusinessException(SerializationInfo serializationInfo, StreamingContext context) - : base(serializationInfo, context) - { - - } - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/ExceptionExtensions.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/ExceptionExtensions.cs deleted file mode 100644 index 128bb707..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/ExceptionExtensions.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Runtime.ExceptionServices; -using Microsoft.Extensions.Logging; -using Yi.Framework.Infrastructure.Enums; - -namespace Yi.Framework.Infrastructure.Exceptions; - -/// -/// չ -/// -public static class ExceptionExtensions -{ - /// - /// ʹ ٴ׳쳣 - /// - /// Exception to be re-thrown - public static void ReThrow(this Exception exception) - { - ExceptionDispatchInfo.Capture(exception).Throw(); - } - - /// - /// ȡ쳣е־ȼ - /// - /// - /// - /// - public static LogLevel GetLogLevel(this Exception exception, LogLevel defaultLevel = LogLevel.Error) - { - return (exception as IHasLogLevel)?.LogLevel ?? defaultLevel; - } - /// - /// ȡ쳣е־ - /// - /// - /// - /// - public static int GetLogErrorCode(this Exception exception, ResultCodeEnum defaultCode = ResultCodeEnum.NotSuccess) - { - return (exception as IHasErrorCode)?.Code ?? (int)defaultCode; - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/IHasErrorCode.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/IHasErrorCode.cs deleted file mode 100644 index 1484820b..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/IHasErrorCode.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Yi.Framework.Infrastructure.Exceptions -{ - internal interface IHasErrorCode - { - int Code { get; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/IHasErrorDetails.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/IHasErrorDetails.cs deleted file mode 100644 index 9600afe3..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/IHasErrorDetails.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Exceptions -{ - public interface IHasErrorDetails - { - string? Details { get; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/IHasLogLevel.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/IHasLogLevel.cs deleted file mode 100644 index f4b02986..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/IHasLogLevel.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Exceptions -{ - public interface IHasLogLevel - { - LogLevel LogLevel { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/UserFriendlyException.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/UserFriendlyException.cs deleted file mode 100644 index acb22783..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Exceptions/UserFriendlyException.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Runtime.Serialization; -using Microsoft.Extensions.Logging; -using Yi.Framework.Infrastructure.Enums; - -namespace Yi.Framework.Infrastructure.Exceptions -{ - public class UserFriendlyException : BusinessException - { - public UserFriendlyException( -string message, -int code = (int)ResultCodeEnum.Denied, -string? details = null, -Exception? innerException = null, -LogLevel logLevel = LogLevel.Warning) -: base( - code, - message, - details, - innerException, - logLevel) - { - Details = details; - } - - /// - /// 序列化参数的构造函数 - /// - public UserFriendlyException(SerializationInfo serializationInfo, StreamingContext context) - : base(serializationInfo, context) - { - - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Convert.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Convert.cs deleted file mode 100644 index 0e825ab4..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Convert.cs +++ /dev/null @@ -1,446 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Extensions -{ - public static partial class Extensions - { - #region 转换为long - /// - /// 将object转换为long,若转换失败,则返回0。不抛出异常。 - /// - /// - /// - public static long ParseToLong(this object obj) - { - try - { - return long.Parse(obj.ToString()); - } - catch - { - return 0L; - } - } - - /// - /// 将object转换为long,若转换失败,则返回指定值。不抛出异常。 - /// - /// - /// - /// - public static long ParseToLong(this string str, long defaultValue) - { - try - { - return long.Parse(str); - } - catch - { - return defaultValue; - } - } - #endregion - - #region 转换为int - /// - /// 将object转换为int,若转换失败,则返回0。不抛出异常。 - /// - /// - /// - public static int ParseToInt(this object str) - { - try - { - return Convert.ToInt32(str); - } - catch - { - return 0; - } - } - - /// - /// 将object转换为int,若转换失败,则返回指定值。不抛出异常。 - /// null返回默认值 - /// - /// - /// - /// - public static int ParseToInt(this object str, int defaultValue) - { - if (str == null) - { - return defaultValue; - } - try - { - return Convert.ToInt32(str); - } - catch - { - return defaultValue; - } - } - #endregion - - #region 转换为short - /// - /// 将object转换为short,若转换失败,则返回0。不抛出异常。 - /// - /// - /// - public static short ParseToShort(this object obj) - { - try - { - return short.Parse(obj.ToString()); - } - catch - { - return 0; - } - } - - /// - /// 将object转换为short,若转换失败,则返回指定值。不抛出异常。 - /// - /// - /// - public static short ParseToShort(this object str, short defaultValue) - { - try - { - return short.Parse(str.ToString()); - } - catch - { - return defaultValue; - } - } - #endregion - - #region 转换为demical - /// - /// 将object转换为demical,若转换失败,则返回指定值。不抛出异常。 - /// - /// - /// - public static decimal ParseToDecimal(this object str, decimal defaultValue) - { - try - { - return decimal.Parse(str.ToString()); - } - catch - { - return defaultValue; - } - } - - /// - /// 将object转换为demical,若转换失败,则返回0。不抛出异常。 - /// - /// - /// - public static decimal ParseToDecimal(this object str) - { - try - { - return decimal.Parse(str.ToString()); - } - catch - { - return 0; - } - } - #endregion - - #region 转化为bool - /// - /// 将object转换为bool,若转换失败,则返回false。不抛出异常。 - /// - /// - /// - public static bool ParseToBool(this object str) - { - try - { - return bool.Parse(str.ToString()); - } - catch - { - return false; - } - } - - /// - /// 将object转换为bool,若转换失败,则返回指定值。不抛出异常。 - /// - /// - /// - public static bool ParseToBool(this object str, bool result) - { - try - { - return bool.Parse(str.ToString()); - } - catch - { - return result; - } - } - #endregion - - #region 转换为float - /// - /// 将object转换为float,若转换失败,则返回0。不抛出异常。 - /// - /// - /// - public static float ParseToFloat(this object str) - { - try - { - return float.Parse(str.ToString()); - } - catch - { - return 0; - } - } - - /// - /// 将object转换为float,若转换失败,则返回指定值。不抛出异常。 - /// - /// - /// - public static float ParseToFloat(this object str, float result) - { - try - { - return float.Parse(str.ToString()); - } - catch - { - return result; - } - } - #endregion - - #region 转换为Guid - /// - /// 将string转换为Guid,若转换失败,则返回Guid.Empty。不抛出异常。 - /// - /// - /// - public static Guid ParseToGuid(this string str) - { - try - { - return new Guid(str); - } - catch - { - return Guid.Empty; - } - } - #endregion - - #region 转换为DateTime - /// - /// 将string转换为DateTime,若转换失败,则返回日期最小值。不抛出异常。 - /// - /// - /// - public static DateTime ParseToDateTime(this string str) - { - try - { - if (string.IsNullOrWhiteSpace(str)) - { - return DateTime.MinValue; - } - if (str.Contains("-") || str.Contains("/")) - { - return DateTime.Parse(str); - } - else - { - int length = str.Length; - switch (length) - { - case 4: - return DateTime.ParseExact(str, "yyyy", System.Globalization.CultureInfo.CurrentCulture); - case 6: - return DateTime.ParseExact(str, "yyyyMM", System.Globalization.CultureInfo.CurrentCulture); - case 8: - return DateTime.ParseExact(str, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture); - case 10: - return DateTime.ParseExact(str, "yyyyMMddHH", System.Globalization.CultureInfo.CurrentCulture); - case 12: - return DateTime.ParseExact(str, "yyyyMMddHHmm", System.Globalization.CultureInfo.CurrentCulture); - case 14: - return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture); - default: - return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture); - } - } - } - catch - { - return DateTime.MinValue; - } - } - - /// - /// 将string转换为DateTime,若转换失败,则返回默认值。 - /// - /// - /// - /// - public static DateTime ParseToDateTime(this string str, DateTime? defaultValue) - { - try - { - if (string.IsNullOrWhiteSpace(str)) - { - return defaultValue.GetValueOrDefault(); - } - if (str.Contains("-") || str.Contains("/")) - { - return DateTime.Parse(str); - } - else - { - int length = str.Length; - switch (length) - { - case 4: - return DateTime.ParseExact(str, "yyyy", System.Globalization.CultureInfo.CurrentCulture); - case 6: - return DateTime.ParseExact(str, "yyyyMM", System.Globalization.CultureInfo.CurrentCulture); - case 8: - return DateTime.ParseExact(str, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture); - case 10: - return DateTime.ParseExact(str, "yyyyMMddHH", System.Globalization.CultureInfo.CurrentCulture); - case 12: - return DateTime.ParseExact(str, "yyyyMMddHHmm", System.Globalization.CultureInfo.CurrentCulture); - case 14: - return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture); - default: - return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture); - } - } - } - catch - { - return defaultValue.GetValueOrDefault(); - } - } - #endregion - - #region 转换为string - /// - /// 将object转换为string,若转换失败,则返回""。不抛出异常。 - /// - /// - /// - public static string ParseToString(this object obj) - { - try - { - if (obj == null) - { - return string.Empty; - } - else - { - return obj.ToString(); - } - } - catch - { - return string.Empty; - } - } - public static string ParseToStrings(this object obj) - { - try - { - var list = obj as IEnumerable; - if (list != null) - { - return string.Join(",", list); - } - else - { - return obj.ToString(); - } - } - catch - { - return string.Empty; - } - - } - #endregion - - #region 转换为double - /// - /// 将object转换为double,若转换失败,则返回0。不抛出异常。 - /// - /// - /// - public static double ParseToDouble(this object obj) - { - try - { - return double.Parse(obj.ToString()); - } - catch - { - return 0; - } - } - - /// - /// 将object转换为double,若转换失败,则返回指定值。不抛出异常。 - /// - /// - /// - /// - public static double ParseToDouble(this object str, double defaultValue) - { - try - { - return double.Parse(str.ToString()); - } - catch - { - return defaultValue; - } - } - #endregion - - #region 强制转换类型 - /// - /// 强制转换类型 - /// - /// - /// - /// - public static IEnumerable CastSuper(this IEnumerable source) - { - foreach (object item in source) - { - yield return (TResult)Convert.ChangeType(item, typeof(TResult)); - } - } - #endregion - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Enum.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Enum.cs deleted file mode 100644 index 07d2a300..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Enum.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -//using Newtonsoft.Json; - -namespace Yi.Framework.Infrastructure.Extensions -{ - public static partial class Extensions - { - #region 枚举成员转成dictionary类型 - /// - /// 转成dictionary类型 - /// - /// - /// - public static Dictionary EnumToDictionary(this Type enumType) - { - Dictionary dictionary = new Dictionary(); - Type typeDescription = typeof(DescriptionAttribute); - FieldInfo[] fields = enumType.GetFields(); - int sValue = 0; - string sText = string.Empty; - foreach (FieldInfo field in fields) - { - if (field.FieldType.IsEnum) - { - sValue = ((int)enumType.InvokeMember(field.Name, BindingFlags.GetField, null, null, null)); - object[] arr = field.GetCustomAttributes(typeDescription, true); - if (arr.Length > 0) - { - DescriptionAttribute da = (DescriptionAttribute)arr[0]; - sText = da.Description; - } - else - { - sText = field.Name; - } - dictionary.Add(sValue, sText); - } - } - return dictionary; - } - /// - /// 枚举成员转成键值对Json字符串 - /// - /// - /// - //public static string EnumToDictionaryString(this Type enumType) - //{ - // List> dictionaryList = EnumToDictionary(enumType).ToList(); - // var sJson = JsonConvert.SerializeObject(dictionaryList); - // return sJson; - //} - #endregion - - #region 获取枚举的描述 - /// - /// 获取枚举值对应的描述 - /// - /// - /// - public static string GetDescription(this System.Enum enumType) - { - FieldInfo EnumInfo = enumType.GetType().GetField(enumType.ToString()); - if (EnumInfo != null) - { - DescriptionAttribute[] EnumAttributes = (DescriptionAttribute[])EnumInfo.GetCustomAttributes(typeof(DescriptionAttribute), false); - if (EnumAttributes.Length > 0) - { - return EnumAttributes[0].Description; - } - } - return enumType.ToString(); - } - #endregion - - #region 根据值获取枚举的描述 - public static string GetDescriptionByEnum(this object obj) - { - var tEnum = System.Enum.Parse(typeof(T), obj.ParseToString()) as System.Enum; - var description = tEnum.GetDescription(); - return description; - } - #endregion - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Exception.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Exception.cs deleted file mode 100644 index e59e98f7..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Exception.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Extensions -{ - public static partial class Extensions - { - public static Exception GetOriginalException(this Exception ex) - { - if (ex.InnerException == null) return ex; - - return ex.InnerException.GetOriginalException(); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Linq.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Linq.cs deleted file mode 100644 index 542da07f..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Linq.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Extensions -{ - public static class LinqExtensions - { - public static Expression Property(this Expression expression, string propertyName) - { - return Expression.Property(expression, propertyName); - } - public static Expression AndAlso(this Expression left, Expression right) - { - return Expression.AndAlso(left, right); - } - public static Expression Call(this Expression instance, string methodName, params Expression[] arguments) - { - return Expression.Call(instance, instance.Type.GetMethod(methodName), arguments); - } - public static Expression GreaterThan(this Expression left, Expression right) - { - return Expression.GreaterThan(left, right); - } - public static Expression ToLambda(this Expression body, params ParameterExpression[] parameters) - { - return Expression.Lambda(body, parameters); - } - - public static Expression> True() { return param => true; } - - public static Expression> False() { return param => false; } - - /// - /// 组合And - /// - /// - public static Expression> And(this Expression> first, Expression> second) - { - return first.Compose(second, Expression.AndAlso); - } - /// - /// 组合Or - /// - /// - public static Expression> Or(this Expression> first, Expression> second) - { - return first.Compose(second, Expression.OrElse); - } - - /// - /// Combines the first expression with the second using the specified merge function. - /// - static Expression Compose(this Expression first, Expression second, Func merge) - { - var map = first.Parameters - .Select((f, i) => new { f, s = second.Parameters[i] }) - .ToDictionary(p => p.s, p => p.f); - var secondBody = ParameterRebinder.ReplaceParameters(map, second.Body); - return Expression.Lambda(merge(first.Body, secondBody), first.Parameters); - } - - /// - /// ParameterRebinder - /// - private class ParameterRebinder : ExpressionVisitor - { - /// - /// The ParameterExpression map - /// - readonly Dictionary map; - /// - /// Initializes a new instance of the class. - /// - /// The map. - ParameterRebinder(Dictionary map) - { - this.map = map ?? new Dictionary(); - } - /// - /// Replaces the parameters. - /// - /// The map. - /// The exp. - /// Expression - public static Expression ReplaceParameters(Dictionary map, Expression exp) - { - return new ParameterRebinder(map).Visit(exp); - } - /// - /// Visits the parameter. - /// - /// The p. - /// Expression - protected override Expression VisitParameter(ParameterExpression p) - { - ParameterExpression replacement; - - if (map.TryGetValue(p, out replacement)) - { - p = replacement; - } - return base.VisitParameter(p); - } - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Validate.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Validate.cs deleted file mode 100644 index d4031fad..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/Extension.Validate.cs +++ /dev/null @@ -1,44 +0,0 @@ -//using Microsoft.AspNetCore.Http; - -namespace Yi.Framework.Infrastructure.Extensions -{ - public static partial class Extensions - { - public static bool IsEmpty(this object value) - { - if (value != null && !string.IsNullOrEmpty(value.ParseToString())) - { - return false; - } - else - { - return true; - } - } - public static bool IsNotEmpty(this object value) - { - return !IsEmpty(value); - } - public static bool IsNullOrZero(this object value) - { - if (value == null || value.ParseToString().Trim() == "0") - { - return true; - } - else - { - return false; - } - } - - //public static bool IsAjaxRequest(this HttpRequest request) - //{ - // if (request == null) - // throw new ArgumentNullException("request"); - - // if (request.Headers != null) - // return request.Headers["X-Requested-With"] == "XMLHttpRequest"; - // return false; - //} - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/StringExtension.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/StringExtension.cs deleted file mode 100644 index 59cf9cdd..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Extensions/StringExtension.cs +++ /dev/null @@ -1,232 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Text.RegularExpressions; - -namespace Yi.Framework.Infrastructure.Extensions -{ - public static class StringExtension - { - - /// - /// SQL条件拼接 - /// - /// - /// - /// - public static string If(this string str, bool condition) - { - return condition ? str : string.Empty; - } - /// - /// 判断是否为空 - /// - /// - /// - public static bool IfNotEmpty(this string str) - { - return !string.IsNullOrEmpty(str); - } - - /// - /// 注意:如果替换的旧值中有特殊符号,替换将会失败,解决办法 例如特殊符号是“(”: 要在调用本方法前加oldValue=oldValue.Replace("(","//("); - /// - /// - /// - /// - /// - public static string ReplaceFirst(this string input, string oldValue, string newValue) - { - Regex regEx = new Regex(oldValue, RegexOptions.Multiline); - return regEx.Replace(input, newValue == null ? "" : newValue, 1); - } - - /// - /// 骆驼峰转下划线 - /// - /// - /// - public static string ToSmallCamelCase(string name) - { - var stringBuilder = new StringBuilder(); - stringBuilder.Append(name.Substring(0, 1).ToLower()); - - for (var i = 0; i < name.Length; i++) - { - if (i == 0) - { - stringBuilder.Append(name.Substring(0, 1).ToLower()); - } - else - { - if (name[i] >= 'A' && name[i] <= 'Z') - { - stringBuilder.Append($"_{name.Substring(i, 1).ToLower()}"); - } - else - { - stringBuilder.Append(name[i]); - } - } - } - - return stringBuilder.ToString(); - } - - /// - /// 下划线命名转驼峰命名 - /// - /// - /// - public static string UnderScoreToCamelCase(this string underscore) - { - string[] ss = underscore.Split("_"); - if (ss.Length == 1) - { - return underscore; - } - - StringBuilder sb = new StringBuilder(); - sb.Append(ss[0]); - for (int i = 1; i < ss.Length; i++) - { - sb.Append(ss[i].FirstUpperCase()); - } - - return sb.ToString(); - } - - /// - /// 首字母转大写 - /// - /// - /// - public static string FirstUpperCase(this string str) - { - return string.IsNullOrEmpty(str) ? str : str.Substring(0, 1).ToUpper() + str[1..]; - } - - /// - /// 首字母转小写 - /// - /// - /// - public static string FirstLowerCase(this string str) - { - return string.IsNullOrEmpty(str) ? str : str.Substring(0, 1).ToLower() + str[1..]; - } - - /// - /// 截取指定字符串中间内容 - /// - /// - /// - /// - /// - public static string SubstringBetween(this string sourse, string startstr, string endstr) - { - string result = string.Empty; - int startindex, endindex; - try - { - startindex = sourse.IndexOf(startstr); - if (startindex == -1) - return result; - string tmpstr = sourse.Substring(startindex + startstr.Length); - endindex = tmpstr.IndexOf(endstr); - if (endindex == -1) - return result; - result = tmpstr.Remove(endindex); - } - catch (Exception ex) - { - Console.WriteLine("MidStrEx Err:" + ex.Message); - } - return result; - } - - /// - /// 转换为Pascal风格-每一个单词的首字母大写 - /// - /// 字段名 - /// 分隔符 - /// - public static string ConvertToPascal(this string fieldName, string fieldDelimiter) - { - string result = string.Empty; - if (fieldName.Contains(fieldDelimiter)) - { - //全部小写 - string[] array = fieldName.ToLower().Split(fieldDelimiter.ToCharArray()); - foreach (var t in array) - { - //首字母大写 - result += t.Substring(0, 1).ToUpper() + t[1..]; - } - } - else if (string.IsNullOrWhiteSpace(fieldName)) - { - result = fieldName; - } - else if (fieldName.Length == 1) - { - result = fieldName.ToUpper(); - } - else if (fieldName.Length == fieldName.CountUpper()) - { - result = fieldName.Substring(0, 1).ToUpper() + fieldName[1..].ToLower(); - } - else - { - result = fieldName.Substring(0, 1).ToUpper() + fieldName[1..]; - } - return result; - } - - /// - /// 大写字母个数 - /// - /// - /// - public static int CountUpper(this string str) - { - int count1 = 0; - char[] chars = str.ToCharArray(); - foreach (char num in chars) - { - if (num >= 'A' && num <= 'Z') - { - count1++; - } - //else if (num >= 'a' && num <= 'z') - //{ - // count2++; - //} - } - return count1; - } - - /// - /// 转换为Camel风格-第一个单词小写,其后每个单词首字母大写 - /// - /// 字段名 - /// 分隔符 - /// - public static string ConvertToCamel(this string fieldName, string fieldDelimiter) - { - //先Pascal - string result = fieldName.ConvertToPascal(fieldDelimiter); - //然后首字母小写 - if (result.Length == 1) - { - result = result.ToLower(); - } - else - { - result = result.Substring(0, 1).ToLower() + result[1..]; - } - - return result; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/SnowflakeHelper.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/SnowflakeHelper.cs deleted file mode 100644 index c2b5babd..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Helper/SnowflakeHelper.cs +++ /dev/null @@ -1,102 +0,0 @@ -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Helper -{ - public static class SnowflakeHelper - { - public static long NextId { get => SnowFlakeSingle.Instance.NextId(); } - - public static long Next() - { - SnowflakeTool snowflakeTool = new SnowflakeTool(1); - return snowflakeTool.NextId(); - } - - private class SnowflakeTool - { - //机器ID - private static long nodeId; - private static long twepoch = 687888001020L; //唯一时间,这是一个避免重复的随机量,自行设定不要大于当前时间戳 - private static long sequence = 0L; - private static int workerIdBits = 4; //机器码字节数。4个字节用来保存机器码(定义为Long类型会出现,最大偏移64位,所以左移64位没有意义) - public static long maxWorkerId = -1L ^ -1L << workerIdBits; //最大机器ID - private static int sequenceBits = 10; //计数器字节数,10个字节用来保存计数码 - private static int workerIdShift = sequenceBits; //机器码数据左移位数,就是后面计数器占用的位数 - private static int timestampLeftShift = sequenceBits + workerIdBits; //时间戳左移动位数就是机器码和计数器总字节数 - public static long sequenceMask = -1L ^ -1L << sequenceBits; //一微秒内可以产生计数,如果达到该值则等到下一微妙在进行生成 - private long lastTimestamp = -1L; - - /// - /// 机器码 - /// - /// - public SnowflakeTool(long workerId) - { - if (workerId > maxWorkerId || workerId < 0) - throw new Exception(string.Format("节点id 不能大于 {0} 或者 小于 0 ", workerId)); - nodeId = workerId; - - } - - public long NextId() - { - lock (this) - { - long timestamp = TimeGen(); - if (lastTimestamp == timestamp) - { //同一微妙中生成ID - sequence = sequence + 1 & sequenceMask; //用&运算计算该微秒内产生的计数是否已经到达上限 - if (sequence == 0) - { - //一微妙内产生的ID计数已达上限,等待下一微妙 - timestamp = TillNextMillis(lastTimestamp); - } - } - else - { //不同微秒生成ID - sequence = 0; //计数清0 - } - if (timestamp < lastTimestamp) - { //如果当前时间戳比上一次生成ID时时间戳还小,抛出异常,因为不能保证现在生成的ID之前没有生成过 - throw new Exception(string.Format("Clock moved backwards. Refusing to generate id for {0} milliseconds", - lastTimestamp - timestamp)); - } - lastTimestamp = timestamp; //把当前时间戳保存为最后生成ID的时间戳 - long nextId = timestamp - twepoch << timestampLeftShift | nodeId << workerIdShift | sequence; - return nextId; - } - } - - /// - /// 获取下一微秒时间戳 - /// - /// - /// - private long TillNextMillis(long lastTimestamp) - { - long timestamp = TimeGen(); - while (timestamp <= lastTimestamp) - { - timestamp = TimeGen(); - } - return timestamp; - } - - /// - /// 生成当前时间戳 - /// - /// - private long TimeGen() - { - return (long)(DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds; - } - } - } - - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/Filters/SqlsugarDataFilter.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/Filters/SqlsugarDataFilter.cs deleted file mode 100644 index 68a94012..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/Filters/SqlsugarDataFilter.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Linq.Expressions; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Filters; - -namespace Yi.Framework.Infrastructure.Sqlsugar.Filters -{ - public class SqlsugarDataFilter : IDataFilter - { - private ISqlSugarClient _Db { get; set; } - public SqlsugarDataFilter(ISqlSugarClient sqlSugarClient) - { - _Db = sqlSugarClient; - } - public void AddFilter(Expression> expression) where TFilter : class - { - _Db.QueryFilter.AddTableFilter(expression); - } - - public IDisposable Disable() where TFilter : class - { - _Db.QueryFilter.ClearAndBackup(); - return this; - } - - public IDisposable Enable() where TFilter : class - { - throw new NotImplementedException("暂时没有单独还原过滤器的方式"); - } - - public bool IsEnabled() where TFilter : class - { - throw new NotImplementedException("暂时没有判断过滤器的方式"); - } - - public void RemoveFilter() where TFilter : class - { - _Db.QueryFilter.Clear(); - } - - public void Dispose() - { - _Db.QueryFilter.Restore(); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/Repositories/SqlsugarRepository.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/Repositories/SqlsugarRepository.cs deleted file mode 100644 index c9a32b0c..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/Repositories/SqlsugarRepository.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System.Linq.Expressions; -using Furion.DependencyInjection; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Enums; -using Yi.Framework.Infrastructure.Helper; - -namespace Yi.Framework.Infrastructure.Sqlsugar.Repositories -{ - public class SqlsugarRepository : SimpleClient, IRepository ,ITransient where T : class, new() - { - public SqlsugarRepository(ISqlSugarClient context) : base(context) - { - } - /// - /// 注释一下,严格意义这里应该protected,但是我认为 简易程度 与 耦合程度 中是需要进行衡量的 - /// - public ISugarQueryable _DbQueryable => AsQueryable(); - - public ISqlSugarClient _Db { get { return Context; }} - - public async Task> GetPageListAsync(Expression> whereExpression, IPagedAndSortedResultRequestDto page) - { - return await base.GetPageListAsync(whereExpression, new PageModel { PageIndex = page.PageNum, PageSize = page.PageSize }); - } - - public async Task> GetPageListAsync(Expression> whereExpression, IPagedAndSortedResultRequestDto page, Expression>? orderByExpression = null, OrderByEnum orderByType = OrderByEnum.Asc) - { - return await base.GetPageListAsync(whereExpression, new PageModel { PageIndex = page.PageNum, PageSize = page.PageSize }, orderByExpression, orderByType.EnumToEnum()); - } - - public async Task> GetPageListAsync(Expression> whereExpression, IPagedAndSortedResultRequestDto page, string? orderBy, OrderByEnum orderByType = OrderByEnum.Asc) - { - return await _DbQueryable.Where(whereExpression).OrderByIF(orderBy is not null, orderBy + " " + orderByType.ToString().ToLower()).ToPageListAsync(page.PageNum, page.PageSize); - } - - - - - public async Task> GetPageListAsync(Expression> whereExpression, int pageNum, int pageSize) - { - return await base.GetPageListAsync(whereExpression, new PageModel { PageIndex = pageNum, PageSize = pageSize }); - } - - public async Task> GetPageListAsync(Expression> whereExpression, int pageNum, int pageSize, Expression>? orderByExpression = null, OrderByEnum orderByType = OrderByEnum.Asc) - { - return await base.GetPageListAsync(whereExpression, new PageModel { PageIndex = pageNum, PageSize = pageSize }, orderByExpression, orderByType.EnumToEnum()); - } - - public async Task> GetPageListAsync(Expression> whereExpression, int pageNum, int pageSize, string? orderBy, OrderByEnum orderByType = OrderByEnum.Asc) - { - return await _DbQueryable.Where(whereExpression).OrderByIF(orderBy is not null, orderBy + " " + orderByType.ToString().ToLower()).ToPageListAsync(pageNum, pageSize); - } - - - - - - - - public async Task UpdateIgnoreNullAsync(T updateObj) - { - return await _Db.Updateable(updateObj).IgnoreColumns(true).ExecuteCommandAsync() > 0; - } - - public override async Task DeleteAsync(T deleteObj) - { - //逻辑删除 - if (deleteObj is ISoftDelete) - { - //反射赋值 - ReflexHelper.SetModelValue(nameof(ISoftDelete.IsDeleted), true, deleteObj); - return await UpdateAsync(deleteObj); - - } - else - { - return await base.DeleteAsync(deleteObj); - - } - } - public override async Task DeleteAsync(List deleteObjs) - { - if (typeof(ISoftDelete).IsAssignableFrom(typeof(T))) - { - //反射赋值 - deleteObjs.ForEach(e => ReflexHelper.SetModelValue(nameof(ISoftDelete.IsDeleted), true, e)); - return await UpdateRangeAsync(deleteObjs); - } - else - { - return await base.DeleteAsync(deleteObjs); - } - } - public override async Task DeleteAsync(Expression> whereExpression) - { - if (typeof(ISoftDelete).IsAssignableFrom(typeof(T))) - { - var entities = await GetListAsync(whereExpression); - //反射赋值 - entities.ForEach(e => ReflexHelper.SetModelValue(nameof(ISoftDelete.IsDeleted), true, e)); - return await UpdateRangeAsync(entities); - } - else - { - return await base.DeleteAsync(whereExpression); - } - } - public override async Task DeleteByIdAsync(dynamic id) - { - if (typeof(ISoftDelete).IsAssignableFrom(typeof(T))) - { - var entity = await GetByIdAsync(id); - //反射赋值 - ReflexHelper.SetModelValue(nameof(ISoftDelete.IsDeleted), true, entity); - return await UpdateAsync(entity); - } - else - { - return await _Db.Deleteable().In(id).ExecuteCommandAsync() > 0; - } - - } - public override async Task DeleteByIdsAsync(dynamic[] ids) - { - if (typeof(ISoftDelete).IsAssignableFrom(typeof(T))) - { - var entities = await _DbQueryable.In(ids).ToListAsync(); - if (entities.Count == 0) - { - return false; - } - //反射赋值 - entities.ForEach(e => ReflexHelper.SetModelValue(nameof(ISoftDelete.IsDeleted), true, e)); - return await UpdateRangeAsync(entities); - } - else - { - return await base.DeleteByIdsAsync(ids); - } - - } - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlSugarDbContext.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlSugarDbContext.cs deleted file mode 100644 index a8e3216c..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlSugarDbContext.cs +++ /dev/null @@ -1,178 +0,0 @@ -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Framework.Infrastructure.Helper; - -namespace Yi.Framework.Infrastructure.Sqlsugar -{ - public class SqlSugarDbContext - { - /// - /// SqlSugar 客户端 - /// - public ISqlSugarClient SqlSugarClient { get; set; } - - protected ICurrentUser _currentUser; - - protected ILogger _logger; - - protected IOptions _options; - - public SqlSugarDbContext(IOptions options, ICurrentUser currentUser, ILogger logger) - { - _currentUser = currentUser; - _logger = logger; - _options = options; - var dbConnOptions = options.Value; - #region 组装options - if (dbConnOptions.DbType is null) - { - throw new ArgumentException(SqlsugarConst.DbType配置为空); - } - var slavaConFig = new List(); - if (dbConnOptions.EnabledReadWrite) - { - if (dbConnOptions.ReadUrl is null) - { - throw new ArgumentException(SqlsugarConst.读写分离为空); - } - - var readCon = dbConnOptions.ReadUrl; - - readCon.ForEach(s => - { - //如果是动态saas分库,这里的连接串都不能写死,需要动态添加,这里只配置共享库的连接 - slavaConFig.Add(new SlaveConnectionConfig() { ConnectionString = s }); - }); - } - #endregion - SqlSugarClient = new SqlSugarScope(new ConnectionConfig() - { - //准备添加分表分库 - DbType = dbConnOptions.DbType ?? DbType.Sqlite, - ConnectionString = dbConnOptions.Url, - IsAutoCloseConnection = true, - MoreSettings = new ConnMoreSettings() - { - DisableNvarchar = true - }, - SlaveConnectionConfigs = slavaConFig, - //设置codefirst非空值判断 - ConfigureExternalServices = new ConfigureExternalServices - { - EntityService = (c, p) => - { - //高版C#写法 支持string?和string - if (new NullabilityInfoContext() - .Create(c).WriteState is NullabilityState.Nullable) - { - p.IsNullable = true; - } - } - } - }, - db => - { - db.Aop.DataExecuting = DataExecuting; - db.Aop.OnLogExecuting = OnLogExecuting; - //扩展 - OnSqlSugarClientConfig(db); - }); - } - - /// - /// 上下文对象扩展 - /// - /// - protected virtual void OnSqlSugarClientConfig(ISqlSugarClient sqlSugarClient) - { - } - - /// - /// 数据 - /// - /// - /// - protected virtual void DataExecuting(object oldValue, DataFilterModel entityInfo) - { - switch (entityInfo.OperationType) - { - case DataFilterType.UpdateByObject: - - if (entityInfo.PropertyName.Equals(nameof(IAuditedObject.LastModificationTime))) - { - //不等于默认最小值,其他null或者有值都进行赋值 - if (!DateTime.MinValue.Equals((DateTime)oldValue)) - { - entityInfo.SetValue(DateTime.Now); - } - } - if (entityInfo.PropertyName.Equals(nameof(IAuditedObject.LastModifierId))) - { - if (_currentUser != null) - { - entityInfo.SetValue(_currentUser.Id); - } - } - break; - case DataFilterType.InsertByObject: - if (entityInfo.PropertyName.Equals(nameof(IEntity.Id))) - { - //主键为空或者为默认最小值 - if (oldValue is 0) - { - entityInfo.SetValue(SnowflakeHelper.NextId); - } - } - - if (entityInfo.PropertyName.Equals(nameof(IAuditedObject.CreationTime))) - { - //为空或者为默认最小值都进行赋值 - if (oldValue is null || DateTime.MinValue.Equals((DateTime)oldValue)) - { - entityInfo.SetValue(DateTime.Now); - } - } - if (entityInfo.PropertyName.Equals(nameof(IAuditedObject.CreatorId))) - { - if (_currentUser != null) - { - entityInfo.SetValue(_currentUser.Id); - } - } - - //插入时,需要租户id,先预留 - if (entityInfo.PropertyName.Equals(nameof(IMultiTenant.TenantId))) - { - //if (this.CurrentTenant is not null) - //{ - // entityInfo.SetValue(this.CurrentTenant.Id); - //} - } - break; - } - } - - /// - /// 日志 - /// - /// - /// - protected virtual void OnLogExecuting(string s, SugarParameter[] p) - { - StringBuilder sb = new StringBuilder(); - sb.Append($"\r\n 完整SQL:{UtilMethods.GetSqlString(DbType.MySql, s, p)}"); - _logger?.LogDebug(sb.ToString()); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlsugarCodeFirstExtensions.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlsugarCodeFirstExtensions.cs deleted file mode 100644 index 20582d9f..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlsugarCodeFirstExtensions.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using Furion; -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Options; -using SqlSugar; - -namespace Yi.Framework.Infrastructure.Sqlsugar -{ - public static class SqlsugarCodeFirstExtensions - { - public static void UseSqlsugarCodeFirstServer(this IApplicationBuilder app) - { - var db = app.ApplicationServices.GetRequiredService(); - var options = app.ApplicationServices.GetRequiredService>(); - - if (options.Value.EnabledCodeFirst == false) return; - - db.DbMaintenance.CreateDatabase(); - var assemblys = new List(); - - //全盘加载 - if (options.Value.EntityAssembly is null) - { - assemblys.AddRange(App.Assemblies.ToList()); - } - //按需加载 - else - { - options.Value.EntityAssembly.ForEach(a => - { - assemblys.Add(Assembly.Load(a)); - }); - } - - foreach (var assembly in assemblys) - { - TableInvoer(db, assembly.GetTypes().ToList()); - } - - } - - private static void TableInvoer(ISqlSugarClient _Db, List typeList) - { - foreach (var t in typeList) - { - //扫描如果存在SugarTable特性 并且 不是分表模型,直接codefirst - if (t.GetCustomAttributes(false).Any(a => a.GetType().Equals(typeof(SugarTable)) - && !t.GetCustomAttributes(false).Any(a => a.GetType().Equals(typeof(SplitTableAttribute))))) - { - _Db.CodeFirst.SetStringDefaultLength(200).InitTables(t);//这样一个表就能成功创建了 - } - } - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlsugarConst.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlsugarConst.cs deleted file mode 100644 index 527ff144..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlsugarConst.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Infrastructure.Sqlsugar -{ - public class SqlsugarConst - { - public const string 读写分离为空 = "开启读写分离后,读库连接不能为空"; - - public const string DbType配置为空 = "DbType配置为空,必须选择一个数据库类型"; - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlsugarExtensions.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlsugarExtensions.cs deleted file mode 100644 index 2abd7f19..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/SqlsugarExtensions.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Furion; -using Microsoft.Extensions.DependencyInjection; -using Yi.Framework.Infrastructure.Sqlsugar.Uow; - -namespace Yi.Framework.Infrastructure.Sqlsugar -{ - /// - /// 这一块,需要做成上下文对象,会进行重构 - /// - public static class SqlsugarExtensions - { - /// - /// 使用默认上下文 - /// - /// - public static void AddDbSqlsugarContextServer(this IServiceCollection services) - { - services.AddDbSqlsugarOption(); - - - services.AddSingleton(x => x.GetRequiredService().SqlSugarClient); - services.AddSingleton(); - - - } - - /// - /// 自定义上下文 - /// - /// - /// - public static void AddDbSqlsugarContextServer(this IServiceCollection services) where DbContext : SqlSugarDbContext - { - services.AddDbSqlsugarOption(); - - - services.AddSingleton(x => x.GetRequiredService().SqlSugarClient); - services.AddSingleton(); - - } - - public static void AddDbSqlsugarOption(this IServiceCollection services) - { - services.Configure(App.Configuration.GetSection("DbConnOptions")); - - services.AddUnitOfWork(); - - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/Uow/SqlsugarUnitOfWork.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/Uow/SqlsugarUnitOfWork.cs deleted file mode 100644 index fa6bbb3f..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Sqlsugar/Uow/SqlsugarUnitOfWork.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Furion; -using Furion.DatabaseAccessor; -using Furion.DependencyInjection; -using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.Extensions.DependencyInjection; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Repositories; - -namespace Yi.Framework.Infrastructure.Sqlsugar.Uow -{ - public class SqlsugarUnitOfWork : IUnitOfWork - { - // - /// SqlSugar 对象 - /// - private readonly ISqlSugarClient _sqlSugarClient; - - /// - /// 构造函数 - /// - /// - public SqlsugarUnitOfWork(ISqlSugarClient sqlSugarClient) - { - _sqlSugarClient = sqlSugarClient; - } - - /// - /// 开启工作单元处理 - /// - /// - /// - /// - public void BeginTransaction(FilterContext context, UnitOfWorkAttribute unitOfWork) - { - _sqlSugarClient.AsTenant().BeginTran(); - } - - /// - /// 提交工作单元处理 - /// - /// - /// - /// - public void CommitTransaction(FilterContext resultContext, UnitOfWorkAttribute unitOfWork) - { - _sqlSugarClient.AsTenant().CommitTran(); - } - - /// - /// 回滚工作单元处理 - /// - /// - /// - /// - public void RollbackTransaction(FilterContext resultContext, UnitOfWorkAttribute unitOfWork) - { - _sqlSugarClient.AsTenant().RollbackTran(); - } - - /// - /// 执行完毕(无论成功失败) - /// - /// - /// - /// - public void OnCompleted(FilterContext context, FilterContext resultContext) - { - _sqlSugarClient.Dispose(); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Startup.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Startup.cs deleted file mode 100644 index ea76ab5a..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Startup.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Furion; -using Furion.Schedule; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using StackExchange.Profiling.SqlFormatters; -using Yi.Framework.Infrastructure.AspNetCore; -using Yi.Framework.Infrastructure.Auth; -using Yi.Framework.Infrastructure.Data; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Data.Filters; -using Yi.Framework.Infrastructure.Sqlsugar; -using Yi.Framework.Infrastructure.Sqlsugar.Filters; -using Yi.Framework.Infrastructure.Sqlsugar.Uow; - -namespace Yi.Framework.Infrastructure; - -public class Startup : AppStartup -{ - public void ConfigureServices(IServiceCollection services) - { - services.AddCurrentUserServer(); - services.AddTransient(); - - services.AddDbSqlsugarContextServer(); - - services.AddSingleton(); - services.AddSingleton(); - services.AddControllers(options => - { - options.Filters.Add(); - }); - - - } - - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Utils/DisposeAction.cs b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Utils/DisposeAction.cs deleted file mode 100644 index 9aae2f64..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Utils/DisposeAction.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Diagnostics.CodeAnalysis; - -namespace Yi.Framework.Infrastructure.Utils -{ - public class DisposeAction : IDisposable - { - private readonly Action _action; - - private readonly T _parameter; - - /// - /// Creates a new object. - /// - /// Action to be executed when this object is disposed. - /// The parameter of the action. - public DisposeAction(Action action, T parameter) - { - _action = action; - _parameter = parameter; - } - - public void Dispose() - { - _action(_parameter); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Yi.Framework.Infrastructure.csproj b/Yi.Furion.Net6/Yi.Framework.Infrastructure/Yi.Framework.Infrastructure.csproj deleted file mode 100644 index 7ef85142..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Infrastructure/Yi.Framework.Infrastructure.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - net6.0 - enable - enable - - - - - - - - - - - - - - - diff --git a/Yi.Furion.Net6/Yi.Framework.Module/Caching/CacheManager.cs b/Yi.Furion.Net6/Yi.Framework.Module/Caching/CacheManager.cs deleted file mode 100644 index fa079103..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/Caching/CacheManager.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.Caching -{ - /// - /// 考虑到本地缓存与分布式缓存差异太大,使用功能限制太大,所以该抽象类淘汰 - /// - public abstract class CacheManager - { - - public virtual bool Exits(string key) - { - throw new NotImplementedException(); - } - public virtual T Get(string key) - { - throw new NotImplementedException(); - } - - public virtual bool Set(string key, T data, TimeSpan time) - { - throw new NotImplementedException(); - } - - public virtual bool Set(string key, T data) - { - throw new NotImplementedException(); - } - - public virtual long Del(string key) - { - throw new NotImplementedException(); - } - - public virtual bool HSet(string key, string fieId, object data) - { - throw new NotImplementedException(); - } - - public virtual bool HSet(string key, string fieId, object data, TimeSpan time) - { - throw new NotImplementedException(); - } - - public virtual T HGet(string key, string field) - { - throw new NotImplementedException(); - } - - - public virtual long HDel(string key, params string[] par) - { - throw new NotImplementedException(); - } - - public virtual long HLen(string key) - { - throw new NotImplementedException(); - } - - public virtual Dictionary HGetAll(string key) - { - throw new NotImplementedException(); - } - - /// - /// 简单发布 - /// - /// - /// - /// - public virtual long Publish(string channel, string message) - { - throw new NotImplementedException(); - } - - public virtual bool LSet(string key, long index, object value) - { - throw new NotImplementedException(); - } - - - - /// - /// 列表插入头部 - /// - /// - /// - /// - /// - public virtual long LPush(string key, params T[] value) - { - throw new NotImplementedException(); - } - - /// - /// 列表弹出头部 - /// - /// - /// - /// - public virtual T LPop(string key) - { - throw new NotImplementedException(); - } - - public virtual string[] Keys(string pattern) - { - throw new NotImplementedException(); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/Caching/CachingConnOptions.cs b/Yi.Furion.Net6/Yi.Framework.Module/Caching/CachingConnOptions.cs deleted file mode 100644 index 2cded02e..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/Caching/CachingConnOptions.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.Caching -{ - public class CachingConnOptions - { - public string? Host { get; set; } - public int DB { get; set; } = 0; - public int Prot { get; set; } - public string? Password { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/Caching/MemoryCacheClient.cs b/Yi.Furion.Net6/Yi.Framework.Module/Caching/MemoryCacheClient.cs deleted file mode 100644 index 75bdc960..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/Caching/MemoryCacheClient.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion.DependencyInjection; -using Microsoft.Extensions.Caching.Memory; - -namespace Yi.Framework.Module.Caching -{ - public class MemoryCacheClient : CacheManager,ISingleton - { - private IMemoryCache Client { get; set; } - public MemoryCacheClient() - { - Client = new Microsoft.Extensions.Caching.Memory.MemoryCache(new MemoryCacheOptions()); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/Caching/RedisCacheClient.cs b/Yi.Furion.Net6/Yi.Framework.Module/Caching/RedisCacheClient.cs deleted file mode 100644 index 11e15fe9..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/Caching/RedisCacheClient.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CSRedis; -using Furion.DependencyInjection; -using Microsoft.Extensions.Options; -using static CSRedis.CSRedisClient; - -namespace Yi.Framework.Module.Caching -{ - - public class RedisCacheClient : CacheManager, ISingleton - { - public readonly CachingConnOptions _RedisOptions; - - //公开客户端,csredis封装的很完美了 - public CSRedisClient Client { get; set; } - - public RedisCacheClient(IOptions redisConnOptions) - { - this._RedisOptions = redisConnOptions.Value; - Client = new CSRedisClient($"{_RedisOptions.Host}:{_RedisOptions.Prot},password={_RedisOptions.Password},defaultDatabase ={_RedisOptions.DB}"); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryConst.cs b/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryConst.cs deleted file mode 100644 index 7aa2c416..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryConst.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.DictionaryManager -{ - /// - /// 常量定义 - /// - - public class DictionaryConst - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryTypeConst.cs b/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryTypeConst.cs deleted file mode 100644 index 0389552e..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryTypeConst.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.DictionaryManager -{ - /// - /// 常量定义 - /// - - public class DictionaryTypeConst - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryTypeService.cs b/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryTypeService.cs deleted file mode 100644 index d0c9c741..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/DictionaryTypeService.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Module.DictionaryManager.Dtos.DictionaryType; -using Yi.Framework.Module.DictionaryManager.Entities; - -namespace Yi.Framework.Module.DictionaryManager -{ - /// - /// DictionaryType服务实现 - /// - [ApiDescriptionSettings("DictionaryManager")] - public class DictionaryTypeService : CrudAppService, - IDictionaryTypeService, IDynamicApiController, ITransient - { - - - public async override Task> GetListAsync(DictionaryTypeGetListInputVo input) - { - - RefAsync total = 0; - var entities = await _DbQueryable.WhereIF(input.DictName is not null, x => x.DictName.Contains(input.DictName!)) - .WhereIF(input.DictType is not null, x => x.DictType!.Contains(input.DictType!)) - .WhereIF(input.State is not null, x => x.State == input.State) - .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) - .ToPageListAsync(input.PageNum, input.PageSize, total); - - return new PagedResultDto - { - Total = total, - Items = await MapToGetListOutputDtosAsync(entities) - }; - } - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeGetListOutputDto.cs b/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeGetListOutputDto.cs deleted file mode 100644 index 0e51e551..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/Dtos/DictionaryType/DictionaryTypeGetListOutputDto.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Framework.Module.DictionaryManager.Dtos.DictionaryType -{ - public class DictionaryTypeGetListOutputDto : IEntityDto - { - public long Id { get; set; } - public DateTime CreationTime { get; set; } = DateTime.Now; - public long? CreatorId { get; set; } - public string DictName { get; set; } = string.Empty; - public string DictType { get; set; } = string.Empty; - public string? Remark { get; set; } - - public bool State { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/IDictionaryService.cs b/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/IDictionaryService.cs deleted file mode 100644 index 6e6ab248..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/IDictionaryService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Framework.Module.DictionaryManager.Dtos.Dictionary; - -namespace Yi.Framework.Module.DictionaryManager -{ - /// - /// Dictionary服务抽象 - /// - public interface IDictionaryService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/IDictionaryTypeService.cs b/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/IDictionaryTypeService.cs deleted file mode 100644 index eb104857..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/DictionaryManager/IDictionaryTypeService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Framework.Module.DictionaryManager.Dtos.DictionaryType; - -namespace Yi.Framework.Module.DictionaryManager -{ - /// - /// DictionaryType服务抽象 - /// - public interface IDictionaryTypeService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/FileManager/FileEntity.cs b/Yi.Furion.Net6/Yi.Framework.Module/FileManager/FileEntity.cs deleted file mode 100644 index 46941edd..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/FileManager/FileEntity.cs +++ /dev/null @@ -1,43 +0,0 @@ -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Ddd.Entities; - -namespace Yi.Framework.Module.FileManager -{ - /// - /// 文件表 - /// - [SugarTable("File")] - public class FileEntity : IEntity, IAuditedObject - { - [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] - public long Id { get; set; } - /// - /// 文件类型 - /// - [SugarColumn(ColumnName = "FileContentType")] - public string? FileContentType { get; set; } - /// - /// 文件大小 - /// - [SugarColumn(ColumnName = "FileSize")] - public decimal FileSize { get; set; } - /// - /// 文件名 - /// - [SugarColumn(ColumnName = "FileName")] - public string FileName { get; set; } - /// - /// 文件路径 - /// - [SugarColumn(ColumnName = "FilePath")] - public string FilePath { get; set; } - - public DateTime CreationTime { get; set; } - public long? CreatorId { get; set; } - - public long? LastModifierId { get; set; } - - public DateTime? LastModificationTime { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/FileManager/FileGetListOutputDto.cs b/Yi.Furion.Net6/Yi.Framework.Module/FileManager/FileGetListOutputDto.cs deleted file mode 100644 index 356da40e..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/FileManager/FileGetListOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Framework.Module.FileManager -{ - public class FileGetListOutputDto : IEntityDto - { - public long Id { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/FileManager/FileService.cs b/Yi.Furion.Net6/Yi.Framework.Module/FileManager/FileService.cs deleted file mode 100644 index dc792c63..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/FileManager/FileService.cs +++ /dev/null @@ -1,144 +0,0 @@ -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Mapster; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Yi.Framework.Infrastructure.AspNetCore; -using Yi.Framework.Infrastructure.Const; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Infrastructure.Enums; -using Yi.Framework.Infrastructure.Helper; -using Yi.Framework.Module.ImageSharp; - -namespace Yi.Framework.Module.FileManager -{ - /// - /// 文件处理 - /// - [ApiDescriptionSettings("FileManager")] - public class FileService : ApplicationService, IFileService, IDynamicApiController, ITransient - { - private readonly IRepository _repository; - private readonly ImageSharpManager _imageSharpManager; - private readonly HttpContext _httpContext; - public FileService(IRepository repository, ImageSharpManager imageSharpManager, IHttpContextAccessor httpContextAccessor - ) - { - _repository = repository; - _imageSharpManager = imageSharpManager; - if (httpContextAccessor.HttpContext is null) - { - throw new ApplicationException("HttpContext为空"); - } - _httpContext = httpContextAccessor.HttpContext; - } - - /// - /// 下载文件,是否缩略图 - /// - /// - [Route("/api/file/{code}/{isThumbnail?}")] - public async Task Get([FromRoute] long code, [FromRoute] bool? isThumbnail) - { - var file = await _repository.GetByIdAsync(code); - if (file is null) - { - return new NotFoundResult(); - } - - var path = file.FilePath; - //如果为缩略图,需要修改路径 - if (isThumbnail is true) - { - path = $"{PathConst.wwwroot}/{FileTypeEnum.Thumbnail}/{file.Id}{Path.GetExtension(file.FileName)}"; - } - //路径为: 文件路径/文件id+文件扩展名 - - if (!File.Exists(path)) - { - return new NotFoundResult(); - } - - var steam = await File.ReadAllBytesAsync(path); - - //设置附件下载,下载名称 - _httpContext.FileAttachmentHandle(file.FileName); - return new FileContentResult(steam, file.FileContentType ?? @"text/plain"); - } - - /// - /// 上传文件 - /// - /// - public async Task> Post([FromForm] IFormFileCollection file) - { - if (file.Count() == 0) - { - throw new ArgumentException("文件上传为空!"); - } - //批量插入 - List entities = new(); - - foreach (var f in file) - { - FileEntity data = new(); - data.Id = SnowflakeHelper.NextId; - data.FileSize = (decimal)f.Length / 1024; - data.FileName = f.FileName; - - - data.FileContentType = MimeHelper.GetMimeMapping(f.FileName); - - - var type = MimeHelper.GetFileType(f.FileName); - - //落盘文件,文件名为雪花id+自己的扩展名 - string filename = data.Id.ToString() + Path.GetExtension(f.FileName); - string typePath = $"{PathConst.wwwroot}/{type}"; - if (!Directory.Exists(typePath)) - { - Directory.CreateDirectory(typePath); - } - - var filePath = Path.Combine(typePath, filename); - data.FilePath = filePath; - - - //生成文件 - using (var stream = new FileStream(filePath, FileMode.CreateNew, FileAccess.ReadWrite)) - { - await f.CopyToAsync(stream); - - //如果是图片类型,还需要生成缩略图,当然,如果图片很小,直接复制过去即可 - if (FileTypeEnum.Image.Equals(type)) - { - string thumbnailPath = $"{PathConst.wwwroot}/{FileTypeEnum.Thumbnail}"; - if (!Directory.Exists(thumbnailPath)) - { - Directory.CreateDirectory(thumbnailPath); - } - string thumbnailFilePath = Path.Combine(thumbnailPath, filename); - try - { - _imageSharpManager.ImageCompress(f.FileName, f.OpenReadStream(), thumbnailFilePath); - } - catch - { - var result = new byte[stream.Length]; - await stream.ReadAsync(result, 0, result.Length); - await File.WriteAllBytesAsync(thumbnailFilePath, result); - } - } - - - }; - entities.Add(data); - } - await _repository.InsertRangeAsync(entities); - return entities.Adapt>(); - - - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/FileManager/IFileService.cs b/Yi.Furion.Net6/Yi.Framework.Module/FileManager/IFileService.cs deleted file mode 100644 index 5040db92..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/FileManager/IFileService.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Yi.Framework.Module.FileManager -{ - public interface IFileService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/HeiCaptchaExtension.cs b/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/HeiCaptchaExtension.cs deleted file mode 100644 index 423f732d..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/HeiCaptchaExtension.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Yi.Framework.Module.ImageSharp.HeiCaptcha -{ - public static class HeiCaptchaExtension - { - /// - /// 启用HeiCaptcha - /// - /// - /// - public static IServiceCollection AddHeiCaptcha(this IServiceCollection services) - { - if (services == null) - { - throw new ArgumentNullException(nameof(services)); - } - - services.AddScoped(); - return services; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/ImageRgba32Extension.cs b/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/ImageRgba32Extension.cs deleted file mode 100644 index f53415fb..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/ImageRgba32Extension.cs +++ /dev/null @@ -1,32 +0,0 @@ -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Formats.Gif; -using SixLabors.ImageSharp.Formats.Png; -using SixLabors.ImageSharp.PixelFormats; -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; - -namespace Yi.Framework.Module.ImageSharp.HeiCaptcha -{ - public static class ImageRgba32Extension - { - public static byte[] ToPngArray(this Image img) where TPixel : unmanaged, IPixel - { - using (var ms = new MemoryStream()) - { - img.Save(ms, PngFormat.Instance); - return ms.ToArray(); - } - } - - public static byte[] ToGifArray(this Image img) where TPixel : unmanaged, IPixel - { - using (var ms = new MemoryStream()) - { - img.Save(ms, new GifEncoder()); - return ms.ToArray(); - } - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/ImageSharpExtension.cs b/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/ImageSharpExtension.cs deleted file mode 100644 index 8e2845ae..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/ImageSharpExtension.cs +++ /dev/null @@ -1,216 +0,0 @@ -//using SixLabors.Fonts; -//using SixLabors.ImageSharp; -//using SixLabors.ImageSharp.PixelFormats; -//using SixLabors.ImageSharp.Processing; -//using System; -//using System.Collections.Generic; - -//namespace Hei.Captcha -//{ -// public static class ImageSharpExtension -// { - -// / -// / 绘制中文字符(可以绘制字母数字,但样式可能需要改) -// / -// / -// / < param name="processingContext"> -// / -// / < param name="containerHeight"> -// / -// / < param name="color"> -// / -// / < returns > -// public static IImageProcessingContext DrawingCnText(this IImageProcessingContext processingContext, int containerWidth, int containerHeight, string text, Rgba32 color, Font font) -// where TPixel : struct, IPixel -// { -// return processingContext.Apply(img => -// { -// if (string.IsNullOrEmpty(text) == false) -// { -// Random random = new Random(); -// var textWidth = (img.Width / text.Length); -// var img2Size = Math.Min(textWidth, img.Height); -// var fontMiniSize = (int)(img2Size * 0.6); -// var fontMaxSize = (int)(img2Size * 0.95); - -// for (int i = 0; i < text.Length; i++) -// { -// using (Image img2 = new Image(img2Size, img2Size)) -// { -// Font scaledFont = new Font(font, random.Next(fontMiniSize, fontMaxSize)); -// var point = new Point(i * textWidth, (containerHeight - img2.Height) / 2); -// var textGraphicsOptions = new TextGraphicsOptions(true) -// { -// HorizontalAlignment = HorizontalAlignment.Left, -// VerticalAlignment = VerticalAlignment.Top -// }; - -// img2.Mutate(ctx => ctx -// .DrawText(textGraphicsOptions, text[i].ToString(), scaledFont, color, new Point(0, 0)) -// .Rotate(random.Next(-45, 45)) -// ); -// img.Mutate(ctx => ctx.DrawImage(img2, point, 1)); -// } -// } -// } -// }); -// } - -// public static IImageProcessingContext DrawingEnText(this IImageProcessingContext processingContext, int containerWidth, int containerHeight, string text, string[] colorHexArr, Font[] fonts) -// where TPixel : struct, IPixel -// { -// return processingContext.Apply(img => -// { -// if (string.IsNullOrEmpty(text) == false) -// { -// Random random = new Random(); -// var textWidth = (img.Width / text.Length); -// var img2Size = Math.Min(textWidth, img.Height); -// var fontMiniSize = (int)(img2Size * 0.9); -// var fontMaxSize = (int)(img2Size * 1.37); -// Array fontStyleArr = Enum.GetValues(typeof(FontStyle)); - -// for (int i = 0; i < text.Length; i++) -// { -// using (Image img2 = new Image(img2Size, img2Size)) -// { -// Font scaledFont = new Font(fonts[random.Next(0, fonts.Length)], random.Next(fontMiniSize, fontMaxSize), (FontStyle)fontStyleArr.GetValue(random.Next(fontStyleArr.Length))); -// var point = new Point(i * textWidth, (containerHeight - img2.Height) / 2); -// var colorHex = colorHexArr[random.Next(0, colorHexArr.Length)]; -// var textGraphicsOptions = new TextGraphicsOptions(true) -// { -// HorizontalAlignment = HorizontalAlignment.Left, -// VerticalAlignment = VerticalAlignment.Top -// }; - -// img2.Mutate(ctx => ctx -// .DrawText(textGraphicsOptions, text[i].ToString(), scaledFont, Rgba32.FromHex(colorHex), new Point(0, 0)) -// .DrawingGrid(containerWidth, containerHeight, Rgba32.FromHex(colorHex), 6, 1) -// .Rotate(random.Next(-45, 45)) -// ); -// img.Mutate(ctx => ctx.DrawImage(img2, point, 1)); -// } -// } -// } -// }); -// } - -// / -// / 画圆圈(泡泡) -// / -// / -// / < param name="processingContext"> -// / -// / < param name="containerHeight"> -// / -// / < param name="miniR"> -// / -// / < param name="color"> -// / -// / < returns > -// public static IImageProcessingContext DrawingCircles(this IImageProcessingContext processingContext, int containerWidth, int containerHeight, int count, int miniR, int maxR, TPixel color, bool canOverlap = false) -// where TPixel : struct, IPixel -// { -// return processingContext.Apply(img => -// { -// EllipsePolygon ep = null; -// Random random = new Random(); -// PointF tempPoint = new PointF(); -// List points = new List(); - -// if (count > 0) -// { -// for (int i = 0; i < count; i++) -// { -// if (canOverlap) -// { -// tempPoint = new PointF(random.Next(0, containerWidth), random.Next(0, containerHeight)); -// } -// else -// { -// tempPoint = getCirclePoginF(containerWidth, containerHeight, (miniR + maxR), ref points); -// } -// ep = new EllipsePolygon(tempPoint, random.Next(miniR, maxR)); - -// img.Mutate(ctx => ctx -// .Draw(color, (float)(random.Next(94, 145) / 100.0), ep.Clip()) -// ); -// } -// } -// }); -// } -// / -// / 画杂线 -// / -// / -// / < param name="processingContext"> -// / -// / < param name="containerHeight"> -// / -// / < param name="count"> -// / -// / < returns > -// public static IImageProcessingContext DrawingGrid(this IImageProcessingContext processingContext, int containerWidth, int containerHeight, TPixel color, int count, float thickness) -// where TPixel : struct, IPixel -// { -// return processingContext.Apply(img => -// { -// var points = new List { new PointF(0, 0) }; -// for (int i = 0; i < count; i++) -// { -// getCirclePoginF(containerWidth, containerHeight, 9, ref points); -// } -// points.Add(new PointF(containerWidth, containerHeight)); -// img.Mutate(ctx => ctx -// .DrawLines(color, thickness, points.ToArray()) -// ); -// }); -// } - -// / -// / 散 随机点 -// / -// / -// / < param name="containerHeight"> -// / -// / < param name="list"> -// / -// private static PointF getCirclePoginF(int containerWidth, int containerHeight, double lapR, ref List list) -// { -// Random random = new Random(); -// PointF newPoint = new PointF(); -// int retryTimes = 10; -// double tempDistance = 0; - -// do -// { -// newPoint.X = random.Next(0, containerWidth); -// newPoint.Y = random.Next(0, containerHeight); -// bool tooClose = false; -// foreach (var p in list) -// { -// tooClose = false; -// tempDistance = Math.Sqrt((Math.Pow((p.X - newPoint.X), 2) + Math.Pow((p.Y - newPoint.Y), 2))); -// if (tempDistance < lapR) -// { -// tooClose = true; -// break; -// } -// } -// if (tooClose == false) -// { -// list.Add(newPoint); -// break; -// } -// } -// while (retryTimes-- > 0); - -// if (retryTimes <= 0) -// { -// list.Add(newPoint); -// } -// return newPoint; -// } -// } -//} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/SecurityCodeHelper.cs b/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/SecurityCodeHelper.cs deleted file mode 100644 index 720eb436..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/SecurityCodeHelper.cs +++ /dev/null @@ -1,182 +0,0 @@ -using SixLabors.Fonts; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Drawing.Processing; -using SixLabors.ImageSharp.Formats.Gif; -using SixLabors.ImageSharp.Formats.Png; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp.Processing; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; - -namespace Yi.Framework.Module.ImageSharp.HeiCaptcha -{ - /// - /// 验证码配置和绘制逻辑 - /// - public class SecurityCodeHelper - { - /// - /// 验证码文本池 - /// - private static readonly string[] _cnTextArr = new string[] { "的", "一", "国", "在", "人", "了", "有", "中", "是", "年", "和", "大", "业", "不", "为", "发", "会", "工", "经", "上", "地", "市", "要", "个", "产", "这", "出", "行", "作", "生", "家", "以", "成", "到", "日", "民", "来", "我", "部", "对", "进", "多", "全", "建", "他", "公", "开", "们", "场", "展", "时", "理", "新", "方", "主", "企", "资", "实", "学", "报", "制", "政", "济", "用", "同", "于", "法", "高", "长", "现", "本", "月", "定", "化", "加", "动", "合", "品", "重", "关", "机", "分", "力", "自", "外", "者", "区", "能", "设", "后", "就", "等", "体", "下", "万", "元", "社", "过", "前", "面", "农", "也", "得", "与", "说", "之", "员", "而", "务", "利", "电", "文", "事", "可", "种", "总", "改", "三", "各", "好", "金", "第", "司", "其", "从", "平", "代", "当", "天", "水", "省", "提", "商", "十", "管", "内", "小", "技", "位", "目", "起", "海", "所", "立", "已", "通", "入", "量", "子", "问", "度", "北", "保", "心", "还", "科", "委", "都", "术", "使", "明", "着", "次", "将", "增", "基", "名", "向", "门", "应", "里", "美", "由", "规", "今", "题", "记", "点", "计", "去", "强", "两", "些", "表", "系", "办", "教 正", "条", "最", "达", "特", "革", "收", "二", "期", "并", "程", "厂", "如", "道", "际 及", "西", "口", "京", "华", "任", "调", "性", "导", "组", "东", "路", "活", "广", "意", "比", "投", "决", "交", "统", "党", "南", "安", "此", "领", "结", "营", "项", "情", "解", "议", "义", "山", "先", "车", "然", "价", "放", "世", "间", "因", "共", "院", "步", "物", "界", "集", "把", "持", "无", "但", "城", "相", "书", "村", "求", "治", "取", "原", "处", "府", "研", "质", "信", "四", "运", "县", "军", "件", "育", "局", "干", "队", "团", "又", "造", "形", "级", "标", "联", "专", "少", "费", "效", "据", "手", "施", "权", "江", "近", "深", "更", "认", "果", "格", "几", "看", "没", "职", "服", "台", "式", "益", "想", "数", "单", "样", "只", "被", "亿", "老", "受", "优", "常", "销", "志", "战", "流", "很", "接", "乡", "头", "给", "至", "难", "观", "指", "创", "证", "织", "论", "别", "五", "协", "变", "风", "批", "见", "究", "支", "那", "查", "张", "精", "每", "林", "转", "划", "准", "做", "需", "传", "争", "税", "构", "具", "百", "或", "才", "积", "势", "举", "必", "型", "易", "视", "快", "李", "参", "回", "引", "镇", "首", "推", "思", "完", "消", "值", "该", "走", "装", "众", "责", "备", "州", "供", "包", "副", "极", "整", "确", "知", "贸", "己", "环", "话", "反", "身", "选", "亚", "么", "带", "采", "王", "策", "真", "女", "谈", "严", "斯", "况", "色", "打", "德", "告", "仅", "它", "气", "料", "神", "率", "识", "劳", "境", "源", "青", "护", "列", "兴", "许", "户", "马", "港", "则", "节", "款", "拉", "直", "案", "股", "光", "较", "河", "花", "根", "布", "线", "土", "克", "再", "群", "医", "清", "速", "律", "她", "族", "历", "非", "感", "占", "续", "师", "何", "影", "功", "负", "验", "望", "财", "类", "货", "约", "艺", "售", "连", "纪", "按", "讯", "史", "示", "象", "养", "获", "石", "食", "抓", "富", "模", "始", "住", "赛", "客", "越", "闻", "央", "席", "坚" }; - - private static readonly string[] _enTextArr = new string[] { "a", "b", "c", "d", "e", "f", "g", "h", "k", "m", "n", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; - - /// - /// 验证码图片宽高 - /// - private readonly int _imageWidth = 120; - - private readonly int _imageHeight = 50; - - /// - /// 泡泡数量 - /// - private int _circleCount = 14; - - /// - /// 泡泡半径范围 - /// - private readonly int _miniCircleR = 2; - - private readonly int _maxCircleR = 8; - - /// - /// 颜色池,较深的颜色 - /// https://tool.oschina.net/commons?type=3 - /// - private static readonly string[] _colorHexArr = new string[] { "#00E5EE", "#000000", "#2F4F4F", "#000000", "#43CD80", "#191970", "#006400", "#458B00", "#8B7765", "#CD5B45" }; - - ///较浅的颜色 - private static readonly string[] _lightColorHexArr = new string[] { "#FFFACD", "#FDF5E6", "#F0FFFF", "#BBFFFF", "#FAFAD2", "#FFE4E1", "#DCDCDC", "#F0E68C" }; - - private static readonly Random _random = new Random(); - - /// - /// 字体池 - /// - private static Font[] _fontArr; - - public SecurityCodeHelper() - { - initFonts(_imageHeight); - } - - /// - /// 生成随机中文字符串 - /// - /// - /// - public string GetRandomCnText(int length) - { - StringBuilder sb = new StringBuilder(); - if (length > 0) - { - do - { - sb.Append(_cnTextArr[_random.Next(0, _cnTextArr.Length)]); - } - while (--length > 0); - } - return sb.ToString(); - } - - /// - /// 生成随机英文字母/数字组合字符串 - /// - /// - /// - public string GetRandomEnDigitalText(int length) - { - StringBuilder sb = new StringBuilder(); - if (length > 0) - { - do - { - if (_random.Next(0, 2) > 0) - { - sb.Append(_random.Next(2, 10)); - } - else - { - sb.Append(_enTextArr[_random.Next(0, _enTextArr.Length)]); - } - } - while (--length > 0); - } - return sb.ToString(); - } - - /// - /// 英文字母+数字组合验证码 - /// - /// - /// 验证码图片字节数组 - public byte[] GetEnDigitalCodeByte(string text) - { - using (Image img = getEnDigitalCodeImage(text)) - { - return img.ToGifArray(); - } - } - - - - /// - /// 生成一个数组组合验证码素材(Image) - /// - /// - /// - private Image getEnDigitalCodeImage(string text) - { - Image img = new Image(_imageWidth, _imageHeight); - var colorTextHex = _colorHexArr[_random.Next(0, _colorHexArr.Length)]; - var lignthColorHex = _lightColorHexArr[_random.Next(0, _lightColorHexArr.Length)]; - - img.Mutate(ctx => ctx - .Fill(Rgba32.ParseHex(_lightColorHexArr[_random.Next(0, _lightColorHexArr.Length)])) - .Glow(Rgba32.ParseHex(lignthColorHex)) - //.DrawingGrid(_imageWidth, _imageHeight, Rgba32.ParseHex(lignthColorHex), 8, 1) - .DrawText(text, _fontArr[0], Rgba32.ParseHex(_colorHexArr[0]), new PointF(0, 0)) - //.DrawingEnText(, text, _colorHexArr, _fontArr) - .GaussianBlur(0.4f) - //.DrawingCircles(_imageWidth, _imageHeight, 15, _miniCircleR, _maxCircleR, Color.White) - ); - return img; - } - - /// - /// 初始化字体池 - /// - /// 一个初始大小 - private void initFonts(int fontSize) - { - if (_fontArr == null) - { - var assembly = Assembly.GetExecutingAssembly(); - var names = assembly.GetManifestResourceNames(); - - if (names?.Length > 0 == true) - { - var fontList = new List(); - var fontCollection = new FontCollection(); - - foreach (var name in names) - { - fontList.Add(new Font(fontCollection.Add(assembly.GetManifestResourceStream(name)), fontSize)); - } - - _fontArr = fontList.ToArray(); - } - else - { - throw new Exception($"绘制验证码字体文件加载失败"); - } - } - } - } -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/Candara.ttf b/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/Candara.ttf deleted file mode 100644 index dbc73697..00000000 Binary files a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/Candara.ttf and /dev/null differ diff --git a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/STCAIYUN.ttf b/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/STCAIYUN.ttf deleted file mode 100644 index f2c31b3a..00000000 Binary files a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/STCAIYUN.ttf and /dev/null differ diff --git a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/impact.ttf b/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/impact.ttf deleted file mode 100644 index 52701465..00000000 Binary files a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/impact.ttf and /dev/null differ diff --git a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/monbaiti.ttf b/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/monbaiti.ttf deleted file mode 100644 index 64f759ff..00000000 Binary files a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/HeiCaptcha/fonts/monbaiti.ttf and /dev/null differ diff --git a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/ImageSharpManager.cs b/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/ImageSharpManager.cs deleted file mode 100644 index db6eed49..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/ImageSharp/ImageSharpManager.cs +++ /dev/null @@ -1,65 +0,0 @@ -using Furion.DependencyInjection; -using SixLabors.ImageSharp.Formats.Jpeg; -using SixLabors.ImageSharp.Formats.Png; -using SixLabors.ImageSharp.Processing; - -namespace Yi.Framework.Module.ImageSharp; -public class ImageSharpManager:ISingleton -{ - public void ImageCompress(string fileName, Stream stream, string savePath) - { - var extensionName = Path.GetExtension(fileName).ToLower(); - if (extensionName == ".png") - { - PngImageCompress(stream, savePath); - } - else if (extensionName == ".jpg" || extensionName == ".jpeg") - { - JpgImageCompress(stream, savePath); - } - else - { - using (var fileStream = new FileStream(savePath, FileMode.Create, FileAccess.Write)) - { - stream.CopyTo(fileStream); - } - } - - } - - public void PngImageCompress(Stream stream, string savePath) - { - using (var image = Image.Load(stream)) - { - var encoder = new PngEncoder() - { - CompressionLevel = PngCompressionLevel.Level6, - - }; - if (image.Width > 300) - { - image.Mutate(a => a.Resize(image.Width / 2, image.Height / 2)); - } - - image.Save(savePath, encoder); - } - } - public void JpgImageCompress(Stream stream, string savePath) - { - using (var image = Image.Load(stream)) - { - var encoder = new JpegEncoder() - { - Quality = 30 - }; - if (image.Width > 300) - { - image.Mutate(a => a.Resize(image.Width / 2, image.Height / 2)); - } - - - image.Save(savePath, encoder); - } - } - -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/IOperationLogService.cs b/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/IOperationLogService.cs deleted file mode 100644 index da283aae..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/IOperationLogService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; - -namespace Yi.Framework.Module.OperLogManager -{ - /// - /// OperationLog服务抽象 - /// - public interface IOperationLogService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogService.cs b/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogService.cs deleted file mode 100644 index 2c152739..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/OperLogManager/OperationLogService.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; - -namespace Yi.Framework.Module.OperLogManager -{ - /// - /// OperationLog服务实现 - /// - //[AppService] - [ApiDescriptionSettings("OperLogManager")] - public class OperationLogService : CrudAppService, - IOperationLogService, IDynamicApiController, ITransient - { - public override async Task> GetListAsync(OperationLogGetListInputVo input) - { - RefAsync total = 0; - - var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.OperUser), x => x.OperUser.Contains(input.OperUser!)) - .WhereIF(input.OperType is not null, x => x.OperType == input.OperType) - .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) - .ToPageListAsync(input.PageNum, input.PageSize, total); - return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); - } - - [NonAction] - public override Task UpdateAsync(long id, OperationLogGetListOutputDto input) - { - return base.UpdateAsync(id, input); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/Sms/Aliyun/SmsAliyunManager.cs b/Yi.Furion.Net6/Yi.Framework.Module/Sms/Aliyun/SmsAliyunManager.cs deleted file mode 100644 index 8e2756cd..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/Sms/Aliyun/SmsAliyunManager.cs +++ /dev/null @@ -1,66 +0,0 @@ -using AlibabaCloud.SDK.Dysmsapi20170525; -using Furion.DependencyInjection; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; - -namespace Yi.Framework.Module.Sms.Aliyun -{ - public class SmsAliyunManager:ISingleton - { - public Client AliyunClient { get; set; } - private ILogger _logger; - private SmsAliyunOptions Options { get; set; } - public SmsAliyunManager(ILogger logger, IOptions options) - { - Options = options.Value; - if (Options.EnableFeature) - { - _logger = logger; - AliyunClient = CreateClient(Options.AccessKeyId, Options.AccessKeySecret); - } - - } - - private static Client CreateClient(string accessKeyId, string accessKeySecret) - { - AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config - { - // 必填,您的 AccessKey ID - AccessKeyId = accessKeyId, - // 必填,您的 AccessKey Secret - AccessKeySecret = accessKeySecret, - }; - // 访问的域名 - config.Endpoint = "dysmsapi.aliyuncs.com"; - return new Client(config); - } - - - /// - /// 发送短信 - /// - /// - /// - /// - public async Task Send(string phoneNumbers, string code) - { - try - { - AlibabaCloud.SDK.Dysmsapi20170525.Models.SendSmsRequest sendSmsRequest = new AlibabaCloud.SDK.Dysmsapi20170525.Models.SendSmsRequest - { - PhoneNumbers = phoneNumbers, - SignName = Options.SignName, - TemplateCode = Options.TemplateCode, - TemplateParam = System.Text.Json.JsonSerializer.Serialize(new { code }) - }; - - var response = await AliyunClient.SendSmsAsync(sendSmsRequest); - } - - catch (Exception _error) - { - _logger.LogError(_error, _error.Message); - } - } - } -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Framework.Module/Sms/Aliyun/SmsAliyunOptions.cs b/Yi.Furion.Net6/Yi.Framework.Module/Sms/Aliyun/SmsAliyunOptions.cs deleted file mode 100644 index 43395beb..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/Sms/Aliyun/SmsAliyunOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Yi.Framework.Module.Sms.Aliyun -{ - public class SmsAliyunOptions - { - public string AccessKeyId { get; set; } - public string AccessKeySecret { get; set; } - - public string SignName { get; set; } - - - public string TemplateCode { get; set; } - public bool EnableFeature { get; set; } = true; - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/Startup.cs b/Yi.Furion.Net6/Yi.Framework.Module/Startup.cs deleted file mode 100644 index e664a41d..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/Startup.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Furion; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using SqlSugar; -using Yi.Framework.Infrastructure.AspNetCore; -using Yi.Framework.Infrastructure.Sqlsugar; -using Yi.Framework.Module.Caching; -using Yi.Framework.Module.ImageSharp.HeiCaptcha; -using Yi.Framework.Module.Sms.Aliyun; -using Yi.Framework.Module.WeChat; - -namespace Yi.Framework.Module; - -public class Startup : AppStartup -{ - public void ConfigureServices(IServiceCollection services) - { - services.AddHeiCaptcha(); - - services.Configure(App.Configuration.GetSection("SmsAliyunOptions")); - - services.Configure(App.Configuration.GetSection("CachingConnOptions")); - - services.Configure(App.Configuration.GetSection("WeChatOptions")); - } - - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Abstract/IErrorObjct.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Abstract/IErrorObjct.cs deleted file mode 100644 index 74d5c5ac..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Abstract/IErrorObjct.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WeChat.Abstract -{ - public interface IErrorObjct: IHasErrcode, IHasErrmsg - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Abstract/IHasErrcode.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Abstract/IHasErrcode.cs deleted file mode 100644 index c0627a9e..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Abstract/IHasErrcode.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WeChat.Abstract -{ - public interface IHasErrcode - { - public int errcode { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Abstract/IHasErrmsg.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Abstract/IHasErrmsg.cs deleted file mode 100644 index 405bd0ad..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Abstract/IHasErrmsg.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WeChat.Abstract -{ - public interface IHasErrmsg - { - string errmsg { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Enums/PayTradeStateEnum.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Enums/PayTradeStateEnum.cs deleted file mode 100644 index 9fa665d4..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Enums/PayTradeStateEnum.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WeChat.Enums -{ - public enum PayTradeStateEnum - { - SUCCESS,//:支付成功 - REFUND,//:转入退款 - NOTPAY,//:未支付 - CLOSED,//:已关闭 - REVOKED,//:已撤销(付款码支付) - USERPAYING,//:用户支付中(付款码支付) - PAYERROR,//:支付失败(其他原因,如银行返回失败) - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/IWeChatManager.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/IWeChatManager.cs deleted file mode 100644 index efd23ce1..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/IWeChatManager.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Module.WeChat.Model; - -namespace Yi.Framework.Module.WeChat -{ - public interface IWeChatManager - { - /// - /// 获取用户openid - /// - /// - /// - Task Code2SessionAsync(Code2SessionInput input); - - /// - /// 获取不限制的小程序码 - /// - /// - /// - Task GetQRCodeAsync(string scene, string page, EnvVersionEnum unlimitedQRCodeEnum = EnvVersionEnum.release); - - /// - /// 支付预支付id - /// - /// - /// - Task JsApiAsync(JsApiInput input); - - /// - /// 支付的回调接口 - /// - /// - /// - PayNoticeResult PayNotice(PayNoticeReponse reponse); - - /// - /// 发送聚合消息 - /// - /// - /// - Task SendUniformMessageAsync(UniformMessageInput input); - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/AccessTokenHttpModel.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/AccessTokenHttpModel.cs deleted file mode 100644 index 4b8ecb57..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/AccessTokenHttpModel.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WeChat.Model -{ - public class AccessTokenResponse - { - public string access_token { get; set; } - - public int expires_in { get; set; } - } - - public class AccessTokenRequest - { - public string grant_type { get; set; } - public string appid { get; set; } - public string secret { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/Code2SessionHttpModel.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/Code2SessionHttpModel.cs deleted file mode 100644 index 9e07cdae..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/Code2SessionHttpModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Module.WeChat.Abstract; - -namespace Yi.Framework.Module.WeChat.Model -{ - public class Code2SessionResponse: IErrorObjct - { - public string openid { get; set; } - public string session_key { get; set; } - public string unionid { get; set; } - public int errcode { get; set; } - public string errmsg { get; set; } - } - - public class Code2SessionRequest - { - public string appid { get; set; } - public string secret { get; set; } - public string js_code { get; set; } - public string grant_type => "authorization_code"; - } - - public class Code2SessionInput - { - public Code2SessionInput(string js_code) - { - - this.js_code=js_code; - } - public string js_code { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/JsApiHttpModel.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/JsApiHttpModel.cs deleted file mode 100644 index 3a51d95c..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/JsApiHttpModel.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WeChat.Model -{ - public class JsApiInput { - - /// - /// 商品描述 - /// - public string description { get; set; } - - /// - /// 商户订单号 - /// - public string out_trade_no { get; set; } - - - /// - /// 订单金额 - /// - public AmountItemRequest amount { get; set; } - - - /// - /// 支付者 - /// - public PayerItemRequest payer { get; set; } - } - - public class JsApiRequest - { - /// - /// 应用id - /// - public string appid { get; set; } - - /// - /// 商户id - /// - public string mchid { get; set; } - - - /// - /// 商品描述 - /// - public string description { get; set; } - - /// - /// 商户订单号 - /// - public string out_trade_no { get; set; } - - - /// - /// 回调通知地址 - /// - public string notify_url { get; set; } - - - /// - /// 订单金额 - /// - public AmountItemRequest amount { get; set; } - - - /// - /// 支付者 - /// - public PayerItemRequest payer { get; set; } - } - - public class AmountItemRequest - { - /// - /// 总金额 - /// - public int total { get; set; } - } - - - public class PayerItemRequest - { - public string openid { get; set; } - } - - - public class JsApiResponse - { - /// - /// 预支付id - /// - public string prepay_id { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/PayNoticeHttpModel.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/PayNoticeHttpModel.cs deleted file mode 100644 index 5b2222e7..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/PayNoticeHttpModel.cs +++ /dev/null @@ -1,288 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion; - -namespace Yi.Framework.Module.WeChat.Model -{ - /// - /// 接收的结果 - /// - public class PayNoticeReponse - { - - /// - /// 通知的唯一ID - /// - public string id { get; set; } - - /// - /// 通知的资源数据类型,支付成功通知为encrypt-resource - /// - public string create_time { get; set; } - - /// - /// 通知的资源数据类型,支付成功通知为encrypt-resource - /// - public string event_type { get; set; } - - /// - /// 通知的资源数据类型,支付成功通知为encrypt-resource - /// - public string resource_type { get; set; } - - /// - /// 回调摘要 - /// - public string summary { get; set; } - - /// - /// 数据 - /// - public Resource resource { get; set; } - } - - /// - /// 通知的数据 - /// - public class Resource - { - /// - /// 加密算法类型:AEAD_AES_256_GCM - /// - public string algorithm { get; set; } - - /// - /// 数据密文 - /// - public string ciphertext { get; set; } - - /// - /// 附加数据 - /// - public string associated_data { get; set; } - - /// - /// 原始回调类型,为transaction - /// - public string original_type { get; set; } - - /// - /// 随机串 - /// - public string nonce { get; set; } - } - - - - /// - /// 解密出来的结果 - /// - public class PayNoticeResult - { - /// - /// 微信支付系统生成的订单号。 - /// - public string transaction_id { get; set; } - - /// - /// 订单金额信息 - /// - public Amount amount { get; set; } - - /// - /// 商户号 - /// - public string mchid { get; set; } - - /// - /* - 交易状态,枚举值: - SUCCESS:支付成功 - REFUND:转入退款 - NOTPAY:未支付 - CLOSED:已关闭 - REVOKED:已撤销(付款码支付) - USERPAYING:用户支付中(付款码支付) - PAYERROR:支付失败(其他原因,如银行返回失败) - */ - /// - public string trade_state { get; set; } - - /// - /// 银行类型,采用字符串类型的银行标识。 - /// - public string bank_type { get; set; } - - /// - /// 优惠功能,享受优惠时返回该字段 - /// - public List promotion_detail { get; set; } - - /// - /// 支付完成时间 - /// - public string success_time { get; set; } - - /// - /// 支付者信息 - /// - public Payer payer { get; set; } - - /// - /// 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一。 - /// 特殊规则:最小字符长度为6 - /// - public string out_trade_no { get; set; } - - /// - /// 应用ID - /// - public string appid { get; set; } - - /// - /// 交易状态描述 - /// - public string trade_state_desc { get; set; } - - /// - /* 交易类型,枚举值: - JSAPI:公众号支付 - NATIVE:扫码支付 - APP:APP支付 - MICROPAY:付款码支付 - MWEB:H5支付 - FACEPAY:刷脸支付 - */ - /// - public string trade_type { get; set; } - - /// - /* - * 银行类型,采用字符串类型的银行标识。 - */ - /// - public string attach { get; set; } - - - /// - /// 支付场景信息描述 - /// - public SceneInfo scene_info { get; set; } - - } - public class Amount - { - /// - /// 用户支付金额,单位为分。 - /// - public int payer_total { get; set; } - /// - /// 订单总金额,单位为分。 - /// - public int total { get; set; } - - /// - /// CNY:人民币,境内商户号仅支持人民币。 - /// - public string currency { get; set; } - - /// - /// 用户支付币种 - /// - public string payer_currency { get; set; } - } - - public class GoodsDetail - { - /// - /// 商品备注 - /// - public string goods_remark { get; set; } - - /// - /// 商品编码 - /// - public int quantity { get; set; } - - /// - /// 商品优惠金额 - /// - public int discount_amount { get; set; } - - /// - /// 商品编码 - /// - public string goods_id { get; set; } - - /// - /// 商品单价 - /// - public int unit_price { get; set; } - } - - public class PromotionDetail - { - /// - /// 单品列表 - /// - public int amount { get; set; } - - /// - /// 微信出资 - /// - public int wechatpay_contribute { get; set; } - - /// - /// 券ID - /// - public string coupon_id { get; set; } - public string scope { get; set; } - public int merchant_contribute { get; set; } - - /// - /// 优惠名称 - /// - public string name { get; set; } - - /// - /// 其他出资 - /// - public int other_contribute { get; set; } - - /// - /// currency - /// - public string currency { get; set; } - - /// - /// 活动ID - /// - public string stock_id { get; set; } - - /// - /// 单品列表 - /// - public List goods_detail { get; set; } - } - - public class Payer - { - /// - /// 用户标识 - /// - public string openid { get; set; } - } - - public class SceneInfo - { - /// - /// 商户端设备号 - /// - public string device_id { get; set; } - } - - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/UniformMessageHttpModel.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/UniformMessageHttpModel.cs deleted file mode 100644 index 3f942c20..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/UniformMessageHttpModel.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Module.WeChat.Abstract; - -namespace Yi.Framework.Module.WeChat.Model -{ - public class UniformMessageRequest - { - /// - ///用户openid,可以是小程序的openid,也可以是mp_template_msg.appid对应的公众号的openid - /// - public string touser { get; set; } - - - /// - /// 小程序消息模板 - /// - public WeappTemplateMsg weapp_template_msg { get; set; } = new WeappTemplateMsg(); - - /// - /// 公众号模板 - /// - public MpTemplateMsg mp_template_msg { get; set; } = new MpTemplateMsg(); - } - - - public class UniformMessageInput - { - - /// - ///用户openid,可以是小程序的openid,也可以是mp_template_msg.appid对应的公众号的openid - /// - public string touser { get; set; } - - - /// - /// 小程序消息模板 - /// - public WeappTemplateMsg? weapp_template_msg { get; set; } - - /// - /// 公众号模板 - /// - public MpTemplateMsg? mp_template_msg { get; set; } - } - - public class UniformMessageResponse : IErrorObjct - { - public int errcode { get; set; } - public string errmsg { get; set; } - } - - /// - /// 小程序消息 - /// - public class WeappTemplateMsg - { - - /// - /// 模板id - /// - public string template_id { get; set; } - - /// - /// 小程序页面 - /// - public string page { get; set; } - - /// - /// 小程序模板消息formid - /// - public string form_id { get; set; } - - /// - /// 小程序模板放大关键词 - /// - public string emphasis_keyword { get; set; } - - /// - /// 模板数据 - /// - public string data { get; set; } - } - - - /// - /// 公众号消息通知 - /// - public class MpTemplateMsg - { - /// - /// 公众号appid,要求与小程序有绑定且同主体 - /// - public string appid { get; set; } - - /// - /// 公众号模板id - /// - public string template_id { get; set; } - - - /// - ///公众号模板消息所要跳转的url - /// - public string url { get; set; } - - /// - /// 公众号模板消息所要跳转的小程序,小程序的必须与公众号具有绑定关系 - /// - public Miniprogram miniprogram { get; set; } - - /// - /// 公众号模板消息的数据 - /// - public Dictionary data { get; set; } - - - } - - /// - /// 小程序跳转 - /// - public class Miniprogram - { - - public string appid { get; set; } - public string pagepath { get; set; } - } - - - - public class keyValueItem - { - public string value { get; set; } - public string color { get; set; } - - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/UnlimitedQRCodeHttpModel.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/UnlimitedQRCodeHttpModel.cs deleted file mode 100644 index 4d68cd77..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Model/UnlimitedQRCodeHttpModel.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WeChat.Model -{ - public class UnlimitedQRCodeReponse - { - - } - - public class UnlimitedQRCodeRequest - { - public UnlimitedQRCodeRequest(EnvVersionEnum unlimitedQRCodeEnum) { - env_version = unlimitedQRCodeEnum.ToString(); - } - - public bool check_path { get; set; } = false; - public string page { get; set; } - - public string scene { get; set; } - public string env_version { get; set; } - } - - public enum EnvVersionEnum - { - /// - /// 正式版本 - /// - [Description("正式版本")] - release, - - /// - /// 体验版本 - /// - [Description("体验版本")] - trial, - - /// - /// 开发版本 - /// - [Description("开发版本")] - develop - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Token/DefaultWeChatToken.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Token/DefaultWeChatToken.cs deleted file mode 100644 index acc77674..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Token/DefaultWeChatToken.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http.Json; -using System.Text; -using System.Threading.Tasks; -using Furion.DependencyInjection; -using Microsoft.Extensions.Options; -using Yi.Framework.Module.WeChat; -using Yi.Framework.Module.WeChat.Extensions; -using Yi.Framework.Module.WeChat.Model; -using Yi.Framework.Module.WeChat.Token; - -namespace Zeng.CarMovingAssistant.Application.CarMoving.Services.Impl -{ - public class DefaultWeChatToken : IWeChatToken,ITransient - { - private WeChatOptions _options; - public DefaultWeChatToken(IOptions options) - { - _options = options.Value; - } - public async Task GetTokenAsync() - { - var token = await this.GetAccessToken(); - return token.access_token; - } - - /// - /// 获取微信AccessToken - /// - public async Task GetAccessToken() - { - string url = "https://api.weixin.qq.com/cgi-bin/token"; - var req = new AccessTokenRequest(); - req.appid = _options.AppId; - req.secret = _options.AppSecret; - req.grant_type = "client_credential"; - using (HttpClient httpClient = new HttpClient()) - { - string queryString = req.ToQueryString(); - var builder = new UriBuilder(url); - builder.Query = queryString; - HttpResponseMessage response = await httpClient.GetAsync(builder.ToString()); - - response.EnsureSuccessStatusCode(); - - var responseBody = await response.Content.ReadFromJsonAsync(); - return responseBody; - } - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Token/IWeChatToken.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Token/IWeChatToken.cs deleted file mode 100644 index 8760dc49..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Token/IWeChatToken.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WeChat.Token -{ - public interface IWeChatToken - { - public Task GetTokenAsync(); - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Token/RedisWeChatToken.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Token/RedisWeChatToken.cs deleted file mode 100644 index a91810ef..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/Token/RedisWeChatToken.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http.Json; -using System.Text; -using System.Threading.Tasks; -using Furion.DependencyInjection; -using Microsoft.Extensions.Options; -using Yi.Framework.Module.Caching; -using Yi.Framework.Module.WeChat.Extensions; -using Yi.Framework.Module.WeChat.Model; - -namespace Yi.Framework.Module.WeChat.Token -{ - public class RedisWeChatToken : IWeChatToken - { - private WeChatOptions _options; - private RedisCacheClient _cacheManager; - private const string RedisAccessTokenKey = $"WeChat:AccessTokenKey"; - - public RedisWeChatToken(IOptions options, RedisCacheClient cacheManager) - { - _options = options.Value; - _cacheManager = cacheManager; - } - public async Task GetTokenAsync() - { - string accessToken; - - if (_cacheManager.Client.Exists(RedisAccessTokenKey)) - { - accessToken = _cacheManager.Client.Get(RedisAccessTokenKey); - } - else - { - var response = await this.GetAccessToken(); - accessToken = response.access_token; - _cacheManager.Client.Set(RedisAccessTokenKey, accessToken, TimeSpan.FromHours(1)); - } - - return accessToken; - } - - /// - /// 获取微信AccessToken - /// - public async Task GetAccessToken() - { - string url = "https://api.weixin.qq.com/cgi-bin/token"; - var req = new AccessTokenRequest(); - req.appid = _options.AppId; - req.secret = _options.AppSecret; - req.grant_type = "client_credential"; - using (HttpClient httpClient = new HttpClient()) - { - string queryString = req.ToQueryString(); - var builder = new UriBuilder(url); - builder.Query = queryString; - HttpResponseMessage response = await httpClient.GetAsync(builder.ToString()); - - response.EnsureSuccessStatusCode(); - - var responseBody = await response.Content.ReadFromJsonAsync(); - if (string.IsNullOrEmpty(responseBody?.access_token)) - { - throw new WeChatException($"获取accessToken异常,返回结果【{await response.Content.ReadAsStringAsync()}】"); - } - return responseBody; - } - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatException.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatException.cs deleted file mode 100644 index 44e62228..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatException.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WeChat -{ - public class WeChatException : Exception - { - public override string Message - { - get - { - // 加上前缀 - return "微信Api异常: " + base.Message; - } - } - - public WeChatException() - { - } - - public WeChatException(string message) - : base(message) - { - } - - public WeChatException(string message, Exception innerException) - : base(message, innerException) - { - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatExtensions.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatExtensions.cs deleted file mode 100644 index 9112284d..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatExtensions.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Web; -using Furion; -using Microsoft.Extensions.DependencyInjection; -using Yi.Framework.Module.WeChat.Abstract; - -namespace Yi.Framework.Module.WeChat.Extensions -{ - public static class WeChatExtensions - { - public static string ToQueryString(this object model) - { - var properties = model.GetType().GetProperties(); - var query = HttpUtility.ParseQueryString(string.Empty); - - foreach (var property in properties) - { - var value = property.GetValue(model); - if (value != null) - { - query[property.Name] = value.ToString(); - } - } - - return "?" + query.ToString(); - } - - /// - /// 效验请求是否成功 - /// - /// - /// - public static void ValidateSuccess(this IErrorObjct response) - { - - if (response.errcode != 0) - { - throw new WeChatException(response.errmsg); - } - } - - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatManager.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatManager.cs deleted file mode 100644 index e8d23844..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatManager.cs +++ /dev/null @@ -1,200 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Net.Http.Json; -using System.Security.Cryptography; -using System.Security.Policy; -using System.Text; -using System.Threading.Tasks; -using Furion.DependencyInjection; -using Furion.JsonSerialization; -using Mapster; -using Microsoft.AspNetCore.DataProtection.KeyManagement; -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using Org.BouncyCastle.Crypto.Engines; -using Org.BouncyCastle.Crypto.Modes; -using Org.BouncyCastle.Crypto.Parameters; -using Yi.Framework.Module.WeChat.Extensions; -using Yi.Framework.Module.WeChat.Model; -using Yi.Framework.Module.WeChat.Token; - -namespace Yi.Framework.Module.WeChat -{ - public class WeChatManager : IWeChatManager, ISingleton - { - private WeChatOptions _options; - private IWeChatToken _weChatToken; - public WeChatManager(IOptions options, IWeChatToken weChatToken) - { - _options = options.Value; - _weChatToken = weChatToken; - } - - /// - /// 获取用户openid - /// - /// - /// - public async Task Code2SessionAsync(Code2SessionInput input) - { - string url = "https://api.weixin.qq.com/sns/jscode2session"; - var req = new Code2SessionRequest(); - req.js_code = input.js_code; - req.secret = _options.AppSecret; - req.appid = _options.AppId; - - using (HttpClient httpClient = new HttpClient()) - { - string queryString = req.ToQueryString(); - var builder = new UriBuilder(url); - builder.Query = queryString; - HttpResponseMessage response = await httpClient.GetAsync(builder.ToString()); - var responseBody = await response.Content.ReadFromJsonAsync(); - - responseBody.ValidateSuccess(); - - return responseBody; - } - } - - /// - /// 支付预支付id,描述必填 - /// - /// - /// - public async Task JsApiAsync(JsApiInput input) - { - string url = "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi"; - - var req = input.Adapt(); - req.mchid = _options.Mchid; - req.notify_url = _options.NotifyUrl; - req.appid = _options.AppId; - - using (HttpClient httpClient = new HttpClient(new WeChatPayHttpHandler(_options.Mchid, _options.MerchantSerialNo))) - {// 设置Accept头 - httpClient.DefaultRequestHeaders.Add("Accept", "application/json"); - // 设置User-Agent头 - httpClient.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"); - JsonContent jsonContent = JsonContent.Create(req); - HttpResponseMessage response = await httpClient.PostAsync(url, jsonContent); - var data = await response.Content.ReadAsStringAsync(); - response.EnsureSuccessStatusCode(); - var responseBody = await response.Content.ReadFromJsonAsync(); - return responseBody; - } - } - - /// - /// 支付通知回调 - /// - /// - public PayNoticeResult PayNotice(PayNoticeReponse reponse) - { - var data = reponse.resource; - var result = AEAD_AES_256_GCM(data.associated_data, data.nonce, data.ciphertext, _options.PaySecretKey); - var output = JSON.Deserialize(result); - return output; - } - - - /// - /// 获取不限制的小程序码 - /// - /// - /// - public async Task GetQRCodeAsync(string scene, string page, EnvVersionEnum unlimitedQRCodeEnum = EnvVersionEnum.release) - { - string url = $"https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={await _weChatToken.GetTokenAsync()}"; - var req = new UnlimitedQRCodeRequest(unlimitedQRCodeEnum); - req.scene = scene; - req.page = page; - req.env_version = unlimitedQRCodeEnum.ToString(); - using (HttpClient httpClient = new HttpClient()) - { - StringContent message = new StringContent(System.Text.Json.JsonSerializer.Serialize(req)); - - HttpResponseMessage response = await httpClient.PostAsync(url, message); - - response.EnsureSuccessStatusCode(); - - var stream = await response.Content.ReadAsStreamAsync(); - var result = ConvertStreamToBase64(stream); - return result; - } - } - - /// - /// 小程序推送订阅消息 - /// - /// - public async Task SendUniformMessageAsync(UniformMessageInput input) - { - string url = $"https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token={await _weChatToken.GetTokenAsync()}"; - var req = input.Adapt(); - req.mp_template_msg.template_id = _options.OfficialAccounts.TemplateId; - req.mp_template_msg.appid = _options.OfficialAccounts.AppId; - req.mp_template_msg.miniprogram.appid = _options.AppId; - - using (HttpClient httpClient = new HttpClient()) - { - var body =new StringContent(JSON.Serialize(req)); - HttpResponseMessage response = await httpClient.PostAsync(url, body); - var responseBody = await response.Content.ReadFromJsonAsync(); - - responseBody.ValidateSuccess(); - } - - } - - - /// - /// AEAD_AES_256_GCM解密算法,用于解开支付回调的通知 - /// - /// 需要base64 - /// 需要base64 - /// 需要base64 - /// - public static string AEAD_AES_256_GCM(string associatedData, string nonce, string ciphertext, string secretKey) - { - try - { - GcmBlockCipher gcmBlockCipher = new GcmBlockCipher(new AesEngine()); - AeadParameters aeadParameters = new AeadParameters( - new KeyParameter(Encoding.UTF8.GetBytes(secretKey)), - 128, - Encoding.UTF8.GetBytes(nonce), - Encoding.UTF8.GetBytes(associatedData)); - gcmBlockCipher.Init(false, aeadParameters); - - byte[] data = Convert.FromBase64String(ciphertext); - byte[] plaintext = new byte[gcmBlockCipher.GetOutputSize(data.Length)]; - int length = gcmBlockCipher.ProcessBytes(data, 0, data.Length, plaintext, 0); - gcmBlockCipher.DoFinal(plaintext, length); - return Encoding.UTF8.GetString(plaintext); - } - catch (Exception ex) - { - throw new WeChatException("支付回调解密错误", ex); - } - } - - private string ConvertStreamToBase64(Stream stream) - { - // 将Stream对象转换为字节数组 - byte[] buffer = new byte[stream.Length]; - stream.Read(buffer, 0, (int)stream.Length); - - // 将字节数组转换为Base64字符串 - string base64String = Convert.ToBase64String(buffer); - - return base64String; - } - - - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatOptions.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatOptions.cs deleted file mode 100644 index 462f1bb7..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatOptions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WeChat -{ - public class WeChatOptions - { - public string AppId { get; set; } - public string AppSecret { get; set; } - - public string PaySecretKey { get; set; } - - public string Mchid { get; set; } - - public string NotifyUrl { get; set; } - - public string MerchantSerialNo { get; set; } - - /// - /// 公众号 - /// - public OfficialAccountsOptions OfficialAccounts { get; set; } - } - - public class OfficialAccountsOptions { - public string AppId { get; set; } - public string TemplateId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatPayHttpHandler.cs b/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatPayHttpHandler.cs deleted file mode 100644 index cd05d958..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WeChat/WeChatPayHttpHandler.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Org.BouncyCastle.Asn1.Ocsp; - -namespace Yi.Framework.Module.WeChat -{ - public class WeChatPayHttpHandler : DelegatingHandler - { - private readonly string merchantId; - private readonly string serialNo; - - public WeChatPayHttpHandler(string merchantId, string merchantSerialNo) - { - InnerHandler = new HttpClientHandler(); - - this.merchantId = merchantId; - this.serialNo = merchantSerialNo; - } - - protected async override Task SendAsync( - HttpRequestMessage request, - CancellationToken cancellationToken) - { - var auth = await BuildAuthAsync(request); - string value = $"WECHATPAY2-SHA256-RSA2048 {auth}"; - request.Headers.Add("Authorization", value); - - return await base.SendAsync(request, cancellationToken); - } - - protected async Task BuildAuthAsync(HttpRequestMessage request) - { - string method = request.Method.ToString(); - string body = ""; - if (method == "POST" || method == "PUT" || method == "PATCH") - { - var content = request.Content; - body = await content.ReadAsStringAsync(); - } - - string uri = request.RequestUri.PathAndQuery; - var timestamp = DateTimeOffset.Now.ToUnixTimeSeconds(); - string nonce = Path.GetRandomFileName(); - - string message = $"{method}\n{uri}\n{timestamp}\n{nonce}\n{body}\n"; - string signature = Sign(message); - return $"mchid=\"{merchantId}\",nonce_str=\"{nonce}\",timestamp=\"{timestamp}\",serial_no=\"{serialNo}\",signature=\"{signature}\""; - } - - protected string Sign(string message) - { - // NOTE: 私钥不包括私钥文件起始的-----BEGIN PRIVATE KEY----- - // 亦不包括结尾的-----END PRIVATE KEY----- - string privateKey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC/7sZqymy7XbgW\r\noZWzgS7Ok4LqPDT05kVrnqSTOeckWNSz8x2o/VHB7UXvQIqOyroNPgOkqXB6Bq59\r\nSWF422uCcwWItZMxdELQChEU9bnd3ia7U4i8gwMGFJOGn2J75CCLa6+IhDwFoC3G\r\nvm7aWH11PSuJd8jLYS4azNsKwJwfAFHbCKqhlHir2qCnFZXabSGnm6obmIUMjCxy\r\ncfnhrPXY8eg/QomyI12wlyO+ZpjWogibI0rleu/zey7z+XhGMcl8qBHjtguN3Sgv\r\nGMGLnm8osjGhY/da1V/IXTsw6/CyG5IP3e0Unwzo9PJwx5nq/zmvQC+uRr1AgcBZ\r\nilKkPwsNAgMBAAECggEAEMltiUGTKQAVbcVMNpsB4Qd918bUSucpAzSo6EeUM9Wh\r\nJOwKmBEv6Wo7R6W5eKu6ghX+c5RuRf33nPWiFNP8Hzi4LzDSYuzsOw3mWJL1YrZf\r\nZNr1hqdeyFVcYdXm4zccsZUFkUcfiM5tsohNYcODlZF4EVnssf0Z7zYjolkeToet\r\nzgU6mQvzQ6zbGeYVOn0A+/+LiCJeZRW+bifQpK4m8JqSD9CSS44VJkWe63r8176o\r\nYXmc5QjxVyUrnJPGgqDZFgc93BGVycJzEDG43QUaCCPdXgXru3Ywsz7pzgVaJHEs\r\nMD4dy9GpZnSKKqD7aAq9G/5/LXCJz5erWd+f20Kn8QKBgQDpLKqtrNxFwIjE8U1+\r\ndQwGlmL3/EjqXNCeQScB6dSAEn8ueWd7JrOyjst2rIx0AD07764K5Uc8xrRBDQg5\r\nYnug5bmGlefIp5CkCtB01Th0wMfgAOTVEtXaaq+6uBfPcSBBEDghTPD5c6oZvPj7\r\nA6ig39fcoUKr9V84VISsYewOAwKBgQDSuJfXhGp5UpJnd49SJSVIZg4FNQVaZfIQ\r\nbhxlRwokAsNaziJryta3Q51afGswr0rj40kEwCogJSlrO9OhktBA74aTuyl3c2s0\r\n4iXzzYjbRBnzN6nAgAHWDMStznAUqyDNzyGvd6uy++erisGq08Ugo0yr10GOKU39\r\nUj4z+a59rwKBgQCiWc5Q9J2+F0tjTNv3I4oHACjSn58pRwyeU6DUTTn/HmHdOvyZ\r\nG55cwd3auFNm5U+9bqmQvok2QOf6rxc91Vtc8PaXRcLHzBwCi+EOp/MSH7RLPHQY\r\nA3BRDp1idZFmh0683o0maosSNL2IBDKbm7WKpbCH1uQ0FLmC4B4sZFXWfwKBgCDx\r\npxuUoijRlf4DHS8Ui52kBvEddvbJFW0oKdxTnOxAWlZp/8umbKc+NO2eogt8fFLg\r\nh9vsRym7ZZxUQCP0lgZw7DNQgY0hSFN+P7y8F3dgUEZMH4fu+1qBqIYbzj4M+xXy\r\nGiwao4daBsA0805HyXvuy9/ZyW/2WTEPmJX7pSIVAoGBAJpZSxjgVnKPDNPNOh0H\r\ndns7IcT8iaFUaoYu/1edWCxW9RWQ9Ml66qFETl7NpMMmilNVmOBUW5hseQ38IgbZ\r\nyt+4DRm9knYCHZCDI46pNugLigQwAkDWsKTxvbK/HwmfQY91cX3tnH2VhPIVsIwf\r\nv5mx7h9s2iAX0f1ThUw3jVfN"; - byte[] keyData = Convert.FromBase64String(privateKey); - - var rsa = RSA.Create(); - //适用该方法的版本https://learn.microsoft.com/zh-cn/dotnet/api/system.security.cryptography.asymmetricalgorithm.importpkcs8privatekey?view=net-7.0 - rsa.ImportPkcs8PrivateKey(keyData, out _); - rsa.ImportPkcs8PrivateKey(keyData, out _); - byte[] data = System.Text.Encoding.UTF8.GetBytes(message); - return Convert.ToBase64String(rsa.SignData(data, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1)); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/DataSeed/FieldDataSeed.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/DataSeed/FieldDataSeed.cs deleted file mode 100644 index 0e05e1c9..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/DataSeed/FieldDataSeed.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion; -using Furion.DependencyInjection; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Module.WebFirstManager.Entities; -using Yi.Framework.Module.WebFirstManager.Enums; - -namespace Yi.Framework.Module.WebFirstManager.DataSeed -{ - public class FieldDataSeed : AbstractDataSeed, ITransient - { - private TableAggregateRoot _tableEntity; - public FieldDataSeed(IRepository repository) : base(repository) - { - } - - public override async Task IsInvoker() - { - var tableRepository = App.GetRequiredService>(); - _tableEntity = await tableRepository.GetFirstAsync(x => x.Name == "Test"); - if (_tableEntity is null) - { - return false; - } - return await base.IsInvoker(); - } - - public override List GetSeedData() - { - - - var entities = new List(); - entities.Add(new FieldEntity - { - FieldType = FieldTypeEnum.String, - Description = "测试字段", - Name = "DDD", - Length = 100, - TableId = _tableEntity.Id - - }); - return entities; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/DataSeed/TableDataSeed.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/DataSeed/TableDataSeed.cs deleted file mode 100644 index ac10a53f..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/DataSeed/TableDataSeed.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion.DependencyInjection; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; -using Yi.Framework.Module.WebFirstManager.Entities; - -namespace Yi.Framework.Module.WebFirstManager.DataSeed -{ - public class TableDataSeed : AbstractDataSeed, ITransient - { - public TableDataSeed(IRepository repository) : base(repository) - { - } - - public override List GetSeedData() - { - var entities=new List(); - - entities.Add(new TableAggregateRoot - { - Id=SnowflakeHelper.NextId, - Name="Test", - Description="测试", - }); - return entities; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/DataSeed/TemplateDataSeed.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/DataSeed/TemplateDataSeed.cs deleted file mode 100644 index 9b9b4231..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/DataSeed/TemplateDataSeed.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Furion.DependencyInjection; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Module.WebFirstManager.Entities; - -namespace Yi.Framework.Module.WebFirstManager.DataSeed -{ - public class TemplateDataSeed : AbstractDataSeed, ITransient - { - public TemplateDataSeed(IRepository repository) : base(repository) - { - } - - public override List GetSeedData() - { - var entities = new List(); - - - return entities; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Domain/CodeFileManager.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Domain/CodeFileManager.cs deleted file mode 100644 index 96a8e277..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Domain/CodeFileManager.cs +++ /dev/null @@ -1,53 +0,0 @@ -using Furion.DependencyInjection; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Module.WebFirstManager.Entities; -using Yi.Framework.Module.WebFirstManager.Handler; - -namespace Yi.Framework.Module.WebFirstManager.Domain -{ - /// - /// 代码文件领域服务,与代码文件生成相关,web to code - /// - public class CodeFileManager : ITransient - { - private IEnumerable _templateHandlers; - private IRepository _repository; - private IRepository _fieldRepository; - public CodeFileManager(IEnumerable templateHandlers, IRepository fieldRepository, IRepository repository) - { - _templateHandlers = templateHandlers; - _repository = repository; - _fieldRepository = fieldRepository; - } - public async Task BuildWebToCodeAsync(TableAggregateRoot tableEntity) - { - var templates = await _repository.GetListAsync(); - foreach (var template in templates) - { - var handledTempalte = new HandledTemplate(); - handledTempalte.TemplateStr= template.TemplateStr; - handledTempalte.BuildPath = template.BuildPath; - foreach (var templateHandler in _templateHandlers) - { - templateHandler.SetTable(tableEntity); - handledTempalte = templateHandler.Invoker(handledTempalte.TemplateStr, handledTempalte.BuildPath); - } - await BuildToFileAsync(handledTempalte); - - } - } - - - private async Task BuildToFileAsync(HandledTemplate handledTemplate) - { - if (!Directory.Exists(Path.GetDirectoryName(handledTemplate.BuildPath))) - { - Directory.CreateDirectory(Path.GetDirectoryName(handledTemplate.BuildPath)); - } - await File.WriteAllTextAsync(handledTemplate.BuildPath,handledTemplate.TemplateStr); - } - - - } - -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Domain/DataBaseManger.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Domain/DataBaseManger.cs deleted file mode 100644 index 801f055e..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Domain/DataBaseManger.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion.DependencyInjection; - -namespace Yi.Framework.Module.WebFirstManager.Domain -{ - /// - /// 数据库领域服务,与数据库相关,同步到数据库,web to db ,code to db - /// - public class DataBaseManger : ITransient - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Domain/WebTemplateManager.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Domain/WebTemplateManager.cs deleted file mode 100644 index 96578ebe..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Domain/WebTemplateManager.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.DirectoryServices.ActiveDirectory; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using Furion; -using Furion.DatabaseAccessor; -using Furion.DependencyInjection; -using Mapster.Utils; -using Microsoft.AspNetCore.Components.Authorization; -using Microsoft.Extensions.Logging; -using Newtonsoft.Json.Linq; -using Org.BouncyCastle.Asn1.Ntt; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; -using Yi.Framework.Module.WebFirstManager.Entities; -using Yi.Framework.Module.WebFirstManager.Enums; -using DescriptionAttribute = System.ComponentModel.DescriptionAttribute; - -namespace Yi.Framework.Module.WebFirstManager.Domain -{ - /// - /// 与webfrist相关,同步到web,code to web - /// - public class WebTemplateManager : ITransient - { - private IRepository _repository; - public WebTemplateManager(IRepository repository) - { - _repository = repository; - } - /// - /// 通过当前的实体代码获取表存储 - /// - /// - - public Task> BuildCodeToWebAsync() - { - var entityTypes = new List(); - foreach (var assembly in App.Assemblies) - { - foreach (var t in assembly.GetTypes()) - { - if (t.GetCustomAttributes(false).Any(a => a.GetType().Equals(typeof(SugarTable)) - && !t.GetCustomAttributes(false).Any(a => a.GetType().Equals(typeof(SplitTableAttribute))))) - { - entityTypes.Add(t); - } - } - } - - var tableAggregateRoots = new List(); - foreach (var entityType in entityTypes) - { - tableAggregateRoots.Add(EntityTypeMapperToTable(entityType)); - } - - return Task.FromResult(tableAggregateRoots); - } - - private TableAggregateRoot EntityTypeMapperToTable(Type entityType) - { - var tableAggregateRoot = new TableAggregateRoot(); - tableAggregateRoot.Fields = new List(); - var table = entityType.GetCustomAttribute(); - - tableAggregateRoot.Name = table.TableName; - - foreach (var p in entityType.GetProperties()) - { - tableAggregateRoot.Fields.Add(PropertyMapperToFiled(p)); - } - tableAggregateRoot.Fields.ForEach(x => x.TableId = tableAggregateRoot.Id); - return tableAggregateRoot; - } - - - private FieldEntity PropertyMapperToFiled(PropertyInfo propertyInfo) - { - var fieldEntity = new FieldEntity(); - fieldEntity.Name = propertyInfo.Name; - - - //获取数据类型,包括可空类型 - Type? fieldType = null; - // 如果字段类型是 Nullable 泛型类型 - if (propertyInfo.PropertyType.IsGenericType && propertyInfo.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>)) - { - Type nullableType = Nullable.GetUnderlyingType(propertyInfo.PropertyType)!; - fieldType = nullableType; - } - else - { - fieldType = propertyInfo.PropertyType; - } - - //判断类型 - var enumName = typeof(FieldTypeEnum).GetFields(BindingFlags.Static | BindingFlags.Public).Where(x => x.GetCustomAttribute()?.Description == fieldType.Name).FirstOrDefault()?.Name; - if (enumName is null) - { - fieldEntity.FieldType = FieldTypeEnum.String; - // App.GetRequiredService>().LogError($"字段类型:{propertyInfo.PropertyType.Name},未定义"); - } - else - { - fieldEntity.FieldType = EasyTool.EnumUtil.Parse(enumName); - } - - //判断是否可空 - if (propertyInfo.PropertyType.IsGenericType && propertyInfo.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>)) - { - fieldEntity.IsRequired = false; - } - else - { - fieldEntity.IsRequired = true; - } - - - - //判断是否主键 - if (propertyInfo.GetCustomAttribute()?.IsPrimaryKey == true) - { - fieldEntity.IsKey = true; - } - - //判断长度 - var colum = propertyInfo.GetCustomAttribute(); - if (colum is not null && colum.Length != 0) - { - fieldEntity.Length = colum.Length; - } - return fieldEntity; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Field/FieldDto.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Field/FieldDto.cs deleted file mode 100644 index 3bb7d26e..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Field/FieldDto.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Framework.Module.WebFirstManager.Enums; - -namespace Yi.Framework.Module.WebFirstManager.Dtos.Field -{ - public class FieldDto : IEntityDto - { - /// - /// 字段名称 - /// - public string Name { get; set; } - public string? Description { get; set; } - - public int OrderNum { get; set; } - public int Length { get; set; } - - public FieldTypeEnum FieldType { get; set; } - - public long TableId { get; set; } - - /// - /// 是否必填 - /// - public bool IsRequired { get; set; } - - /// - /// 是否主键 - /// - public bool IsKey { get; set; } - - /// - /// 是否自增 - /// - public bool IsAutoAdd { get; set; } - - /// - /// 是否公共 - /// - public bool IsPublic { get; set; } - public long Id { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Field/FieldGetListInput.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Field/FieldGetListInput.cs deleted file mode 100644 index 95a18952..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Field/FieldGetListInput.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Module.WebFirstManager.Enums; - -namespace Yi.Framework.Module.WebFirstManager.Dtos.Field -{ - public class FieldGetListInput:PagedAndSortedResultRequestDto - { - /// - /// 字段名称 - /// - public string? Name { get; set; } - - public long? TableId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Table/TableDto.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Table/TableDto.cs deleted file mode 100644 index e6c92bd6..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Table/TableDto.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; -using Yi.Framework.Module.WebFirstManager.Entities; - -namespace Yi.Framework.Module.WebFirstManager.Dtos.Table -{ - public class TableDto: IEntityDto - { - public long Id { get; set; } - /// - /// 表名 - /// - public string Name { get; set; } - - /// - /// 备注 - /// - public string? Description { get; set; } - - /// - /// 一表多字段 - /// - public List Fields { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Table/TableGetListInput.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Table/TableGetListInput.cs deleted file mode 100644 index 45b1334a..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Table/TableGetListInput.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Framework.Module.WebFirstManager.Dtos.Table -{ - public class TableGetListInput : PagedAndSortedResultRequestDto - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Template/TemplateDto.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Template/TemplateDto.cs deleted file mode 100644 index 7ad73e81..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Template/TemplateDto.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Framework.Module.WebFirstManager.Dtos.Template -{ - public class TemplateDto : IEntityDto - { - public long Id { get; set; } - - /// - /// 模板字符串 - /// - public string TemplateStr { get; set; } = string.Empty; - - /// - /// 生成路径 - /// - public string BuildPath { get; set; } - - - /// - /// 模板名称 - /// - public string Name { get; set; } - - /// - /// 备注 - /// - public string? Remarks { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Template/TemplateGetListInput.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Template/TemplateGetListInput.cs deleted file mode 100644 index 702cd038..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/Template/TemplateGetListInput.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Framework.Module.WebFirstManager.Dtos.Template -{ - public class TemplateGetListInput : PagedAndSortedResultRequestDto - { - - /// - /// 模板名称 - /// - public string? Name { get; set; } - - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/WebFirst/WebFirstDto.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/WebFirst/WebFirstDto.cs deleted file mode 100644 index 07afaff8..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Dtos/WebFirst/WebFirstDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WebFirstManager.Dtos.WebFirst -{ - public class WebFirstDto - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Entities/FieldEntity.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Entities/FieldEntity.cs deleted file mode 100644 index 0d58ea9c..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Entities/FieldEntity.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Framework.Module.WebFirstManager.Enums; - -namespace Yi.Framework.Module.WebFirstManager.Entities -{ - [SugarTable("Field")] - public class FieldEntity : IEntity - { - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } - /// - /// 字段名称 - /// - public string Name { get; set; } - public string? Description { get; set; } - - public int OrderNum { get; set; } - public int Length { get; set; } - - public FieldTypeEnum FieldType { get; set; } - - public long TableId { get; set; } - - /// - /// 是否必填 - /// - public bool IsRequired { get; set; } - - /// - /// 是否主键 - /// - public bool IsKey { get; set; } - - /// - /// 是否自增 - /// - public bool IsAutoAdd { get; set; } - - /// - /// 是否公共 - /// - public bool IsPublic { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Entities/TableAggregateRoot.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Entities/TableAggregateRoot.cs deleted file mode 100644 index 25db66c1..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Entities/TableAggregateRoot.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Framework.Infrastructure.Helper; - -namespace Yi.Framework.Module.WebFirstManager.Entities -{ - [SugarTable("Table")] - public class TableAggregateRoot : IAggregateRoot - { - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } = SnowflakeHelper.NextId; - /// - /// 表名 - /// - public string Name { get; set; } - - /// - /// 备注 - /// - - public string? Description { get; set; } - - /// - /// 一表多字段 - /// - [Navigate(NavigateType.OneToMany, nameof(FieldEntity.TableId))] - public List Fields { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Entities/TemplateEntity.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Entities/TemplateEntity.cs deleted file mode 100644 index 402cb41c..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Entities/TemplateEntity.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Ddd.Entities; - -namespace Yi.Framework.Module.WebFirstManager.Entities -{ - [SugarTable("Template")] - public class TemplateEntity : IEntity - { - - [SugarColumn( IsPrimaryKey = true)] - public long Id { get; set; } - - /// - /// 模板字符串 - /// - [SugarColumn(Length =99999)] - public string TemplateStr { get; set; } = string.Empty; - - /// - /// 生成路径 - /// - public string BuildPath { get; set; } - - /// - /// 模板名称 - /// - public string Name { get; set; } - - /// - /// 备注 - /// - public string? Remarks { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Enums/FieldTypeEnum.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Enums/FieldTypeEnum.cs deleted file mode 100644 index 237222d4..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Enums/FieldTypeEnum.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - - -namespace Yi.Framework.Module.WebFirstManager.Enums -{ - public enum FieldTypeEnum - { - [Display(Name ="string",Description = "String")] - String, - - [Display(Name = "int", Description = "Int32")] - Int, - - [Display(Name = "long", Description = "Int64")] - Long, - - [Display(Name ="bool",Description = "Boolean")] - Bool, - - [Display(Name = "decimal",Description = "Decimal")] - Decimal, - - [Display(Name = "DateTime", Description = "DateTime")] - DateTime, - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/FieldTemplateHandler.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/FieldTemplateHandler.cs deleted file mode 100644 index ab40a071..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/FieldTemplateHandler.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.Reflection; -using System.Text; -using Furion.DependencyInjection; -using Yi.Framework.Module.WebFirstManager.Enums; - -namespace Yi.Framework.Module.WebFirstManager.Handler -{ - public class FieldTemplateHandler : TemplateHandlerBase, ITemplateHandler, ISingleton - { - public HandledTemplate Invoker(string str,string path) - { - var output= new HandledTemplate(); - output.TemplateStr = str.Replace("@field", BuildFields()); - output.BuildPath = path; - return output; - } - - - /// - /// 生成Fields - /// - /// - public string BuildFields() - { - StringBuilder fieldStrs = new StringBuilder(); - - - foreach (var field in Table.Fields) - { - var typeStr = typeof(FieldTypeEnum).GetFields().Where(x=> x.Name== field.FieldType.ToString())?.FirstOrDefault().GetCustomAttribute().Name; - - if (typeStr is null) - { - continue; - } - var nameStr = field.Name; - - //添加备注 - if (!string.IsNullOrEmpty(field.Description)) - { - var desStr = "/// \n" + - $"///{field.Description}\n" + - "/// \n"; - fieldStrs.AppendLine(desStr); - } - - //添加长度 - if (field.Length != 0) - { - var lengthStr = $"[SugarColumn(Length ={field.Length})]"; - fieldStrs.AppendLine(lengthStr); - } - - //添加可空类型 - string nullStr =""; - if (field.IsRequired == false) - { - nullStr = "?"; - } - - //添加字段 - var fieldStr = $"public {typeStr}{nullStr} {nameStr} {{ get; set; }}"; - - fieldStrs.AppendLine(fieldStr); - } - - return fieldStrs.ToString(); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/HandledTemplate.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/HandledTemplate.cs deleted file mode 100644 index bd9ba668..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/HandledTemplate.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Framework.Module.WebFirstManager.Handler -{ - public class HandledTemplate - { - public string TemplateStr { get; set; } - - public string BuildPath { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/ITemplateHandler.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/ITemplateHandler.cs deleted file mode 100644 index ebc50219..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/ITemplateHandler.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Module.WebFirstManager.Entities; - -namespace Yi.Framework.Module.WebFirstManager.Handler -{ - public interface ITemplateHandler - { - void SetTable(TableAggregateRoot table); - HandledTemplate Invoker(string str, string path); - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/ModelTemplateHandler.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/ModelTemplateHandler.cs deleted file mode 100644 index 72b9e56a..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/ModelTemplateHandler.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using EasyTool; -using Furion.DependencyInjection; - -namespace Yi.Framework.Module.WebFirstManager.Handler -{ - public class ModelTemplateHandler : TemplateHandlerBase, ITemplateHandler, ISingleton - { - public HandledTemplate Invoker(string str, string path) - { - var output = new HandledTemplate(); - output.TemplateStr= str.Replace("@model", StrUtil.ToFirstLetterLowerCase(Table.Name)).Replace("@Model", StrUtil.ToFirstLetterUpperCase(Table.Name)); - output.BuildPath = path.Replace("@model", StrUtil.ToFirstLetterLowerCase(Table.Name)).Replace("@Model", StrUtil.ToFirstLetterUpperCase(Table.Name)); - return output; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/NameSpaceTemplateHandler.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/NameSpaceTemplateHandler.cs deleted file mode 100644 index 02d65232..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/NameSpaceTemplateHandler.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion.DependencyInjection; - -namespace Yi.Framework.Module.WebFirstManager.Handler -{ - public class NameSpaceTemplateHandler : TemplateHandlerBase, ITemplateHandler, ISingleton - { - public HandledTemplate Invoker(string str, string path) - { - var output = new HandledTemplate(); - output.TemplateStr = str.Replace("@namespace", ""); - output.BuildPath = path; - return output; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/TemplateHandlerBase.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/TemplateHandlerBase.cs deleted file mode 100644 index 6f591c19..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Handler/TemplateHandlerBase.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Module.WebFirstManager.Entities; - -namespace Yi.Framework.Module.WebFirstManager.Handler -{ - public class TemplateHandlerBase - { - protected TableAggregateRoot Table { get; set; } - - public void SetTable(TableAggregateRoot table) - { - Table = table; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/IFieldService.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/IFieldService.cs deleted file mode 100644 index fb253102..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/IFieldService.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Framework.Module.WebFirstManager.Dtos.Field; - -namespace Yi.Framework.Module.WebFirstManager -{ - public interface IFieldService : ICrudAppService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/ITableService.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/ITableService.cs deleted file mode 100644 index dc97a2d0..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/ITableService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Framework.Module.WebFirstManager.Dtos.Table; - -namespace Yi.Framework.Module.WebFirstManager -{ - public interface ITableService : ICrudAppService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/ITemplateService.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/ITemplateService.cs deleted file mode 100644 index bd03b812..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/ITemplateService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Framework.Module.WebFirstManager.Dtos.Template; - -namespace Yi.Framework.Module.WebFirstManager -{ - public interface ITemplateService : ICrudAppService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/IWebFirstService.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/IWebFirstService.cs deleted file mode 100644 index ee352cbb..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/IWebFirstService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; - -namespace Yi.Framework.Module.WebFirstManager -{ - public interface IWebFirstService:IApplicationService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/FieldService.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/FieldService.cs deleted file mode 100644 index 934902fe..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/FieldService.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using EasyTool; -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Module.DictionaryManager.Dtos.DictionaryType; -using Yi.Framework.Module.WebFirstManager.Dtos.Field; -using Yi.Framework.Module.WebFirstManager.Entities; -using Yi.Framework.Module.WebFirstManager.Enums; - -namespace Yi.Framework.Module.WebFirstManager.Impl -{ - /// - /// 字段管理 - /// - [ApiDescriptionSettings("WebFirstManager")] - public class FieldService : CrudAppService, IFieldService, ITransient, IDynamicApiController - { - public async override Task> GetListAsync([FromQuery] FieldGetListInput input) - { - RefAsync total = 0; - var entities = await _DbQueryable.WhereIF(input.TableId is not null, x => x.TableId.Equals(input.TableId!)) - .WhereIF(input.Name is not null, x => x.Name!.Contains(input.Name!)) - - .ToPageListAsync(input.PageNum, input.PageSize, total); - - return new PagedResultDto - { - Total = total, - Items = await MapToGetListOutputDtosAsync(entities) - }; - } - - /// - /// 获取类型枚举 - /// - /// - [Route("type")] - public object GetFieldTypeEnum() - { - return typeof(FieldTypeEnum).GetFields(BindingFlags.Static | BindingFlags.Public).Select(x => new { lable = x.Name, value = (int)EnumUtil.GetValueByName(x.Name) }).ToList(); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/TableService.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/TableService.cs deleted file mode 100644 index 1382b441..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/TableService.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Microsoft.AspNetCore.Mvc; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Module.WebFirstManager.Dtos.Table; -using Yi.Framework.Module.WebFirstManager.Entities; - -namespace Yi.Framework.Module.WebFirstManager.Impl -{ - [ApiDescriptionSettings("WebFirstManager")] - public class TableService : CrudAppService ,ITableService, ITransient, IDynamicApiController - { - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/TemplateService.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/TemplateService.cs deleted file mode 100644 index 78c9e126..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/TemplateService.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Module.WebFirstManager.Dtos.Template; -using Yi.Framework.Module.WebFirstManager.Entities; - -namespace Yi.Framework.Module.WebFirstManager.Impl -{ - [ApiDescriptionSettings("WebFirstManager")] - public class TemplateService : CrudAppService, ITemplateService, IDynamicApiController, ITransient - { - public async override Task> GetListAsync([FromQuery] TemplateGetListInput input) - { - RefAsync total = 0; - var entities = await _DbQueryable.WhereIF(input.Name is not null, x => x.Name.Equals(input.Name!)) - .ToPageListAsync(input.PageNum, input.PageSize, total); - - return new PagedResultDto - { - Total = total, - Items = await MapToGetListOutputDtosAsync(entities) - }; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/WebFirstService.cs b/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/WebFirstService.cs deleted file mode 100644 index f092f34b..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/WebFirstService.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion.DatabaseAccessor; -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using Mapster; -using Microsoft.AspNetCore.DataProtection.KeyManagement; -using Microsoft.AspNetCore.Mvc; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Module.WebFirstManager.Domain; -using Yi.Framework.Module.WebFirstManager.Dtos.WebFirst; -using Yi.Framework.Module.WebFirstManager.Entities; - -namespace Yi.Framework.Module.WebFirstManager.Impl -{ - /// - /// WebFirst - /// - [ApiDescriptionSettings("WebFirstManager")] - public class WebFirstService : ApplicationService, IWebFirstService, IDynamicApiController, ITransient - { - private IRepository _tableRepository; - private CodeFileManager _codeFileManager; - private WebTemplateManager _webTemplateManager; - public WebFirstService(IRepository tableRepository, CodeFileManager codeFileManager, WebTemplateManager webTemplateManager) - { - _tableRepository = tableRepository; - _codeFileManager = codeFileManager; - _webTemplateManager = webTemplateManager; - } - - /// - /// 测试 - /// - /// - public async Task GetTest2() - { - return "hello!"; - } - - /// - /// Web To Code - /// - /// - public async Task PostWebBuildCodeAsync(List ids) - { - //获取全部表 - var tables = await _tableRepository._DbQueryable.Where(x => ids.Contains(x.Id)).Includes(x => x.Fields).ToListAsync(); - foreach (var table in tables) - { - await _codeFileManager.BuildWebToCodeAsync(table); - } - - } - - - /// - /// Web To Db - /// - /// - public async Task PostWebBuildDbAsync() - { - } - - /// - /// Code To Web - /// - /// - [UnitOfWork] - public async Task PostCodeBuildWebAsync() - { - var tableAggregateRoots = await _webTemplateManager.BuildCodeToWebAsync(); - //覆盖数据库,将聚合根保存到数据库 - _tableRepository._Db.DbMaintenance.TruncateTable(); - _tableRepository._Db.DbMaintenance.TruncateTable(); - - //导航插入即可 - await _tableRepository._Db.InsertNav(tableAggregateRoots).Include(x => x.Fields).ExecuteCommandAsync(); - - - } - - - /// - /// Code To Db - /// - /// - public async Task PostCodeBuildDbAsync() - { - } - - /// - /// 打开目录 - /// - /// - public async Task PostDir(string path) - { - path = Uri.UnescapeDataString(path); - //去除包含@的目录 - path = string.Join("\\", path.Split("\\").Where(x => !x.Contains("@")).ToList()); - Process.Start("explorer.exe", path); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Framework.Module/Yi.Framework.Module.csproj b/Yi.Furion.Net6/Yi.Framework.Module/Yi.Framework.Module.csproj deleted file mode 100644 index 7c74970e..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/Yi.Framework.Module.csproj +++ /dev/null @@ -1,48 +0,0 @@ - - - - net6.0 - enable - enable - Yi.Framework.Module.xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Yi.Furion.Net6/Yi.Framework.Module/Yi.Framework.Module.xml b/Yi.Furion.Net6/Yi.Framework.Module/Yi.Framework.Module.xml deleted file mode 100644 index 5964d07e..00000000 --- a/Yi.Furion.Net6/Yi.Framework.Module/Yi.Framework.Module.xml +++ /dev/null @@ -1,1097 +0,0 @@ - - - - Yi.Framework.Module - - - - - 考虑到本地缓存与分布式缓存差异太大,使用功能限制太大,所以该抽象类淘汰 - - - - - 简单发布 - - - - - - - - 列表插入头部 - - - - - - - - - 列表弹出头部 - - - - - - - - 常量定义 - - - - - Dictionary服务实现 - - - - - 查询 - - - - - 根据字典类型获取字典列表 - - - - - - - 常量定义 - - - - - DictionaryType服务实现 - - - - - DictionaryType输入创建对象 - - - - - Dictionary输入创建对象 - - - - - 主键 - - - - - 逻辑删除 - - - - - 排序 - - - - - 状态 - - - - - 描述 - - - - - tag类型 - - - - - tagClass - - - - - 字典类型 - - - - - 字典标签 - - - - - 字典值 - - - - - 是否为该类型的默认值 - - - - - 主键 - - - - - 逻辑删除 - - - - - 排序 - - - - - 状态 - - - - - 字典名称 - - - - - 字典类型 - - - - - 描述 - - - - - Dictionary服务抽象 - - - - - DictionaryType服务抽象 - - - - - 文件表 - - - - - 文件类型 - - - - - 文件大小 - - - - - 文件名 - - - - - 文件路径 - - - - - 文件处理 - - - - - 下载文件,是否缩略图 - - - - - - 上传文件 - - - - - - 启用HeiCaptcha - - - - - - - 验证码配置和绘制逻辑 - - - - - 验证码文本池 - - - - - 验证码图片宽高 - - - - - 泡泡数量 - - - - - 泡泡半径范围 - - - - - 颜色池,较深的颜色 - https://tool.oschina.net/commons?type=3 - - - - 较浅的颜色 - - - - 字体池 - - - - - 生成随机中文字符串 - - - - - - - 生成随机英文字母/数字组合字符串 - - - - - - - 英文字母+数字组合验证码 - - - 验证码图片字节数组 - - - - 生成一个数组组合验证码素材(Image) - - - - - - - 初始化字体池 - - 一个初始大小 - - - - OperationLog服务抽象 - - - - - 操作日志表 - - - - - 操作模块 - - - - - 操作类型 - - - - - 请求方法 - - - - - 操作人员 - - - - - 操作Ip - - - - - 操作地点 - - - - - 操作方法 - - - - - 请求参数 - - - - - 请求结果 - - - - - OperationLog服务实现 - - - - - 操作类型 - - - - - 日志标题(模块) - - - - - 是否保存请求数据 - - - - - 是否保存返回数据 - - - - - 发送短信 - - - - - - - - 代码文件领域服务,与代码文件生成相关,web to code - - - - - 数据库领域服务,与数据库相关,同步到数据库,web to db ,code to db - - - - - 与webfrist相关,同步到web,code to web - - - - - 通过当前的实体代码获取表存储 - - - - - - 字段名称 - - - - - 是否必填 - - - - - 是否主键 - - - - - 是否自增 - - - - - 是否公共 - - - - - 字段名称 - - - - - 表名 - - - - - 备注 - - - - - 一表多字段 - - - - - 模板字符串 - - - - - 生成路径 - - - - - 模板名称 - - - - - 备注 - - - - - 模板名称 - - - - - 字段名称 - - - - - 是否必填 - - - - - 是否主键 - - - - - 是否自增 - - - - - 是否公共 - - - - - 表名 - - - - - 备注 - - - - - 一表多字段 - - - - - 模板字符串 - - - - - 生成路径 - - - - - 模板名称 - - - - - 备注 - - - - - 生成Fields - - - - - - 字段管理 - - - - - 获取类型枚举 - - - - - - WebFirst - - - - - 测试 - - - - - - Web To Code - - - - - - Web To Db - - - - - - Code To Web - - - - - - Code To Db - - - - - - 打开目录 - - - - - - 获取用户openid - - - - - - - 获取不限制的小程序码 - - - - - - - 支付预支付id - - - - - - - 支付的回调接口 - - - - - - - 发送聚合消息 - - - - - - - 商品描述 - - - - - 商户订单号 - - - - - 订单金额 - - - - - 支付者 - - - - - 应用id - - - - - 商户id - - - - - 商品描述 - - - - - 商户订单号 - - - - - 回调通知地址 - - - - - 订单金额 - - - - - 支付者 - - - - - 总金额 - - - - - 预支付id - - - - - 接收的结果 - - - - - 通知的唯一ID - - - - - 通知的资源数据类型,支付成功通知为encrypt-resource - - - - - 通知的资源数据类型,支付成功通知为encrypt-resource - - - - - 通知的资源数据类型,支付成功通知为encrypt-resource - - - - - 回调摘要 - - - - - 数据 - - - - - 通知的数据 - - - - - 加密算法类型:AEAD_AES_256_GCM - - - - - 数据密文 - - - - - 附加数据 - - - - - 原始回调类型,为transaction - - - - - 随机串 - - - - - 解密出来的结果 - - - - - 微信支付系统生成的订单号。 - - - - - 订单金额信息 - - - - - 商户号 - - - - - - 银行类型,采用字符串类型的银行标识。 - - - - - 优惠功能,享受优惠时返回该字段 - - - - - 支付完成时间 - - - - - 支付者信息 - - - - - 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一。 - 特殊规则:最小字符长度为6 - - - - - 应用ID - - - - - 交易状态描述 - - - - - - - 支付场景信息描述 - - - - - 用户支付金额,单位为分。 - - - - - 订单总金额,单位为分。 - - - - - CNY:人民币,境内商户号仅支持人民币。 - - - - - 用户支付币种 - - - - - 商品备注 - - - - - 商品编码 - - - - - 商品优惠金额 - - - - - 商品编码 - - - - - 商品单价 - - - - - 单品列表 - - - - - 微信出资 - - - - - 券ID - - - - - 优惠名称 - - - - - 其他出资 - - - - - currency - - - - - 活动ID - - - - - 单品列表 - - - - - 用户标识 - - - - - 商户端设备号 - - - - - 用户openid,可以是小程序的openid,也可以是mp_template_msg.appid对应的公众号的openid - - - - - 小程序消息模板 - - - - - 公众号模板 - - - - - 用户openid,可以是小程序的openid,也可以是mp_template_msg.appid对应的公众号的openid - - - - - 小程序消息模板 - - - - - 公众号模板 - - - - - 小程序消息 - - - - - 模板id - - - - - 小程序页面 - - - - - 小程序模板消息formid - - - - - 小程序模板放大关键词 - - - - - 模板数据 - - - - - 公众号消息通知 - - - - - 公众号appid,要求与小程序有绑定且同主体 - - - - - 公众号模板id - - - - - 公众号模板消息所要跳转的url - - - - - 公众号模板消息所要跳转的小程序,小程序的必须与公众号具有绑定关系 - - - - - 公众号模板消息的数据 - - - - - 小程序跳转 - - - - - 正式版本 - - - - - 体验版本 - - - - - 开发版本 - - - - - 获取微信AccessToken - - - - - 效验请求是否成功 - - - - - - - 获取用户openid - - - - - - - 支付预支付id,描述必填 - - - - - - - 支付通知回调 - - - - - - 获取不限制的小程序码 - - - - - - - 小程序推送订阅消息 - - - - - - AEAD_AES_256_GCM解密算法,用于解开支付回调的通知 - - 需要base64 - 需要base64 - 需要base64 - - - - - 公众号 - - - - - 获取微信AccessToken - - - - diff --git a/Yi.Furion.Net6/Yi.Furion.Application/App/Services/ITrendsService.cs b/Yi.Furion.Net6/Yi.Furion.Application/App/Services/ITrendsService.cs deleted file mode 100644 index b3634c97..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/App/Services/ITrendsService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.App.Dtos.Trends; - -namespace Yi.Furion.Application.App.Services -{ - /// - /// Trends服务抽象 - /// - public interface ITrendsService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/App/Services/Impl/TrendsService.cs b/Yi.Furion.Net6/Yi.Furion.Application/App/Services/Impl/TrendsService.cs deleted file mode 100644 index a741d23e..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/App/Services/Impl/TrendsService.cs +++ /dev/null @@ -1,49 +0,0 @@ -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Furion.Application.App.Services; -using Yi.Furion.Core.App.Dtos.Trends; -using Yi.Furion.Core.App.Entities; - -namespace Yi.Furion.Application.App.Services.Impl -{ - /// - /// Trends服务实现 - /// - [ApiDescriptionSettings("APP")] - public class TrendsService : CrudAppService, - ITrendsService, IDynamicApiController, ITransient - { - /// - /// 多查 - /// - /// - /// - public override async Task> GetListAsync(TrendsGetListInput input) - { - var entity = await MapToEntityAsync(input); - - RefAsync total = 0; - - var entities = await _DbQueryable - .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) - .OrderByDescending(x=>x.CreationTime) - .ToPageListAsync(input.PageNum, input.PageSize, total); - return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); - } - - /// - /// 发布文章 - /// - /// - /// - public override Task CreateAsync(TrendsCreateInput input) - { - if (string.IsNullOrEmpty(input.Title)) - { - input.Title = input.Content.Substring(0, Math.Min(5, input.Content.Length)); - } - return base.CreateAsync(input); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Event/SeeDiscussEventHandler.cs b/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Event/SeeDiscussEventHandler.cs deleted file mode 100644 index 8c6a8611..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Event/SeeDiscussEventHandler.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Furion.EventBus; -using Microsoft.AspNetCore.Mvc.Diagnostics; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Furion.Core.Bbs.Entities; -using Yi.Furion.Core.Bbs.Etos; - -namespace Yi.Furion.Application.Bbs.Event -{ - public class SeeDiscussEventHandler : IEventSubscriber, ISingleton - { - private IRepository _repository; - public SeeDiscussEventHandler(IRepository repository) - { - _repository = repository; - } - //[EventSubscribe(nameof(LoginEventSource))] - public async Task HandlerAsync(EventHandlerExecutingContext context) - { - var eventData = (SeeDiscussEventArgs)context.Source.Payload; - var entity = await _repository.GetByIdAsync(eventData.DiscussId); - if (entity is not null) - { - entity.SeeNum += 1; - await _repository.UpdateAsync(entity); - } - } - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IArticleService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IArticleService.cs deleted file mode 100644 index 6b6790e1..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IArticleService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Bbs.Dtos.Article; - -namespace Yi.Furion.Application.Bbs.Services -{ - /// - /// Article服务抽象 - /// - public interface IArticleService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IBannerService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IBannerService.cs deleted file mode 100644 index 54c8456f..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IBannerService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Bbs.Dtos.Banner; - -namespace Yi.Furion.Application.Bbs.Services -{ - /// - /// Banner抽象 - /// - public interface IBannerService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/ICommentService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/ICommentService.cs deleted file mode 100644 index ef33c414..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/ICommentService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Bbs.Dtos.Comment; - -namespace Yi.Furion.Application.Bbs.Services -{ - /// - /// Comment服务抽象 - /// - public interface ICommentService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IDiscussService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IDiscussService.cs deleted file mode 100644 index 1098a035..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IDiscussService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Bbs.Dtos.Discuss; - -namespace Yi.Furion.Application.Bbs.Services -{ - /// - /// Discuss服务抽象 - /// - public interface IDiscussService : ICrudAppService - { - Task VerifyDiscussPermissionAsync(long discussId); - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/ILabelService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/ILabelService.cs deleted file mode 100644 index 4fd5b249..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/ILabelService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Bbs.Dtos.MyType; - -namespace Yi.Furion.Application.Bbs.Services -{ - /// - /// Label服务抽象 - /// - public interface ILabelService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IPlateService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IPlateService.cs deleted file mode 100644 index b245da01..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/IPlateService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Bbs.Dtos.Plate; - -namespace Yi.Furion.Application.Bbs.Services -{ - /// - /// Plate服务抽象 - /// - public interface IPlateService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/BannerService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/BannerService.cs deleted file mode 100644 index 394ffbfc..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/BannerService.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Furion.Core.Bbs.Dtos.Banner; -using Yi.Furion.Core.Bbs.Entities; - -namespace Yi.Furion.Application.Bbs.Services.Impl -{ - /// - /// Banner服务实现 - /// - [ApiDescriptionSettings("BBS")] - public class BannerService : CrudAppService, - IBannerService,IDynamicApiController,ITransient - { - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/MyTypeService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/MyTypeService.cs deleted file mode 100644 index 6c3e94cd..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/MyTypeService.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.Data.Filters; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Bbs.Dtos.MyType; -using Yi.Furion.Core.Bbs.Entities; - -namespace Yi.Furion.Application.Bbs.Services.Impl -{ - /// - /// Label服务实现 - /// - [ApiDescriptionSettings("BBS")] - public class MyTypeService : CrudAppService, - ILabelService, IDynamicApiController, ITransient - { - public MyTypeService(ICurrentUser currentUser, IDataFilter dataFilter) - { - _currentUser = currentUser; - _dataFilter = dataFilter; - } - - private ICurrentUser _currentUser { get; set; } - - private IDataFilter _dataFilter { get; set; } - - /// - /// 获取当前用户的主题类型 - /// - /// - /// - public Task> GetListCurrentAsync(MyTypeGetListInputVo input) - { - - _dataFilter.AddFilter(x => x.UserId == _currentUser.Id); - return base.GetListAsync(input); - } - - /// - /// 创建 - /// - /// - /// - public override async Task CreateAsync(MyTypeCreateInputVo input) - { - var entity = await MapToEntityAsync(input); - entity.Id = SnowflakeHelper.NextId; - entity.UserId = _currentUser.Id; - entity.IsDeleted = false; - var outputEntity = await _repository.InsertReturnEntityAsync(entity); - return await MapToGetOutputDtoAsync(outputEntity); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/PlateService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/PlateService.cs deleted file mode 100644 index 4b3aaf26..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Bbs/Services/Impl/PlateService.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Furion.Core.Bbs.Dtos.Plate; -using Yi.Furion.Core.Bbs.Entities; - -namespace Yi.Furion.Application.Bbs.Services.Impl -{ - /// - /// Plate服务实现 - /// - [ApiDescriptionSettings("BBS")] - public class PlateService : CrudAppService, - IPlateService,IDynamicApiController,ITransient - { - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/GlobalUsings.cs b/Yi.Furion.Net6/Yi.Furion.Application/GlobalUsings.cs deleted file mode 100644 index 20d01af9..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/GlobalUsings.cs +++ /dev/null @@ -1,15 +0,0 @@ -global using Furion; -global using Furion.DatabaseAccessor; -global using Furion.DataEncryption; -global using Furion.DataValidation; -global using Furion.DependencyInjection; -global using Furion.DynamicApiController; -global using Furion.Extensions; -global using Furion.FriendlyException; -global using Furion.Logging; -global using Mapster; -global using Microsoft.AspNetCore.Authorization; -global using Microsoft.AspNetCore.Http; -global using Microsoft.AspNetCore.Mvc; -global using Microsoft.CodeAnalysis; -global using System.ComponentModel.DataAnnotations; \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Event/LoginEventHandler.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Event/LoginEventHandler.cs deleted file mode 100644 index bab88a96..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Event/LoginEventHandler.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Furion.EventBus; -using IPTools.Core; -using UAParser; -using Yi.Framework.Infrastructure.AspNetCore; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Infrastructure.Helper; -using Yi.Furion.Core.Rbac.Entities; -using Yi.Furion.Core.Rbac.Etos; - -namespace Yi.Furion.Application.Rbac.Event -{ - public class LoginEventHandler : IEventSubscriber,ISingleton - { - private readonly IRepository _loginLogRepository; - public LoginEventHandler(IRepository loginLogRepository) - { - _loginLogRepository = loginLogRepository; - } - [EventSubscribe(nameof(LoginEventSource))] - public Task HandlerAsync(EventHandlerExecutingContext context) - { - var eventData = (LoginEventArgs)context.Source.Payload; - var loginLogEntity = eventData.LoginLogEntity; - loginLogEntity.Id = SnowflakeHelper.NextId; - loginLogEntity.LogMsg = eventData.UserName + "登录系统"; - loginLogEntity.LoginUser = eventData.UserName; - - _loginLogRepository.InsertAsync(loginLogEntity); - return Task.CompletedTask; - } - - - - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Job/SystemDataJob.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Job/SystemDataJob.cs deleted file mode 100644 index b28739ce..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Job/SystemDataJob.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion.Schedule; -using Microsoft.Extensions.Logging; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Module.DictionaryManager.Entities; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Application.Rbac.Job -{ - public class SystemDataJob : IJob - { - private ISqlSugarClient _db; - private DataSeedExecuteHandler _dataSeedExecuteHandler; - private ILogger _logger; - public SystemDataJob(ISqlSugarClient sqlSugarClient, DataSeedExecuteHandler dataSeedExecuteHandler,ILogger logger) - { - _db = sqlSugarClient; - _dataSeedExecuteHandler= dataSeedExecuteHandler; - _logger= logger; - } - public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) - { - _db.DbMaintenance.TruncateTable(); - _db.DbMaintenance.TruncateTable(); - _db.DbMaintenance.TruncateTable(); - _db.DbMaintenance.TruncateTable(); - _db.DbMaintenance.TruncateTable(); - _db.DbMaintenance.TruncateTable(); - _db.DbMaintenance.TruncateTable(); - _db.DbMaintenance.TruncateTable(); - _db.DbMaintenance.TruncateTable(); - _db.DbMaintenance.TruncateTable(); - _db.DbMaintenance.TruncateTable(); - await _dataSeedExecuteHandler.Invoker(); - _logger.LogWarning("------->数据已经重置还原<-------"); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Job/TestJob.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Job/TestJob.cs deleted file mode 100644 index 7a5bdb54..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Job/TestJob.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion.Schedule; - -namespace Yi.Furion.Application.Rbac.Job -{ - public class TestJob : IJob - { - public Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) - { - ddd.ttt += 1; - Console.WriteLine($"你好,执行了{ddd.ttt}次"); - return Task.CompletedTask; - } - } - - public class ddd - { - public static int ttt = 0; - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IAccountService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IAccountService.cs deleted file mode 100644 index 3f73a407..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IAccountService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Furion.Core.Rbac.Dtos; - -namespace Yi.Furion.Application.Rbac.Services -{ - public interface IAccountService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IConfigService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IConfigService.cs deleted file mode 100644 index e8d5f72b..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IConfigService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Rbac.Dtos.Config; - -namespace Yi.Furion.Application.Rbac.Services -{ - /// - /// Config服务抽象 - /// - public interface IConfigService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IDeptService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IDeptService.cs deleted file mode 100644 index 496848c8..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IDeptService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Rbac.Dtos.Dept; - -namespace Yi.Furion.Application.Rbac.Services -{ - /// - /// Dept服务抽象 - /// - public interface IDeptService : ICrudAppService - { - Task> GetChildListAsync(long deptId); - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IMenuService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IMenuService.cs deleted file mode 100644 index 2ae55768..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IMenuService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Rbac.Dtos.Menu; - -namespace Yi.Furion.Application.Rbac.Services -{ - /// - /// Menu服务抽象 - /// - public interface IMenuService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IMonitorCacheService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IMonitorCacheService.cs deleted file mode 100644 index 2d510aa8..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IMonitorCacheService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Application.Rbac.Services -{ - public interface IMonitorCacheService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IMonitorServerService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IMonitorServerService.cs deleted file mode 100644 index 6d8608ca..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IMonitorServerService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Application.Rbac.Services -{ - public interface IMonitorServerService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IOnlineService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IOnlineService.cs deleted file mode 100644 index bc90a185..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IOnlineService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Application.Rbac.Services -{ - public interface IOnlineService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IPostService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IPostService.cs deleted file mode 100644 index 859b0116..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IPostService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Rbac.Dtos.Post; - -namespace Yi.Furion.Application.Rbac.Services -{ - /// - /// Post服务抽象 - /// - public interface IPostService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IRoleService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IRoleService.cs deleted file mode 100644 index 033dfb4b..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IRoleService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Rbac.Dtos.Role; - -namespace Yi.Furion.Application.Rbac.Services -{ - /// - /// Role服务抽象 - /// - public interface IRoleService : ICrudAppService - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/ITaskService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/ITaskService.cs deleted file mode 100644 index d0faa8f9..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/ITaskService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Application.Rbac.Services -{ - public interface ITaskService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IUserService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IUserService.cs deleted file mode 100644 index fe91473d..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/IUserService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Services.Abstract; -using Yi.Furion.Core.Rbac.Dtos.User; - -namespace Yi.Furion.Application.Rbac.Services -{ - /// - /// User服务抽象 - /// - public interface IUserService : ICrudAppService - { - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/ConfigService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/ConfigService.cs deleted file mode 100644 index 9ac63494..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/ConfigService.cs +++ /dev/null @@ -1,34 +0,0 @@ -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Furion.Core.Rbac.Dtos.Config; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Application.Rbac.Services.Impl -{ - /// - /// Config服务实现 - /// - [ApiDescriptionSettings("RBAC")] - public class ConfigService : CrudAppService, - IConfigService,IDynamicApiController,ITransient - { - /// - /// 多查 - /// - /// - /// - public override async Task> GetListAsync(ConfigGetListInputVo input) - { - var entity = await MapToEntityAsync(input); - - RefAsync total = 0; - - var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.ConfigKey), x => x.ConfigKey.Contains(input.ConfigKey!)) - .WhereIF(!string.IsNullOrEmpty(input.ConfigName), x => x.ConfigName!.Contains(input.ConfigName!)) - .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) - .ToPageListAsync(input.PageNum, input.PageSize, total); - return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/LoginLogService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/LoginLogService.cs deleted file mode 100644 index 2abff721..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/LoginLogService.cs +++ /dev/null @@ -1,29 +0,0 @@ -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Furion.Core.Rbac.Dtos.LoginLog; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Application.Rbac.Services.Impl -{ - [ApiDescriptionSettings("RBAC")] - public class LoginLogService : CrudAppService,IDynamicApiController,ITransient - { - public override async Task> GetListAsync(LoginLogGetListInputVo input) - { - RefAsync total = 0; - - var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.LoginIp), x => x.LoginIp.Contains(input.LoginIp!)) - .WhereIF(!string.IsNullOrEmpty(input.LoginUser), x => x.LoginUser!.Contains(input.LoginUser!)) - .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) - .ToPageListAsync(input.PageNum, input.PageSize, total); - return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); - } - - [NonAction] - public override Task UpdateAsync(long id, LoginLogGetListOutputDto input) - { - return base.UpdateAsync(id, input); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/MenuService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/MenuService.cs deleted file mode 100644 index 254dbe00..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/MenuService.cs +++ /dev/null @@ -1,43 +0,0 @@ -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Furion.Application.Rbac.Services; -using Yi.Furion.Core.Rbac.Dtos.Menu; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Application.Rbac.Services.Impl -{ - /// - /// Menu服务实现 - /// - [ApiDescriptionSettings("RBAC")] - public class MenuService : CrudAppService, - IMenuService, ITransient, IDynamicApiController - { - - public override async Task> GetListAsync(MenuGetListInputVo input) - { - var entity = await MapToEntityAsync(input); - - RefAsync total = 0; - - var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.MenuName), x => x.MenuName.Contains(input.MenuName!)) - .WhereIF(input.State is not null, x => x.State == input.State) - .OrderByDescending(x => x.OrderNum) - .ToPageListAsync(input.PageNum, input.PageSize, total); - return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); - } - - /// - /// 查询当前角色的菜单 - /// - /// - /// - public async Task> GetListRoleIdAsync(long roleId) - { - var entities = await _DbQueryable.Where(m => SqlFunc.Subqueryable().Where(rm => rm.RoleId == roleId && rm.MenuId == m.Id).Any()).ToListAsync(); - - return await MapToGetListOutputDtosAsync(entities); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/MonitorCacheService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/MonitorCacheService.cs deleted file mode 100644 index 4f93cc22..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/MonitorCacheService.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CSRedis; -using Furion.ClayObject.Extensions; -using Microsoft.AspNetCore.DataProtection.KeyManagement; -using Microsoft.Extensions.Caching.Memory; -using Yi.Framework.Module.Caching; -using Yi.Furion.Core.Rbac.Dtos.MonitorCache; - -namespace Yi.Furion.Application.Rbac.Services.Impl -{ - [ApiDescriptionSettings("RBAC")] - public class MonitorCacheService : IMonitorCacheService, IDynamicApiController, ITransient - { - private static List monitorCacheNames => new List() - { - new MonitorCacheNameGetListOutputDto{ CacheName="Yi:Login",Remark="登录验证码"}, - new MonitorCacheNameGetListOutputDto{ CacheName="Yi:User",Remark="用户信息"} - }; - private Dictionary monitorCacheNamesDic => monitorCacheNames.ToDictionary(x => x.CacheName, x => x.Remark); - private CSRedisClient _cacheClient; - public MonitorCacheService(RedisCacheClient redisCacheClient) - { - _cacheClient = redisCacheClient.Client; - } - //cacheKey value为空,只要name和备注 - - public List GetName() - { - //固定的 - return monitorCacheNames; - } - [HttpGet("key/{cacaheName}")] - public List GetKey([FromRoute] string cacaheName) - { - var output = _cacheClient.Keys($"{cacaheName}:*"); - return output.ToList(); - } - - //全部不为空 - [HttpGet("value/{cacaheName}/{cacaheKey}")] - public MonitorCacheGetListOutputDto GetValue([FromRoute] string cacaheName, [FromRoute] string cacaheKey) - { - var value = _cacheClient.Get($"{cacaheName}:{cacaheKey}"); - return new MonitorCacheGetListOutputDto() { CacheKey = cacaheKey, CacheName = cacaheName, CacheValue = "ttt", Remark = monitorCacheNamesDic[cacaheName] }; - } - } - - -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/PostService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/PostService.cs deleted file mode 100644 index df53039f..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/PostService.cs +++ /dev/null @@ -1,28 +0,0 @@ -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Furion.Core.Rbac.Dtos.Post; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Application.Rbac.Services.Impl -{ - /// - /// Post服务实现 - /// - [ApiDescriptionSettings("RBAC")] - public class PostService : CrudAppService, - IPostService, ITransient, IDynamicApiController - { - public override async Task> GetListAsync(PostGetListInputVo input) - { - var entity = await MapToEntityAsync(input); - - RefAsync total = 0; - - var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.PostName), x => x.PostName.Contains(input.PostName!)) - .WhereIF(input.State is not null, x => x.State == input.State) - .ToPageListAsync(input.PageNum, input.PageSize, total); - return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/TaskService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/TaskService.cs deleted file mode 100644 index e1841ae4..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/TaskService.cs +++ /dev/null @@ -1,180 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion.Schedule; -using Furion.TimeCrontab; -using Yi.Framework.Infrastructure.Ddd.Dtos; -using Yi.Framework.Infrastructure.Ddd.Services; -using Yi.Furion.Application.Rbac.Job; -using Yi.Furion.Core.Rbac.Dtos.Task; - -namespace Yi.Furion.Application.Rbac.Services.Impl -{ - [ApiDescriptionSettings("RBAC")] - public class TaskService : ApplicationService, ITaskService, IDynamicApiController, ITransient - { - private readonly ISchedulerFactory _schedulerFactory; - public TaskService(ISchedulerFactory schedulerFactory) - { - _schedulerFactory = schedulerFactory; - } - /// - /// 单查job - /// - /// - /// - [HttpGet("{jobId}")] - public TaskGetOutput GetById([FromRoute] string jobId) - { - var result = _schedulerFactory.TryGetJob(jobId, out var scheduler); - var data = scheduler.GetModel(); - var output = data.JobDetail.Adapt(); - output.TriggerArgs = data.Triggers[0].Args; - output.NextRunTime = data.Triggers[0].NextRunTime; - output.LastRunTime = data.Triggers[0].LastRunTime; - output.NumberOfRuns = data.Triggers[0].NumberOfRuns; - return output; - } - - /// - /// 多查job - /// - /// - [HttpGet("")] - public PagedResultDto GetList([FromQuery] TaskGetListInput input) - { - var data = _schedulerFactory.GetJobsOfModels().Skip((input.PageNum - 1) * input.PageSize).Take(input.PageSize).OrderByDescending(x => x.JobDetail.UpdatedTime) - - .ToList(); - var output = data.Select(x => { - - var res= new TaskGetListOutput(); - res= x.JobDetail.Adapt(); - res.TriggerArgs = x.Triggers[0].Args; - res.Status = x.Triggers[0].Status.ToString(); - return res; - } ).ToList(); - return new PagedResultDto(data.Count(), output); - } - - /// - /// 创建job - /// - /// - /// - public ScheduleResult Create(TaskCreateInput input) - { - - - //jobBuilder - var jobBuilder = JobBuilder.Create(input.AssemblyName, input.JobType).SetJobId(input.JobId).SetGroupName(input.GroupName) - .SetConcurrent(input.Concurrent).SetDescription(input.Description); - - //triggerBuilder - //毫秒 - TriggerBuilder triggerBuilder = null; - switch (input.Type) - { - case Core.Rbac.Enums.JobTypeEnum.Cron: - triggerBuilder = Triggers.Cron(input.Cron, CronStringFormat.WithSeconds); - break; - case Core.Rbac.Enums.JobTypeEnum.Millisecond: - triggerBuilder = Triggers.Period(input.Millisecond); - break; - } - - //作业计划,单个jobBuilder与多个triggerBuilder组合 - var schedulerBuilder = SchedulerBuilder.Create(jobBuilder, triggerBuilder); - - - //调度中心工厂,使用作业计划管理job,返回调度中心单个 - var result = _schedulerFactory.TryAddJob(schedulerBuilder, out var scheduler); - - return result; - } - - /// - /// 移除job - /// - /// - /// - public ScheduleResult Remove(string jobId) - { - var res = _schedulerFactory.TryRemoveJob(jobId, out var scheduler); - return res; - } - - /// - /// 暂停job - /// - /// - /// - [HttpPut] - public ScheduleResult Pause(string jobId) - { - var res = _schedulerFactory.TryGetJob(jobId, out var scheduler); - - scheduler.Pause(); - return res; - } - - /// - /// 开始job - /// - /// - /// - [HttpPut] - public ScheduleResult Start(string jobId) - { - var res = _schedulerFactory.TryGetJob(jobId, out var scheduler); - scheduler.Start(); - return res; - } - - /// - /// 更新job - /// - /// - /// - /// - public ScheduleResult Update(string jobId, TaskUpdateInput input) - { - //jobBuilder - var jobBuilder = JobBuilder.Create(input.AssemblyName, input.JobType).SetJobId(jobId).SetGroupName(input.GroupName) - .SetConcurrent(input.Concurrent).SetDescription(input.Description); - - //triggerBuilder - //毫秒 - TriggerBuilder triggerBuilder = null; - switch (input.Type) - { - case Core.Rbac.Enums.JobTypeEnum.Cron: - triggerBuilder = Triggers.Cron(input.Cron, CronStringFormat.WithSeconds); - break; - case Core.Rbac.Enums.JobTypeEnum.Millisecond: - triggerBuilder = Triggers.Period(input.Millisecond); - break; - } - - //作业计划,单个jobBuilder与多个triggerBuilder组合 - var schedulerBuilder = SchedulerBuilder.Create(jobBuilder, triggerBuilder); - - - var result = _schedulerFactory.TryUpdateJob(schedulerBuilder, out var scheduler); - return result; - } - - [HttpPost] - public bool RunOnce(string jobId) - { - var result = _schedulerFactory.TryGetJob(jobId, out var scheduler); - - var triggerBuilder = Triggers.Period(100).SetRunOnStart(true).SetMaxNumberOfRuns(1); - scheduler.AddTrigger(triggerBuilder); - //设置启动时执行一次,然后最大只执行一次 - return true; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Yi.Furion.Application.csproj b/Yi.Furion.Net6/Yi.Furion.Application/Yi.Furion.Application.csproj deleted file mode 100644 index a28a42ff..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Yi.Furion.Application.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - net6.0 - 1701;1702;1591 - Yi.Furion.Application.xml - enable - - - - - - - - - - - - PreserveNewest - - - - - - - - - diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Yi.Furion.Application.xml b/Yi.Furion.Net6/Yi.Furion.Application/Yi.Furion.Application.xml deleted file mode 100644 index c4b28419..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/Yi.Furion.Application.xml +++ /dev/null @@ -1,651 +0,0 @@ - - - - Yi.Furion.Application - - - - - Trends服务实现 - - - - - 多查 - - - - - - - 发布文章 - - - - - - - Trends服务抽象 - - - - - 论坛模块的领域服务 - - - - - Article服务抽象 - - - - - Banner抽象 - - - - - Comment服务抽象 - - - - - Discuss服务抽象 - - - - - Label服务抽象 - - - - - 触发 - - - - - - 获取当前周数据 - - - - - - 点赞功能 - - - - - 点赞,返回true为点赞+1,返回false为点赞-1 - - - - - - Article服务实现 - - - - - 获取文章全部平铺信息 - - - - - - - - 查询文章 - - - - - - - - 发表文章 - - - - - - - - 效验创建权限 - - - - - - - Banner服务实现 - - - - - 评论 - - - - - 获取改主题下的评论,结构为二维列表,该查询无分页 - - - - - - - - 发表评论 - - - - - - - - Discuss应用服务实现,用于参数效验、领域服务业务组合、日志记录、事务处理、账户信息 - - - - - 单查 - - - - - - - 查询 - - - - - - - 创建主题 - - - - - - - 效验主题查询权限 - - - - - - - - Label服务实现 - - - - - 获取当前用户的主题类型 - - - - - - - 创建 - - - - - - - Plate服务实现 - - - - - Setting服务实现 - - - - - 获取配置标题 - - - - - - - Plate服务抽象 - - - - - Setting应用抽象 - - - - - 获取配置标题 - - - - - - 用户领域服务 - - - - - 登录效验 - - - - - - - - - 判断账户合法存在 - - - - - - - - 令牌转换 - - - - - - - 更新密码 - - - - - - - - - - 重置密码 - - - - - - - - 给角色设置菜单 - - - - - - - - 给用户设置角色 - - - - - - - - 给用户设置岗位 - - - - - - - - Config服务抽象 - - - - - Dept服务抽象 - - - - - Menu服务抽象 - - - - - 效验图片登录验证码,无需和账号绑定 - - - - - 效验电话验证码,需要与电话号码绑定 - - - - - 登录 - - - - - - - 生成验证码 - - - - - - 验证电话号码 - - - - - - 注册 手机验证码 - - - - - - 注册,需要验证码通过 - - - - - - - 查询已登录的账户信息 - - - - - - - 获取当前登录用户的前端路由 - - - - - - 退出登录 - - - - - - 更新密码 - - - - - - - 重置密码 - - - - - - - - 更新头像 - - - - - - - Config服务实现 - - - - - 多查 - - - - - - - Dept服务实现 - - - - - 通过角色id查询该角色全部部门 - - - - - - 多查 - - - - - - - Menu服务实现 - - - - - 查询当前角色的菜单 - - - - - - - 动态条件获取当前在线用户 - - - - - - - 强制退出用户 - - - - - - - Post服务实现 - - - - - Role服务实现 - - - - - 添加角色 - - - - - - - 修改角色 - - - - - - - - 更新状态 - - - - - - - - 获取角色下的用户 - - - - 是否在该角色下 - - - - - 批量给用户授权 - - - - - - - 批量取消授权 - - - - - - - 单查job - - - - - - - 多查job - - - - - - 创建job - - - - - - - 移除job - - - - - - - 暂停job - - - - - - - 开始job - - - - - - - 更新job - - - - - - - - User服务实现 - - - - - 查询用户 - - - - - - - 添加用户 - - - - - - - - 单查 - - - - - - - 更新用户 - - - - - - - - 更新个人中心 - - - - - - - 更新状态 - - - - - - - - Post服务抽象 - - - - - Role服务抽象 - - - - - User服务抽象 - - - - - 客户端连接Id - - - - - 用户id - - - - - 成功连接 - - - - - - 断开连接 - - - - - - diff --git a/Yi.Furion.Net6/Yi.Furion.Application/applicationsettings.json b/Yi.Furion.Net6/Yi.Furion.Application/applicationsettings.json deleted file mode 100644 index 7c49ed6b..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Application/applicationsettings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", - "SpecificationDocumentSettings": { - "DocumentTitle": "Furion | 规范化接口", - "GroupOpenApiInfos": [ - { - "Group": "Default", - "Title": "规范化接口演示", - "Description": "让 .NET 开发更简单,更通用,更流行。", - "Version": "1.0.0", - "TermsOfService": "https://furion.baiqian.ltd", - "Contact": { - "Name": "百小僧", - "Url": "https://gitee.com/monksoul", - "Email": "monksoul@outlook.com" - }, - "License": { - "Name": "Apache-2.0", - "Url": "https://gitee.com/dotnetchina/Furion/blob/rc1/LICENSE" - } - } - ] - }, - "CorsAccessorSettings": { - "WithExposedHeaders": [ - "access-token", - "x-access-token", - "environment" - ] - } -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsCreateInput.cs b/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsCreateInput.cs deleted file mode 100644 index d96891af..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsCreateInput.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Yi.Furion.Core.App.Dtos.Trends -{ - /// - /// Trends输入创建对象 - /// - public class TrendsCreateInput - { - public string Title { get; set; } - public string Content { get; set; } - public string? Remark { get; set; } - public List? Images { get; set; } - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsGetListInput.cs b/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsGetListInput.cs deleted file mode 100644 index 47f9db3c..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsGetListInput.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Furion.Core.App.Dtos.Trends -{ - /// - /// 查询参数 - /// - public class TrendsGetListInput : PagedAllResultRequestDto - { - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsGetListOutputDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsGetListOutputDto.cs deleted file mode 100644 index c0a5567b..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsGetListOutputDto.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Furion.Core.App.Dtos.Trends -{ - public class TrendsGetListOutputDto : IEntityDto - { - public long Id { get; set; } - public string Title { get; set; } - public string Content { get; set; } - public long UserId { get; set; } - public bool IsDeleted { get; set; } - public string? Remark { get; set; } - public List? Images { get; set; } - public DateTime CreationTime { get; set; } - public long? CreatorId { get; set; } - public long? LastModifierId { get; set; } - public DateTime? LastModificationTime { get; set; } - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsGetOutputDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsGetOutputDto.cs deleted file mode 100644 index 79e4e2b0..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsGetOutputDto.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Furion.Core.App.Dtos.Trends -{ - public class TrendsGetOutputDto : IEntityDto - { - public long Id { get; set; } - public string Title { get; set; } - public string Content { get; set; } - public long UserId { get; set; } - public bool IsDeleted { get; set; } - public string? Remark { get; set; } - public List? Images { get; set; } - public DateTime CreationTime { get; set; } - public long? CreatorId { get; set; } - public long? LastModifierId { get; set; } - public DateTime? LastModificationTime { get; set; } - - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsUpdateInput.cs b/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsUpdateInput.cs deleted file mode 100644 index ff42e11c..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/App/Dtos/Trends/TrendsUpdateInput.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Yi.Furion.Core.App.Dtos.Trends -{ - public class TrendsUpdateInputVo - { - public string? Title { get; set; } - public string? Content { get; set; } - public string? Remark { get; set; } - public List? Images { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/App/Entities/TrendsEntity.cs b/Yi.Furion.Net6/Yi.Furion.Core/App/Entities/TrendsEntity.cs deleted file mode 100644 index 623a9c2b..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/App/Entities/TrendsEntity.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Framework.Infrastructure.Helper; - -namespace Yi.Furion.Core.App.Entities -{ - /// - /// 动态 - /// - [SugarTable("Trends")] - public class TrendsEntity : AuditedObject, IEntity, ISoftDelete - { - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } - - public string Title { get; set; } - - - [SugarColumn(Length = 99999)] - public string Content { get; set; } - - public bool IsDeleted { get; set; } - - public string? Remark { get; set; } - - [SugarColumn(IsJson = true, Length = 99999)] - public List Images { get; set; } - } - - -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/DataSeeds/ConfigDataSeed.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/DataSeeds/ConfigDataSeed.cs deleted file mode 100644 index 64f4fdb1..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/DataSeeds/ConfigDataSeed.cs +++ /dev/null @@ -1,57 +0,0 @@ -using SqlSugar; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Framework.Module.DictionaryManager.Entities; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Core.Bbs.DataSeeds -{ - public class ConfigDataSeed : AbstractDataSeed, ITransient - { - public ConfigDataSeed(IRepository repository) : base(repository) - { - } - - public override List GetSeedData() - { - List entities = new List(); - ConfigEntity config1 = new ConfigEntity() - { - Id = SnowFlakeSingle.Instance.NextId(), - ConfigKey= "bbs.site.name", - ConfigName="站点名称", - ConfigValue="意社区" - }; - entities.Add(config1); - - ConfigEntity config2 = new ConfigEntity() - { - Id = SnowFlakeSingle.Instance.NextId(), - ConfigKey = "bbs.site.author", - ConfigName = "站点作者", - ConfigValue = "橙子" - }; - entities.Add(config2); - - ConfigEntity config3 = new ConfigEntity() - { - Id = SnowFlakeSingle.Instance.NextId(), - ConfigKey = "bbs.site.icp", - ConfigName = "站点Icp备案", - ConfigValue = "赣ICP备20008025号" - }; - entities.Add(config3); - - - ConfigEntity config4 = new ConfigEntity() - { - Id = SnowFlakeSingle.Instance.NextId(), - ConfigKey = "bbs.site.bottom", - ConfigName = "站点底部信息", - ConfigValue = "你好世界" - }; - entities.Add(config4); - return entities; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/AccessLog/AccessLogDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/AccessLog/AccessLogDto.cs deleted file mode 100644 index 34580471..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/AccessLog/AccessLogDto.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Helper; - -namespace Yi.Furion.Core.Bbs.Dtos.AccessLog -{ - public class AccessLogDto - { - public long Id { get; set; } - public long Number { get; set; } - public DateTime? LastModificationTime { get; set; } - public DateTime CreationTime { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleAllOutputDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleAllOutputDto.cs deleted file mode 100644 index 748bd7c3..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleAllOutputDto.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections.Generic; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Furion.Core.Bbs.Dtos.Article -{ - public class ArticleAllOutputDto : IEntityDto - { - public long Id { get; set; } - - //批量查询,不给内容,性能考虑 - //public string Content { get; set; } - public string Name { get; set; } - public long DiscussId { get; set; } - public long ParentId { get; set; } - - public List Children { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleGetListInputVo.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleGetListInputVo.cs deleted file mode 100644 index 09b10309..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleGetListInputVo.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Furion.Core.Bbs.Dtos.Article -{ - public class ArticleGetListInputVo : PagedAndSortedResultRequestDto - { - public long Id { get; set; } - public string Content { get; set; } - public string Name { get; set; } - public long DiscussId { get; set; } - public long ParentId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleGetListOutputDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleGetListOutputDto.cs deleted file mode 100644 index b20a4a29..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleGetListOutputDto.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections.Generic; -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Furion.Core.Bbs.Dtos.Article -{ - public class ArticleGetListOutputDto : IEntityDto - { - public long Id { get; set; } - //ѯݣܿ - //public string Content { get; set; } - public string Name { get; set; } - public long DiscussId { get; set; } - - public List Children { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleGetOutputDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleGetOutputDto.cs deleted file mode 100644 index e5126ece..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleGetOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Furion.Core.Bbs.Dtos.Article -{ - public class ArticleGetOutputDto : IEntityDto - { - public long Id { get; set; } - public string Content { get; set; } - public string Name { get; set; } - public long DiscussId { get; set; } - public long ParentId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleUpdateInputVo.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleUpdateInputVo.cs deleted file mode 100644 index 61cea53d..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Article/ArticleUpdateInputVo.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Yi.Furion.Core.Bbs.Dtos.Article -{ - public class ArticleUpdateInputVo - { - public string Content { get; set; } - public string Name { get; set; } - public long DiscussId { get; set; } - public long ParentId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerGetListInputVo.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerGetListInputVo.cs deleted file mode 100644 index a36ac8e4..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Banner/BannerGetListInputVo.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Furion.Core.Bbs.Dtos.Banner -{ - public class BannerGetListInputVo : PagedAndSortedResultRequestDto - { - public string Name { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeGetListInputVo.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeGetListInputVo.cs deleted file mode 100644 index da59f8d9..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeGetListInputVo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Furion.Core.Bbs.Dtos.MyType -{ - public class MyTypeGetListInputVo : PagedAndSortedResultRequestDto - { - public long Id { get; set; } - public string Name { get; set; } - public string? Color { get; set; } - public string? BackgroundColor { get; set; } - public long UserId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeGetListOutputDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeGetListOutputDto.cs deleted file mode 100644 index 15805444..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeGetListOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Furion.Core.Bbs.Dtos.MyType -{ - public class MyTypeGetListOutputDto : IEntityDto - { - public long Id { get; set; } - public string Name { get; set; } - public string? Color { get; set; } - public string? BackgroundColor { get; set; } - public long UserId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeOutputDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeOutputDto.cs deleted file mode 100644 index f202a9c6..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Furion.Core.Bbs.Dtos.MyType -{ - public class MyTypeOutputDto : IEntityDto - { - public long Id { get; set; } - public string Name { get; set; } - public string? Color { get; set; } - public string? BackgroundColor { get; set; } - public long UserId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeUpdateInputVo.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeUpdateInputVo.cs deleted file mode 100644 index 973259fe..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/MyType/MyTypeUpdateInputVo.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Bbs.Dtos.MyType -{ - public class MyTypeUpdateInputVo - { - public long Id { get; set; } - public string Name { get; set; } - public string? Color { get; set; } - public string? BackgroundColor { get; set; } - public long UserId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateGetListOutputDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateGetListOutputDto.cs deleted file mode 100644 index ecda2ba0..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateGetListOutputDto.cs +++ /dev/null @@ -1,20 +0,0 @@ -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Furion.Core.Bbs.Dtos.Plate -{ - public class PlateGetListOutputDto : IEntityDto - { - - public long Id { get; set; } - public string Name { get; set; } - public string? Logo { get; set; } - public string? Introduction { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateGetOutputDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateGetOutputDto.cs deleted file mode 100644 index d526400f..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateGetOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract; - -namespace Yi.Furion.Core.Bbs.Dtos.Plate -{ - public class PlateGetOutputDto : IEntityDto - { - public long Id { get; set; } - public string Name { get; set; } - public string? Logo { get; set; } - public string? Introduction { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateUpdateInputVo.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateUpdateInputVo.cs deleted file mode 100644 index 56804705..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Dtos/Plate/PlateUpdateInputVo.cs +++ /dev/null @@ -1,18 +0,0 @@ -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Bbs.Dtos.Plate -{ - public class PlateUpdateInputVo - { - - public long Id { get; set; } - public string Name { get; set; } - public string? Logo { get; set; } - public string? Introduction { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/AccessLogEntity.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/AccessLogEntity.cs deleted file mode 100644 index e261723a..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/AccessLogEntity.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Framework.Infrastructure.Helper; - -namespace Yi.Furion.Core.Bbs.Entities -{ - [SugarTable("AccessLog")] - public class AccessLogEntity : IEntity, IHasModificationTime, IHasCreationTime - { - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } = SnowflakeHelper.NextId; - public long Number { get; set; } - public DateTime? LastModificationTime { get; set; } - public DateTime CreationTime { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/AgreeEntity .cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/AgreeEntity .cs deleted file mode 100644 index eebc3c01..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/AgreeEntity .cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Ddd.Entities; -using Yi.Framework.Infrastructure.Helper; - -namespace Yi.Furion.Core.Bbs.Entities -{ - [SugarTable("Agree")] - public class AgreeEntity : IEntity, ICreationAuditedObject - { - public AgreeEntity() - { - } - - public AgreeEntity(long discussId) - { - DiscussId = discussId; - } - - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } = SnowflakeHelper.NextId; - public DateTime CreationTime { get; set; } - - /// - /// 主题id - /// - public long DiscussId { get; set; } - - /// - /// 创建者 - /// - public long? CreatorId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/BannerEntity.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/BannerEntity.cs deleted file mode 100644 index 6acc1254..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/BannerEntity.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; - -namespace Yi.Furion.Core.Bbs.Entities -{ - [SugarTable("Banner")] - public class BannerEntity : IEntity, ISoftDelete, IAuditedObject - { - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } - public string Name { get; set; } - public string? Logo { get; set; } - public string? Color { get; set; } - public bool IsDeleted { get; set; } - public DateTime CreationTime { get; set; } - - public long? CreatorId { get; set; } - - public long? LastModifierId { get; set; } - - public DateTime? LastModificationTime { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/DiscussMyTypeEntity.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/DiscussMyTypeEntity.cs deleted file mode 100644 index a7557d76..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/DiscussMyTypeEntity.cs +++ /dev/null @@ -1,21 +0,0 @@ -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Entities; - -namespace Yi.Furion.Core.Bbs.Entities -{ - [SugarTable("DiscussMyType")] - public class DiscussMyTypeEntity : IEntity - { - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } - - public long DiscussId { get; set; } - - public long MyTypeId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/MyTypeEntity.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/MyTypeEntity.cs deleted file mode 100644 index bcbf5e5f..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/MyTypeEntity.cs +++ /dev/null @@ -1,20 +0,0 @@ -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; - -namespace Yi.Furion.Core.Bbs.Entities -{ - [SugarTable("MyType")] - public class MyTypeEntity : IEntity, ISoftDelete - { - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } - public bool IsDeleted { get; set; } - - public string Name { get; set; } - public string? Color { get; set; } - public string? BackgroundColor { get; set; } - - public long UserId { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/PlateEntity.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/PlateEntity.cs deleted file mode 100644 index 9207af32..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Entities/PlateEntity.cs +++ /dev/null @@ -1,18 +0,0 @@ -using SqlSugar; -using Yi.Framework.Infrastructure.Data.Entities; -using Yi.Framework.Infrastructure.Ddd.Entities; - -namespace Yi.Furion.Core.Bbs.Entities -{ - [SugarTable("Plate")] - public class PlateEntity : IEntity, ISoftDelete - { - - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } - public string Name { get; set; } - public string? Logo { get; set; } - public string? Introduction { get; set; } - public bool IsDeleted { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Etos/SeeDiscussEventSource.cs b/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Etos/SeeDiscussEventSource.cs deleted file mode 100644 index 5c227d13..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Bbs/Etos/SeeDiscussEventSource.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using Furion.EventBus; -using Yi.Furion.Core.Rbac.Etos; - -namespace Yi.Furion.Core.Bbs.Etos -{ - public class SeeDiscussEventSource : IEventSource - { - public SeeDiscussEventSource(SeeDiscussEventArgs payload) - { Payload = payload; } - public string EventId => nameof(SeeDiscussEventSource); - public DateTime CreatedTime { get; set; } = DateTime.UtcNow; - - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public CancellationToken CancellationToken { get; set; } - - - public object Payload { get; set; } - } - - public class SeeDiscussEventArgs - { - public long DiscussId { get; set; } - public int OldSeeNum { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/GlobalUsings.cs b/Yi.Furion.Net6/Yi.Furion.Core/GlobalUsings.cs deleted file mode 100644 index 0e5cb78b..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/GlobalUsings.cs +++ /dev/null @@ -1,17 +0,0 @@ -global using Furion; -global using Furion.DatabaseAccessor; -global using Furion.DataEncryption; -global using Furion.DataValidation; -global using Furion.DependencyInjection; -global using Furion.DynamicApiController; -global using Furion.Extensions; -global using Furion.FriendlyException; -global using Furion.Logging; -global using Mapster; -global using Microsoft.AspNetCore.Authorization; -global using Microsoft.AspNetCore.Http; -global using Microsoft.AspNetCore.Mvc; -global using Microsoft.CodeAnalysis; -global using System.ComponentModel.DataAnnotations; -global using System; -global using System.Collections.Generic; \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/UserDataSeed.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/UserDataSeed.cs deleted file mode 100644 index 69fa5d83..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/DataSeeds/UserDataSeed.cs +++ /dev/null @@ -1,88 +0,0 @@ -using SqlSugar; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Furion.Core.Rbac.Entities; -using Yi.Furion.Core.Rbac.Enums; - -namespace Yi.Furion.Core.Rbac.DataSeeds -{ - ////支持依赖注入执行 - //[AppService(typeof(IDataSeed))] - - ////支持启动时执行 - //[AppService(typeof(IDataSeed))] - public class UserDataSeed : AbstractDataSeed,ITransient - { - public UserDataSeed(IRepository repository) : base(repository) - { - } - - public override List GetSeedData() - { - var entities = new List(); - UserEntity user1 = new UserEntity() - { - Id = SnowFlakeSingle.Instance.NextId(), - Name = "大橙子", - UserName = "cc", - Nick = "橙子", - Password = "123456", - Email = "454313500@qq.com", - Phone = 13800000000, - Sex = SexEnum.Male, - Address = "深圳", - Age = 20, - Introduction = "还有谁?", - OrderNum = 999, - Remark = "描述是什么呢?", - State = true - }; - user1.BuildPassword(); - entities.Add(user1); - - UserEntity user2 = new UserEntity() - { - Id = SnowFlakeSingle.Instance.NextId(), - Name = "大测试", - UserName = "test", - Nick = "测试", - Password = "123456", - Email = "454313500@qq.com", - Phone = 15900000000, - Sex = SexEnum.Woman, - Address = "深圳", - Age = 18, - Introduction = "还有我!", - OrderNum = 1, - Remark = "我没有描述!", - State = true - - }; - user2.BuildPassword(); - entities.Add(user2); - - UserEntity user3 = new UserEntity() - { - Id = SnowFlakeSingle.Instance.NextId(), - Name = "游客", - UserName = "guest", - Nick = "测试", - Password = "123456", - Email = "454313500@qq.com", - Phone = 15900000000, - Sex = SexEnum.Woman, - Address = "深圳", - Age = 18, - Introduction = "临时游客", - OrderNum = 1, - Remark = "懒得创账号", - State = true - - }; - user3.BuildPassword(); - entities.Add(user3); - - return entities; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/CaptchaImageDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/CaptchaImageDto.cs deleted file mode 100644 index 98a8c702..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/CaptchaImageDto.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Account -{ - public class CaptchaImageDto - { - public string Code { get; set; } = string.Empty; - public Guid Uuid { get; set; } = Guid.Empty; - public byte[] Img { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/PhoneCaptchaImageDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/PhoneCaptchaImageDto.cs deleted file mode 100644 index eb3001ac..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/PhoneCaptchaImageDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Account -{ - public class PhoneCaptchaImageDto - { - public string Phone { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/RestPasswordDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/RestPasswordDto.cs deleted file mode 100644 index 120bc089..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/RestPasswordDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Account -{ - public class RestPasswordDto - { - public string Password { get; set; } = string.Empty; - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/UpdateIconDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/UpdateIconDto.cs deleted file mode 100644 index 2d5550be..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/UpdateIconDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.Account -{ - public class UpdateIconDto - { - public string? Icon { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/MonitorCache/MonitorCacheNameGetListOutputDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/MonitorCache/MonitorCacheNameGetListOutputDto.cs deleted file mode 100644 index cd4e725c..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/MonitorCache/MonitorCacheNameGetListOutputDto.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Furion.Core.Rbac.Dtos.MonitorCache -{ - public class MonitorCacheNameGetListOutputDto - { - public string CacheName { get; set; } - public string? Remark { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleAuthUserCreateOrDeleteInput.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleAuthUserCreateOrDeleteInput.cs deleted file mode 100644 index a9858bea..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleAuthUserCreateOrDeleteInput.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Furion.Core.Rbac.Dtos.Role -{ - public class RoleAuthUserCreateOrDeleteInput - { - [Required] - public long RoleId { get; set; } - - [Required] - public List UserIds { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleAuthUserGetListInput.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleAuthUserGetListInput.cs deleted file mode 100644 index 3195fe0d..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/RoleAuthUserGetListInput.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Furion.Core.Rbac.Dtos.Role -{ - public class RoleAuthUserGetListInput: PagedAndSortedResultRequestDto - { - public string? UserName { get; set; } - - public long? Phone { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/UpdateDataScpoceInput.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/UpdateDataScpoceInput.cs deleted file mode 100644 index 595dcf0c..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Role/UpdateDataScpoceInput.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Furion.Core.Rbac.Enums; - -namespace Yi.Furion.Core.Rbac.Dtos.Role -{ - public class UpdateDataScpoceInput - { - public long RoleId { get; set; } - - public List? DeptIds { get; set;} - - public DataScopeEnum DataScope { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskGetListInput.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskGetListInput.cs deleted file mode 100644 index bf658318..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Task/TaskGetListInput.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Dtos; - -namespace Yi.Furion.Core.Rbac.Dtos.Task -{ - public class TaskGetListInput: PagedAllResultRequestDto - { - public string JobId { get; set; } - public string GroupName { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/UserRoleMenuDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/UserRoleMenuDto.cs deleted file mode 100644 index e81ed7a1..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/UserRoleMenuDto.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections.Generic; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Core.Rbac.Dtos -{ - public class UserRoleMenuDto - { - public UserEntity User { get; set; } = new(); - public HashSet Roles { get; set; } = new(); - public HashSet Menus { get; set; } = new(); - - public List RoleCodes { get; set; } = new(); - public List PermissionCodes { get; set; } = new(); - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/LoginLogEntity.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/LoginLogEntity.cs deleted file mode 100644 index 1cf711a0..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/LoginLogEntity.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using IPTools.Core; -using SqlSugar; -using UAParser; -using Yi.Framework.Infrastructure.AspNetCore; -using Yi.Framework.Infrastructure.Data.Auditing; -using Yi.Framework.Infrastructure.Ddd.Entities; - -namespace Yi.Furion.Core.Rbac.Entities -{ - [SugarTable("LoginLog")] - public class LoginLogEntity : IEntity, ICreationAuditedObject - { - [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] - public long Id { get; set; } - public DateTime CreationTime { get; set; } - - /// - /// 登录用户 - /// - [SugarColumn(ColumnName = "LoginUser")] - public string? LoginUser { get; set; } - /// - /// 登录地点 - /// - [SugarColumn(ColumnName = "LoginLocation")] - public string? LoginLocation { get; set; } - /// - /// 登录Ip - /// - [SugarColumn(ColumnName = "LoginIp")] - public string? LoginIp { get; set; } - /// - /// 浏览器 - /// - [SugarColumn(ColumnName = "Browser")] - public string? Browser { get; set; } - /// - /// 操作系统 - /// - [SugarColumn(ColumnName = "Os")] - public string? Os { get; set; } - /// - /// 登录信息 - /// - [SugarColumn(ColumnName = "LogMsg")] - public string? LogMsg { get; set; } - - public long? CreatorId { get; set; } - } - - public static class LoginLogEntityExtensions { - - - - /// - /// 记录用户登陆信息 - /// - /// - /// - public static LoginLogEntity GetLoginLogInfo(this HttpContext context) - { - ClientInfo GetClientInfo(HttpContext context) - { - var str = context.GetUserAgent(); - var uaParser = Parser.GetDefault(); - ClientInfo c = uaParser.Parse(str); - return c; - } - var ipAddr = context.GetClientIp(); - IpInfo location; - if (ipAddr == "127.0.0.1") - { - location = new IpInfo() { Province = "本地", City = "本机" }; - } - else - { - location = IpTool.Search(ipAddr); - } - ClientInfo clientInfo = GetClientInfo(context); - LoginLogEntity entity = new() - { - Browser = clientInfo.Device.Family, - Os = clientInfo.OS.ToString(), - LoginIp = ipAddr, - LoginLocation = location.Province + "-" + location.City - }; - - return entity; - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/RoleDeptEntity.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/RoleDeptEntity.cs deleted file mode 100644 index 6b2a1823..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/RoleDeptEntity.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json.Serialization; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Entities; - -namespace Yi.Furion.Core.Rbac.Entities; - -/// -/// 角色部门关系表 -/// -[SugarTable("RoleDept")] -public partial class RoleDeptEntity : IEntity -{ - /// - /// 主键 - /// - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } - - /// - /// 角色id - /// - [SugarColumn(ColumnName = "RoleId")] - public long RoleId { get; set; } - /// - /// 部门id - /// - [SugarColumn(ColumnName = "DeptId")] - public long DeptId { get; set; } - - -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/RoleMenuEntity.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/RoleMenuEntity.cs deleted file mode 100644 index 72e6bbec..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/RoleMenuEntity.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json.Serialization; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Entities; - -namespace Yi.Furion.Core.Rbac.Entities; -/// -/// 角色菜单关系表 -/// -[SugarTable("RoleMenu")] -public partial class RoleMenuEntity : IEntity - -{ - /// - /// 主键 - /// - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } - /// - /// - /// - [SugarColumn(ColumnName = "RoleId")] - public long RoleId { get; set; } - /// - /// - /// - [SugarColumn(ColumnName = "MenuId")] - public long MenuId { get; set; } - -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/UserPostEntity.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/UserPostEntity.cs deleted file mode 100644 index c60ed9d6..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Entities/UserPostEntity.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json.Serialization; -using SqlSugar; -using Yi.Framework.Infrastructure.Ddd.Entities; - -namespace Yi.Furion.Core.Rbac.Entities; -/// -/// 用户岗位表 -/// -[SugarTable("UserPost")] -public partial class UserPostEntity : IEntity -{ - /// - /// 主键 - /// - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } - /// - /// 用户id - /// - [SugarColumn(ColumnName = "UserId")] - public long UserId { get; set; } - /// - /// 岗位id - /// - [SugarColumn(ColumnName = "PostId")] - public long PostId { get; set; } - -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Etos/LoginEventSource.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Etos/LoginEventSource.cs deleted file mode 100644 index d0e262f6..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Etos/LoginEventSource.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using Furion.EventBus; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Core.Rbac.Etos -{ - public class LoginEventSource : IEventSource - { - public LoginEventSource(LoginEventArgs payload) - { Payload = payload; } - public string EventId => nameof(LoginEventSource); - public DateTime CreatedTime { get; set; } = DateTime.UtcNow; - - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public CancellationToken CancellationToken { get; set; } - - - public object Payload { get; set; } - } - - public class LoginEventArgs - { - public long UserId { get; set; } - public string UserName { get; set; } - - public LoginLogEntity LoginLogEntity { get; set; } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Yi.Furion.Core.csproj b/Yi.Furion.Net6/Yi.Furion.Core/Yi.Furion.Core.csproj deleted file mode 100644 index 36724827..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Yi.Furion.Core.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - net6.0 - 1701;1702;1591 - Yi.Furion.Core.xml - enable - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Yi.Furion.Core.xml b/Yi.Furion.Net6/Yi.Furion.Core/Yi.Furion.Core.xml deleted file mode 100644 index c9d86f36..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Core/Yi.Furion.Core.xml +++ /dev/null @@ -1,1154 +0,0 @@ - - - - Yi.Furion.Core - - - - - Trends输入创建对象 - - - - - 查询参数 - - - - - 动态 - - - - - 常量定义 - - - - - 常量定义 - - - - - 常量定义 - - - - - 常量定义 - - - - - 常量定义 - - - - - Article输入创建对象 - - - - - Banner输入创建对象 - - - - - Comment输入创建对象 - - - - - 评论id - - - - - 主题id - - - - - 第一层评论id,第一层为0 - - - - - 被回复的CommentId,第一层为0 - - - - - 评论多反 - - - - - 主题id - - - - - 用户,评论人用户信息 - - - - - 被评论的用户信息 - - - - - 这个不是一个树形,而是存在一个二维数组,该Children只有在顶级时候,只有一层 - - - - - 单返回,返回单条评论即可 - - - - - 用户id联表为用户对象 - - - - - 根节点的评论id - - - - - 被回复的CommentId - - - - - Discuss输入创建对象 - - - - - 默认公开 - - - - - 封面 - - - - - 是否已点赞 - - - - - 封面 - - - - - 封面 - - - - - 封面 - - - - - Label输入创建对象 - - - - - Plate输入创建对象 - - - - - 主题id - - - - - 创建者 - - - - - 平铺自己 - - - - - - - 评论表 - - - - - 采用二维数组方式,不使用树形方式 - - - - - 被回复的CommentId - - - - - 用户,评论人用户信息 - - - - - 被评论的用户信息 - - - - - 封面 - - - - - 当PermissionType为部分用户时候,以下列表中的用户+创建者 代表拥有权限 - - - - - 默认:公开 - - - - - 仅自己可见 - - - - - 部分用户可见 - - - - - 常量定义 - - - - - 常量定义 - - - - - 常量定义 - - - - - 常量定义 - - - - - 常量定义 - - - - - 账号 - - - - - 密码 - - - - - 唯一标识码 - - - - - 电话 - - - - - 验证码 - - - - - Config输入创建对象 - - - - - 配置查询参数 - - - - - 配置名称 - - - - - 配置键 - - - - - 配置名称 - - - - - 配置主键 - - - - - 配置值 - - - - - 配置类型 - - - - - 排序字段 - - - - - 备注 - - - - - 创建时间 - - - - - Dept输入创建对象 - - - - - 登录Ip - - - - - 浏览器 - - - - - 操作系统 - - - - - 登录信息 - - - - - Menu输入创建对象 - - - - - Post输入创建对象 - - - - - Role输入创建对象 - - - - - 作业 Id - - - - - 作业组名称 - - - - - 作业处理程序类型 - - 存储的是类型的 FullName - - - - 作业处理程序类型所在程序集 - - 存储的是程序集 Name - - - - 描述信息 - - - - - 是否采用并行执行 - - 如果设置为 false,那么使用串行执行 - - - - 是否扫描 IJob 实现类 [Trigger] 特性触发器 - - - - - 作业信息额外数据 - - - - - 作业更新时间 - - - - - 标记其他作业正在执行 - - 为 false 时有效,也就是串行执行 - - - - 作业处理程序运行时类型 - - - - - 作业信息额外数据运行时实例 - - - - - 触发器参数 - - - - - 作业 Id - - - - - 作业组名称 - - - - - 作业处理程序类型 - - 存储的是类型的 FullName - - - - 作业处理程序类型所在程序集 - - 存储的是程序集 Name - - - - 描述信息 - - - - - 是否采用并行执行 - - 如果设置为 false,那么使用串行执行 - - - - 是否扫描 IJob 实现类 [Trigger] 特性触发器 - - - - - 作业信息额外数据 - - - - - 作业更新时间 - - - - - 标记其他作业正在执行 - - 为 false 时有效,也就是串行执行 - - - - 作业处理程序运行时类型 - - - - - 作业信息额外数据运行时实例 - - - - - User输入创建对象 - - - - - 配置表 - - - - - 配置名称 - - - - - 配置键 - - - - - 配置值 - - - - - 配置类别 - - - - - 排序字段 - - - - - 描述 - - - - - 部门表 - - - - - 主键 - - - - - 逻辑删除 - - - - - 创建时间 - - - - - 创建者 - - - - - 最后修改者 - - - - - 最后修改时间 - - - - - 排序 - - - - - 状态 - - - - - 部门名称 - - - - - 部门编码 - - - - - 负责人 - - - - - 父级id - - - - - 描述 - - - - - 登录用户 - - - - - 登录地点 - - - - - 登录Ip - - - - - 浏览器 - - - - - 操作系统 - - - - - 登录信息 - - - - - 记录用户登陆信息 - - - - - - - 菜单表 - - - - - 主键 - - - - - 逻辑删除 - - - - - 创建时间 - - - - - 创建者 - - - - - 最后修改者 - - - - - 最后修改时间 - - - - - 排序 - - - - - 状态 - - - - - 菜单名 - - - - - - - - - - - - - - - - - - - - 菜单图标 - - - - - 菜单组件路由 - - - - - 是否为外部链接 - - - - - 是否缓存 - - - - - 是否显示 - - - - - 描述 - - - - - 组件路径 - - - - - 路由参数 - - - - - 实体扩展 - - - - - 构建vue3路由 - - - - - - - 岗位表 - - - - - 主键 - - - - - 逻辑删除 - - - - - 创建时间 - - - - - 创建者 - - - - - 最后修改者 - - - - - 最后修改时间 - - - - - 排序 - - - - - 状态 - - - - - 岗位编码 - - - - - 岗位名称 - - - - - 描述 - - - - - 角色部门关系表 - - - - - 主键 - - - - - 角色id - - - - - 部门id - - - - - 角色表 - - - - - 主键 - - - - - 逻辑删除 - - - - - 创建时间 - - - - - 创建者 - - - - - 最后修改者 - - - - - 最后修改时间 - - - - - 排序 - - - - - 角色名 - - - - - 角色编码 - - - - - 描述 - - - - - 角色数据范围 - - - - - 状态 - - - - - 角色菜单关系表 - - - - - 主键 - - - - - - - - - - - - - - - 用户表 - - - - - 主键 - - - - - 逻辑删除 - - - - - 姓名 - - - - - 年龄 - - - - - 用户名 - - - - - 密码 - - - - - 加密盐值 - - - - - 头像 - - - - - 昵称 - - - - - 邮箱 - - - - - Ip - - - - - 地址 - - - - - 电话 - - - - - 简介 - - - - - 备注 - - - - - 性别 - - - - - 部门id - - - - - 创建时间 - - - - - 创建者 - - - - - 最后修改者 - - - - - 最后修改时间 - - - - - 排序 - - - - - 状态 - - - - - 角色 - - - - - 岗位 - - - - - 部门 - - - - - 构建密码,MD5盐值加密 - - - - - 判断密码和加密后的密码是否相同 - - - - - - - 用户岗位表 - - - - - 主键 - - - - - 用户id - - - - - 岗位id - - - - - 用户角色关系表 - - - - - 主键 - - - - - 角色id - - - - - 用户id - - - - - 性别 - - - - - 男性 - - - - - 女性 - - - - - 未知 - - - - diff --git a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/IArticleRepository.cs b/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/IArticleRepository.cs deleted file mode 100644 index ac7da4fb..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/IArticleRepository.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Furion.Core.Bbs.Entities; - -namespace Yi.Furion.Sqlsugar.Core.Repositories -{ - public interface IArticleRepository : IRepository - { - Task> GetTreeAsync(Expression> where); - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/IDeptRepository.cs b/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/IDeptRepository.cs deleted file mode 100644 index 5043da55..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/IDeptRepository.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Sqlsugar.Core.Repositories -{ - public interface IDeptRepository - { - Task> GetChildListAsync(long deptId); - Task> GetListRoleIdAsync([FromRoute] long roleId); - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/IUserRepository.cs b/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/IUserRepository.cs deleted file mode 100644 index 70c66889..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/IUserRepository.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Threading.Tasks; -using Yi.Framework.Infrastructure.Ddd.Repositories; -using Yi.Furion.Core.Rbac.Dtos; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Sqlsugar.Core.Repositories -{ - public interface IUserRepository : IRepository - { - /// - /// 获取当前登录用户的所有信息 - /// - /// - /// - Task GetUserAllInfoAsync(long userId); - - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/Impl/ArticleRepository.cs b/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/Impl/ArticleRepository.cs deleted file mode 100644 index ec55f11d..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/Impl/ArticleRepository.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Threading.Tasks; -using Furion.DependencyInjection; -using SqlSugar; -using Yi.Framework.Infrastructure.Sqlsugar.Repositories; -using Yi.Furion.Core.Bbs.Entities; - -namespace Yi.Furion.Sqlsugar.Core.Repositories.Impl -{ - public class ArticleRepository : SqlsugarRepository, IArticleRepository,ITransient - { - public ArticleRepository(ISqlSugarClient context) : base(context) - { - } - - public async Task> GetTreeAsync(Expression> where) - { - return await _DbQueryable.Where(where).ToTreeAsync(x => x.Children, x => x.ParentId, 0); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/Impl/DeptRepository.cs b/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/Impl/DeptRepository.cs deleted file mode 100644 index f0aa4bac..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Repositories/Impl/DeptRepository.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Furion.DependencyInjection; -using Microsoft.AspNetCore.Mvc; -using SqlSugar; -using Yi.Framework.Infrastructure.Sqlsugar.Repositories; -using Yi.Furion.Core.Bbs.Entities; -using Yi.Furion.Core.Rbac.Dtos.Dept; -using Yi.Furion.Core.Rbac.Entities; - -namespace Yi.Furion.Sqlsugar.Core.Repositories.Impl -{ - public class DeptRepository : SqlsugarRepository, IDeptRepository, ITransient - { - public DeptRepository(ISqlSugarClient context) : base(context) - { - } - - public async Task> GetChildListAsync(long deptId) - { - var entities = await _DbQueryable.ToChildListAsync(x => x.ParentId, deptId); - return entities.Select(x => x.Id).ToList(); - } - public async Task> GetListRoleIdAsync([FromRoute] long roleId) - { - - return await _DbQueryable.Where(d => SqlFunc.Subqueryable().Where(rd => rd.RoleId == roleId && d.Id == rd.DeptId).Any()).ToListAsync(); - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Startup.cs b/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Startup.cs deleted file mode 100644 index d1a3658f..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Startup.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Furion; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Newtonsoft.Json.Schema; -using Yi.Framework.Infrastructure.Data; -using Yi.Framework.Infrastructure.Data.DataSeeds; -using Yi.Framework.Infrastructure.Sqlsugar; - -namespace Yi.Furion.Sqlsugar.Core; - -public class Startup : AppStartup -{ - public void ConfigureServices(IServiceCollection services) - { - services.AddDbSqlsugarContextServer(); - } - public async void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - app.UseDataFiterServer(); - app.UseSqlsugarCodeFirstServer(); - await app.UseDataSeedServer(); - } - -} diff --git a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Yi.Furion.Sqlsugar.Core.csproj b/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Yi.Furion.Sqlsugar.Core.csproj deleted file mode 100644 index 3304a5d4..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/Yi.Furion.Sqlsugar.Core.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - - net6.0 - - - - - - - - - diff --git a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/YiDbContext.cs b/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/YiDbContext.cs deleted file mode 100644 index 245bfaba..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Sqlsugar.Core/YiDbContext.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; -using Furion.LinqBuilder; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using SqlSugar; -using Yi.Framework.Infrastructure.CurrentUsers; -using Yi.Framework.Infrastructure.Data.Filters; -using Yi.Framework.Infrastructure.Sqlsugar; -using Yi.Furion.Core.Rbac.Consts; -using Yi.Furion.Core.Rbac.Entities; -using Yi.Furion.Core.Rbac.Enums; -using Yi.Furion.Sqlsugar.Core.Repositories; - -namespace Yi.Furion.Sqlsugar.Core -{ - /// - /// 使用自定义上下文 - /// - public class YiDbContext : SqlSugarDbContext - { - public YiDbContext(IOptions options, ICurrentUser currentUser, ILogger logger) : base(options, currentUser, logger) - { - } - - - //进行Aop数据权限过滤 - protected override void OnSqlSugarClientConfig(ISqlSugarClient sqlSugarClient) - { - //由于此处数据过滤为最底层,不能依赖仓储 - DataScopeFilter(sqlSugarClient); - } - - /// - /// 数据权限过滤 - /// - private async void DataScopeFilter(ISqlSugarClient sqlSugarClient) - { - //这里Aop进行数据权限过滤 - var userId = _currentUser.Id; - var userName = _currentUser.UserName; - var deptId = _currentUser.DeptId; - //超管或者 - if (userId == 0 || UserConst.Admin.Equals(userName)) return; - - //如果没有部门,只能看到自己 - if (deptId == 0) - { - sqlSugarClient.QueryFilter.AddTableFilter(x => x.Id == userId); - return; - } - /* - * 这里数据权限,步骤: - * 1:获取用户id - * 2:通过用户id,获取该用户的全部角色 - * 3:便利每一个角色获取全部的数据权限 - * 4:会涉及部门表的筛选,所以还需要获取用户的所在部门,如果没有部门,那就是过滤到只看自己 - * 5:可直接使用DB进行查询部门即可 - */ - var roles = await sqlSugarClient.Queryable().Where(x => SqlFunc.Subqueryable().Where(ur =>ur.UserId == userId).Any()).ToListAsync(); - //获取到全部角色 - - Expression> expression = (x) => true; - - //添加数据过滤 - foreach (var role in roles.OrderBy(x => x.DataScope)) - { - switch (role.DataScope) - { - //全部数据权限,直接返回 - case DataScopeEnum.ALL: - return; - - - //自定义数据过滤 - case DataScopeEnum.CUSTOM: - var deptIds1 = (await sqlSugarClient.Queryable().Where(x => SqlFunc.Subqueryable().Where(ur => ur.RoleId == role.Id).Any()).ToListAsync()).Select(x => x.Id).ToList(); - expression.Or(x => deptIds1.Contains(x.DeptId ?? -1)); - break; - - - //部门数据过滤 - case DataScopeEnum.DEPT: - expression.Or(x => x.DeptId == deptId); - break; - - - //部门及一下数据过滤 - case DataScopeEnum.DEPT_FOLLOW: - var deptIds = ( await sqlSugarClient.Queryable().ToChildListAsync(x=>x.ParentId,deptId)).Select(x=>x.Id).ToList(); - expression.Or(x => deptIds.Contains(x.DeptId ?? -1)); - break; - - - //自己数据过滤 - case DataScopeEnum.USER: - expression.Or(x => x.Id == userId); - break; - default: - break; - } - sqlSugarClient.QueryFilter.AddTableFilter(expression); - } - } - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Core/Handlers/JwtHandler.cs b/Yi.Furion.Net6/Yi.Furion.Web.Core/Handlers/JwtHandler.cs deleted file mode 100644 index 25205237..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Core/Handlers/JwtHandler.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Furion.Authorization; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; -using System.Threading.Tasks; - -namespace Yi.Furion.Web.Core.Handlers; - -public class JwtHandler : AppAuthorizeHandler -{ - public override Task PipelineAsync(AuthorizationHandlerContext context, DefaultHttpContext httpContext) - { - // 这里写您的授权判断逻辑,授权通过返回 true,否则返回 false - - return Task.FromResult(true); - } -} diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Core/Startup.cs b/Yi.Furion.Net6/Yi.Furion.Web.Core/Startup.cs deleted file mode 100644 index d83edb04..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Core/Startup.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using Furion; -using Furion.Schedule; -using Furion.TimeCrontab; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Yi.Framework.Infrastructure.Data.Json; -using Yi.Furion.Application.Rbac.Job; -using Yi.Furion.Application.Rbac.SignalRHub; -using Yi.Furion.Web.Core.Handlers; - -namespace Yi.Furion.Web.Core; - -public class Startup : AppStartup -{ - public void ConfigureServices(IServiceCollection services) - { - services.AddConsoleFormatter(); - services.AddJwt(); - - services.AddCorsAccessor(); - - services.AddControllers().AddInjectWithUnifyResult().AddJsonOptions(x => - { - x.JsonSerializerOptions.Converters.Add(new DateTimeJsonConverter("yyyy-MM-dd HH:mm:ss")); - x.JsonSerializerOptions.Converters.Add(new LongToStringConverter()); - }); - - services.AddEventBus(); - - services.AddHttpContextAccessor(); - services.AddSignalR(); - - services.AddSchedule(options => - { - // 注册作业,并配置作业触发器 - options.AddJob(Triggers.Period(10000)); - //options.AddJob(Triggers.Period(10000)); - options.AddJob(Triggers.Cron("0 0 0,12 ? * ?", CronStringFormat.WithSeconds)); // 表示每天凌晨与12点 - }); - services.AddFileLogging("log/application-{0:yyyy}-{0:MM}-{0:dd}.log", options => - { - options.Append = true; - options.MinimumLevel = LogLevel.Information; - options.FileSizeLimitBytes = 1024 * 1024 * 10; - options.MaxRollingFiles = 100; - options.FileNameRule = fileName => - { - return string.Format(fileName, DateTime.UtcNow); - }; - }); - - services.AddMonitorLogging(); - } - - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - app.UseHttpsRedirection(); - - app.UseRouting(); - - app.UseCorsAccessor(); - - app.UseAuthentication(); - app.UseAuthorization(); - - app.UseInject(string.Empty); - - } -} - -[AppStartup(-1)] -public class EndStartup : AppStartup -{ - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - app.UseEndpoints(endpoints => - { - endpoints.MapHub("/api/hub/main"); - endpoints.MapControllers(); - }); - } -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Core/Yi.Furion.Web.Core.csproj b/Yi.Furion.Net6/Yi.Furion.Web.Core/Yi.Furion.Web.Core.csproj deleted file mode 100644 index 0c3fd079..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Core/Yi.Furion.Web.Core.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - - net6.0 - 1701;1702;1591 - - - - - - - - - - - - - diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/.config/dotnet-tools.json b/Yi.Furion.Net6/Yi.Furion.Web.Entry/.config/dotnet-tools.json deleted file mode 100644 index 34c3e19a..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Entry/.config/dotnet-tools.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": 1, - "isRoot": true, - "tools": { - "dotnet-ef": { - "version": "7.0.5", - "commands": [ - "dotnet-ef" - ] - } - } -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/Program.cs b/Yi.Furion.Net6/Yi.Furion.Web.Entry/Program.cs deleted file mode 100644 index 450393b2..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Entry/Program.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Yi.Framework.Infrastructure.AspNetCore; - -Serve.Run(RunOptions.Default.WithArgs(args) -.ConfigureBuilder(x => -{ - x.WebHost.UseStartUrlsServer(x.Configuration); -} -)); diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/Properties/launchSettings.json b/Yi.Furion.Net6/Yi.Furion.Web.Entry/Properties/launchSettings.json deleted file mode 100644 index a7fab821..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Entry/Properties/launchSettings.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:53785", - "sslPort": 44342 - } - }, - "profiles": { - "Yi.Furion.Web.Entry": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "", - "applicationUrl": "http://localhost:19001", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/SingleFilePublish.cs b/Yi.Furion.Net6/Yi.Furion.Web.Entry/SingleFilePublish.cs deleted file mode 100644 index 91494e2b..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Entry/SingleFilePublish.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Furion; -using System.Reflection; - -namespace Yi.Furion.Web.Entry; - -public class SingleFilePublish : ISingleFilePublish -{ - public Assembly[] IncludeAssemblies() - { - return Array.Empty(); - } - - public string[] IncludeAssemblyNames() - { - return new[] - { - "Yi.Framework.Infrastructure", - "Yi.Framework.Module", - "Yi.Furion.Application", - "Yi.Furion.Core", - "Yi.Furion.Sqlsugar.Core", - "Yi.Furion.Core" - }; - } -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/Yi.Furion.Web.Entry.csproj b/Yi.Furion.Net6/Yi.Furion.Web.Entry/Yi.Furion.Web.Entry.csproj deleted file mode 100644 index 42369ca7..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Entry/Yi.Furion.Web.Entry.csproj +++ /dev/null @@ -1,71 +0,0 @@ - - - - - net6.0 - enable - en-US - true - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - Never - - - Always - - - Never - - - - - - - - - - - - - - - - Always - - - Always - - - Always - - - Always - - - - - - - - - diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/appsettings.json b/Yi.Furion.Net6/Yi.Furion.Web.Entry/appsettings.json deleted file mode 100644 index 35ad1856..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Entry/appsettings.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", - "Logging": { - "Monitor": { - "GlobalEnabled": true - }, - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning", - "Microsoft.EntityFrameworkCore": "Information" - } - }, - "AllowedHosts": "*", - - "StartUrl": "http://*:19001", - - - "[openapi:RBAC]": { - "Group": "RBAC", - "Order": 100, - "Title": "Yi框架-云端Api接口-RBAC", - "Description": "集大成者,终究轮子。【右上角切换模块】", - "Version": "v3.0.0", - "TermsOfService": "YI框架:https://ccnetcore.com与Furion:http://furion.baiqian.ltd", - "Contact": { - "Name": "橙子", - "Url": "https://ccnetcore.com", - "Email": "454313500@qq.com" - }, - "License": { - "Name": "MIT", - "Url": "https://gitee.com/ccnetcore/Yi/blob/furion/LICENSE" - } - - }, - - //数据库类型列表 - "DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ], - - "DbConnOptions": { - "Url": "DataSource=yi-furion-dev.db", - "DbType": "Sqlite", - "EnabledReadWrite": false, - "EnabledCodeFirst": true, - "ReadUrl": [ - "DataSource=[xxxx]", //Sqlite - "server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]", //Mysql - "Data Source=[xxxx];Initial Catalog=[xxxx];User ID=[xxxx];password=[xxxx]" //Sqlserver - ] - }, - - //是否开启种子数据 - "EnabledDataSeed": true, - - "JWTSettings": { - "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true - "IssuerSigningKey": "123456qwerty123456qwerty", // 密钥,string 类型,必须是复杂密钥,长度大于16 - "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true - "ValidIssuer": "ccnetcore", // 签发方,string 类型 - "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true - "ValidAudience": "ccnetcore", // 签收方,string 类型 - "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true - "ExpiredTime": 20, // 过期时间,long 类型,单位分钟,默认20分钟 - "ClockSkew": 5, // 过期时间容错值,long 类型,单位秒,默认 5秒 - "Algorithm": "HS256" // 加密算法,string 类型,默认 HS256 - }, - //阿里云短信 - "SmsAliyunOptions": { - "AccessKeyId": "", - "AccessKeySecret": "", - "SignName": "", - "TemplateCode": "", - "EnableFeature": false - }, - //redis缓存 - "CachingConnOptions": { - "Host": "", - "DB": "", - "Prot": "", - "Password": "" - } -} \ No newline at end of file diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/end.sh b/Yi.Furion.Net6/Yi.Furion.Web.Entry/end.sh deleted file mode 100644 index 5bd71440..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Entry/end.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -kill $(ps -aux | grep Yi.Furion.Web.Entry.dll | awk '{print $2}') -echo "Yi-进程已关闭" diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/start.sh b/Yi.Furion.Net6/Yi.Furion.Web.Entry/start.sh deleted file mode 100644 index b6f34508..00000000 --- a/Yi.Furion.Net6/Yi.Furion.Web.Entry/start.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -./end.sh -nohup dotnet Yi.Furion.Web.Entry.dll > /dev/null 2>&1 & -echo "Yi-启动成功!" diff --git a/Yi.Furion.Net6/Yi.Furion.sln b/Yi.Furion.Net6/Yi.Furion.sln deleted file mode 100644 index 8fd8996a..00000000 --- a/Yi.Furion.Net6/Yi.Furion.sln +++ /dev/null @@ -1,67 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.4.33213.308 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Furion.Application", "Yi.Furion.Application\Yi.Furion.Application.csproj", "{AB699EE9-43A8-46F2-A855-04A26DE63372}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Furion.Sqlsugar.Core", "Yi.Furion.Sqlsugar.Core\Yi.Furion.Sqlsugar.Core.csproj", "{4BD77E5C-138D-4F2D-B709-F9020F306AF3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Furion.Web.Core", "Yi.Furion.Web.Core\Yi.Furion.Web.Core.csproj", "{9D14BB78-DA2A-4040-B9DB-5A515B599181}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Furion.Core", "Yi.Furion.Core\Yi.Furion.Core.csproj", "{4FB30091-15C7-4FD9-AB7D-266814F360F5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Furion.Web.Entry", "Yi.Furion.Web.Entry\Yi.Furion.Web.Entry.csproj", "{C8D99F52-EDC7-411F-8300-6DB14BF59E8C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Infrastructure", "Yi.Framework.Infrastructure\Yi.Framework.Infrastructure.csproj", "{15F8DEB8-8A78-4DED-B588-4CFB2BCA14C9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Module", "Yi.Framework.Module\Yi.Framework.Module.csproj", "{C0D8C819-CBAA-47AF-A9CF-EA26B3A3D41E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "framework", "framework", "{9A8AB3CF-D8D4-4D38-BAB7-C37A43FE447C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AB699EE9-43A8-46F2-A855-04A26DE63372}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AB699EE9-43A8-46F2-A855-04A26DE63372}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AB699EE9-43A8-46F2-A855-04A26DE63372}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AB699EE9-43A8-46F2-A855-04A26DE63372}.Release|Any CPU.Build.0 = Release|Any CPU - {4BD77E5C-138D-4F2D-B709-F9020F306AF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4BD77E5C-138D-4F2D-B709-F9020F306AF3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4BD77E5C-138D-4F2D-B709-F9020F306AF3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4BD77E5C-138D-4F2D-B709-F9020F306AF3}.Release|Any CPU.Build.0 = Release|Any CPU - {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Release|Any CPU.Build.0 = Release|Any CPU - {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Release|Any CPU.Build.0 = Release|Any CPU - {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Release|Any CPU.Build.0 = Release|Any CPU - {15F8DEB8-8A78-4DED-B588-4CFB2BCA14C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {15F8DEB8-8A78-4DED-B588-4CFB2BCA14C9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {15F8DEB8-8A78-4DED-B588-4CFB2BCA14C9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {15F8DEB8-8A78-4DED-B588-4CFB2BCA14C9}.Release|Any CPU.Build.0 = Release|Any CPU - {C0D8C819-CBAA-47AF-A9CF-EA26B3A3D41E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C0D8C819-CBAA-47AF-A9CF-EA26B3A3D41E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C0D8C819-CBAA-47AF-A9CF-EA26B3A3D41E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C0D8C819-CBAA-47AF-A9CF-EA26B3A3D41E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {15F8DEB8-8A78-4DED-B588-4CFB2BCA14C9} = {9A8AB3CF-D8D4-4D38-BAB7-C37A43FE447C} - {C0D8C819-CBAA-47AF-A9CF-EA26B3A3D41E} = {9A8AB3CF-D8D4-4D38-BAB7-C37A43FE447C} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {B2073C2C-0FD3-452B-8047-8134D68E12CE} - EndGlobalSection -EndGlobal diff --git a/Yi.RuoYi.Vue3/.env.development b/Yi.RuoYi.Vue3/.env.development index 423fdb47..43b38371 100644 --- a/Yi.RuoYi.Vue3/.env.development +++ b/Yi.RuoYi.Vue3/.env.development @@ -11,10 +11,14 @@ VITE_APP_BASE_API = '/dev-api' VITE_APP_BASE_WS = '/dev-ws' #BBS -VITE_APP_BASE_URL='http://localhost:19001/api' +VITE_APP_BASE_URL='http://localhost:19001/api/app' + #RBAC # VITE_APP_BASE_URL='http://localhost:19001/api' +#长连接 +VITE_APP_BASE_URL_WS='http://localhost:19001/hub' + diff --git a/Yi.RuoYi.Vue3/package.json b/Yi.RuoYi.Vue3/package.json index 70de9e98..324f0be4 100644 --- a/Yi.RuoYi.Vue3/package.json +++ b/Yi.RuoYi.Vue3/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "2.0.0", + "version": "3.0.0", "description": "意框架管理系统", "author": "意框架", "license": "MIT", @@ -28,6 +28,7 @@ "json-bigint": "^1.0.0", "nprogress": "0.2.0", "pinia": "2.0.14", + "qs": "^6.11.2", "typeface-roboto": "^1.1.13", "vue": "3.2.37", "vue-cropper": "1.0.3", diff --git a/Yi.RuoYi.Vue3/src/App.vue b/Yi.RuoYi.Vue3/src/App.vue index 4e575d4c..5262a6f2 100644 --- a/Yi.RuoYi.Vue3/src/App.vue +++ b/Yi.RuoYi.Vue3/src/App.vue @@ -7,11 +7,12 @@ import useSettingsStore from '@/store/modules/settings' import { handleThemeStyle } from '@/utils/theme' import useUserStore from '@/store/modules/user' import { storeToRefs } from 'pinia'; -// import signalR from '@/utils/signalR' +import signalR from '@/utils/signalR' const {token}=storeToRefs(useUserStore()); -onMounted(() => { +onMounted(async () => { + await signalR.init(`main`); nextTick(() => { // 初始化主题样式 handleThemeStyle(useSettingsStore().theme) @@ -21,8 +22,7 @@ onMounted(() => { //这里还需要监视token的变化,重新进行signalr连接 watch(()=>token.value,async (newValue,oldValue)=>{ - // await signalR.close(); - // await signalR.start(); + await signalR.init(`main`); }) diff --git a/Yi.RuoYi.Vue3/src/api/system/config.js b/Yi.RuoYi.Vue3/src/api/system/config.js index 2071c0be..2ec55d1d 100644 --- a/Yi.RuoYi.Vue3/src/api/system/config.js +++ b/Yi.RuoYi.Vue3/src/api/system/config.js @@ -46,8 +46,9 @@ export function updateConfig(data) { // 删除参数配置 export function delConfig(configId) { return request({ - url: `/config/${configId}`, - method: 'delete' + url: `/config`, + method: 'delete', + params:{id:configId} }) } diff --git a/Yi.RuoYi.Vue3/src/api/system/dept.js b/Yi.RuoYi.Vue3/src/api/system/dept.js index 7a2721cc..09f83b6b 100644 --- a/Yi.RuoYi.Vue3/src/api/system/dept.js +++ b/Yi.RuoYi.Vue3/src/api/system/dept.js @@ -27,6 +27,7 @@ export function getDept(deptId) { // 新增部门 export function addDept(data) { + data.phone=data.phone==""?null:data.phone; return request({ url: '/dept', method: 'post', @@ -36,6 +37,7 @@ export function addDept(data) { // 修改部门 export function updateDept(data) { + data.phone=data.phone==""?null:data.phone; return request({ url: `/dept/${data.id}`, method: 'put', @@ -46,8 +48,9 @@ export function updateDept(data) { // 删除部门 export function delDept(deptId) { return request({ - url: `/dept/${deptId}`, - method: 'delete' + url: `/dept`, + method: 'delete', + params:{id:deptId} }) } diff --git a/Yi.RuoYi.Vue3/src/api/system/dict/data.js b/Yi.RuoYi.Vue3/src/api/system/dict/data.js index 5a7971df..0cdd167a 100644 --- a/Yi.RuoYi.Vue3/src/api/system/dict/data.js +++ b/Yi.RuoYi.Vue3/src/api/system/dict/data.js @@ -47,7 +47,8 @@ export function updateData(data) { export function delData(dictCode) { console.log(dictCode,"dictCode") return request({ - url: `/dictionary/${dictCode}`, - method: 'delete' + url: `/dictionary`, + method: 'delete', + params:{id:dictCode} }) } diff --git a/Yi.RuoYi.Vue3/src/api/system/dict/type.js b/Yi.RuoYi.Vue3/src/api/system/dict/type.js index cd4c4998..1e8d6285 100644 --- a/Yi.RuoYi.Vue3/src/api/system/dict/type.js +++ b/Yi.RuoYi.Vue3/src/api/system/dict/type.js @@ -38,8 +38,9 @@ export function updateType(data) { // 删除字典类型 export function delType(dictId) { return request({ - url: `/dictionary-type/${dictId}`, + url: `/dictionary-type`, method: 'delete', + params:{id:dictId} }) } diff --git a/Yi.RuoYi.Vue3/src/api/system/menu.js b/Yi.RuoYi.Vue3/src/api/system/menu.js index c9798803..03ff3ab7 100644 --- a/Yi.RuoYi.Vue3/src/api/system/menu.js +++ b/Yi.RuoYi.Vue3/src/api/system/menu.js @@ -2,6 +2,7 @@ import request from '@/utils/request' // 查询菜单列表 export function listMenu(query) { + console.log(query,"query") return request({ url: '/menu', method: 'get', @@ -28,13 +29,14 @@ export function treeselect() { // 根据角色ID查询菜单下拉树结构 export function roleMenuTreeselect(roleId) { return request({ - url: '/menu/list-role-id/' + roleId, + url: '/menu/role-id/' + roleId, method: 'get' }) } // 新增菜单 export function addMenu(data) { + return request({ url: '/menu', method: 'post', @@ -55,7 +57,8 @@ export function updateMenu(data) { export function delMenu(menuId) { return request({ - url: `/menu/${menuId}`, - method: 'delete' + url: `/menu`, + method: 'delete', + params:{id:menuId} }) } \ No newline at end of file diff --git a/Yi.RuoYi.Vue3/src/api/system/notice.js b/Yi.RuoYi.Vue3/src/api/system/notice.js index c274ea5b..cf4335ae 100644 --- a/Yi.RuoYi.Vue3/src/api/system/notice.js +++ b/Yi.RuoYi.Vue3/src/api/system/notice.js @@ -38,7 +38,8 @@ export function updateNotice(data) { // 删除公告 export function delNotice(noticeId) { return request({ - url: '/system/notice/' + noticeId, - method: 'delete' + url: '/system/notice', + method: 'delete', + params:{id:noticeId} }) } \ No newline at end of file diff --git a/Yi.RuoYi.Vue3/src/api/system/post.js b/Yi.RuoYi.Vue3/src/api/system/post.js index 5f1c7e04..4afd6562 100644 --- a/Yi.RuoYi.Vue3/src/api/system/post.js +++ b/Yi.RuoYi.Vue3/src/api/system/post.js @@ -38,8 +38,9 @@ export function updatePost(data) { // 删除岗位 export function delPost(postId) { return request({ - url: `/post/${postId}`, - method: 'delete' + url: `/post`, + method: 'delete', + params:{id:postId} }) } diff --git a/Yi.RuoYi.Vue3/src/api/system/role.js b/Yi.RuoYi.Vue3/src/api/system/role.js index e40cee8e..dc6da671 100644 --- a/Yi.RuoYi.Vue3/src/api/system/role.js +++ b/Yi.RuoYi.Vue3/src/api/system/role.js @@ -57,8 +57,9 @@ export function changeRoleStatus(roleId, isDel) { // 删除角色 export function delRole(roleId) { return request({ - url: `/role/${roleId}`, + url: `/role`, method: 'delete', + params:{id:roleId} }) } diff --git a/Yi.RuoYi.Vue3/src/api/system/user.js b/Yi.RuoYi.Vue3/src/api/system/user.js index 8302e52b..a28a182c 100644 --- a/Yi.RuoYi.Vue3/src/api/system/user.js +++ b/Yi.RuoYi.Vue3/src/api/system/user.js @@ -20,6 +20,7 @@ export function getUser(userId) { // 新增用户 export function addUser(data) { + data.phone=data.phone==""?null:data.phone; return request({ url: '/user', method: 'post', @@ -29,6 +30,7 @@ export function addUser(data) { // 修改用户 export function updateUser(id, data) { + data.phone=data.phone==""?null:data.phone; return request({ url: `/user/${id}`, method: 'put', @@ -39,8 +41,9 @@ export function updateUser(id, data) { // 删除用户 export function delUser(userId) { return request({ - url: `/user/${userId}`, + url: `/user`, method: 'delete', + params:{id:userId} }) } diff --git a/Yi.RuoYi.Vue3/src/components/Pagination/index.vue b/Yi.RuoYi.Vue3/src/components/Pagination/index.vue index 11af9602..f2de5aee 100644 --- a/Yi.RuoYi.Vue3/src/components/Pagination/index.vue +++ b/Yi.RuoYi.Vue3/src/components/Pagination/index.vue @@ -3,9 +3,9 @@ import('@/views/system/dict/data'), name: 'Data', meta: { title: '字典数据', activeMenu: '/system/dict' } diff --git a/Yi.RuoYi.Vue3/src/utils/request.js b/Yi.RuoYi.Vue3/src/utils/request.js index a3325e20..f64a7288 100644 --- a/Yi.RuoYi.Vue3/src/utils/request.js +++ b/Yi.RuoYi.Vue3/src/utils/request.js @@ -7,7 +7,7 @@ import cache from '@/plugins/cache' import { saveAs } from 'file-saver' import useUserStore from '@/store/modules/user' import JsonBig from 'json-bigint' - +import qs from 'qs' let downloadLoadingInstance; // 是否显示重新登录 @@ -20,6 +20,26 @@ const service = axios.create({ baseURL: import.meta.env.VITE_APP_BASE_API, // 超时 timeout: 10000, + //处理批零参数 + paramsSerializer:params => { + // return qs.stringify(params,{indices:false}) + console.log(params,"params") +// if(params.id!=undefined) +// { +// if(Array.isArray(params.id) ) +// { +// return "id="+params.id.join("&id=") +// } +// else +// { +// return "id="+params.id; +// } + +// } +// return request.param(params); +return qs.stringify(params, {arrayFormat: 'repeat'}); + }, + transformResponse: [data => { const json = JsonBig({ storeAsString: true @@ -87,21 +107,29 @@ service.interceptors.request.use(config => { // 响应拦截器 service.interceptors.response.use(res => { - // 二进制数据则直接返回 - if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { - return res.data - } - const code = res.data.statusCode || 200; - // 获取错误信息 - const msg = res.data.errors; - handler(code, msg); - return Promise.resolve(res.data); + // //如果code为200,不需要处理,直接返回数据即可 + // console.log(res,"res") + // // 二进制数据则直接返回 + // if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { + // return res.data + // } + + // const code = res.data.status || 200; + // // 获取错误信息 + // const msg = `${res.data.errors.message},详细信息:${details}` ; + + // handler(code, msg); + return Promise.resolve(res); }, error => { - const code = error.response.status; - const msg = error.message; + + console.log(error.response,"error") + const errorRes=error.response; + const code = errorRes.status || 200; + const msg = `${errorRes.data?.error?.message}` ; handler(code, msg); + return Promise.reject(error) } ) @@ -146,7 +174,12 @@ const handler = (code, msg) => { title: msg }) break; - + //接口异常 + case 400: + ElNotification.error({ + title: msg + }) + break; //未授权 case 401: ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { diff --git a/Yi.RuoYi.Vue3/src/utils/signalR.js b/Yi.RuoYi.Vue3/src/utils/signalR.js index ce90f0cf..1f765567 100644 --- a/Yi.RuoYi.Vue3/src/utils/signalR.js +++ b/Yi.RuoYi.Vue3/src/utils/signalR.js @@ -10,14 +10,27 @@ export default { SR: {}, // 失败连接重试次数 failNum: 4, - baseUrl: '', - init(url) { + async init(url) { const connection = new signalR.HubConnectionBuilder() - .withUrl(url, { - headers: { Authorization: `Bearer ${getToken()}` }}) + .withUrl(`${import.meta.env.VITE_APP_BASE_WS}/` + url, + { + headers: { + 'Authorization': `Bearer ${getToken()}` + }, + accessTokenFactory: () => { + // 返回授权 token + return `${getToken()}`; + } + } + ) + .withAutomaticReconnect()//自动重新连接 .configureLogging(signalR.LogLevel.Information) .build(); + + console.log(connection, "connection") + + this.SR = connection; // 断线重连 connection.onclose(async () => { @@ -32,16 +45,22 @@ export default { }) this.receiveMsg(connection); // 启动 - this.start(); + await this.start(); }, /** * 调用 this.signalR.start().then(async () => { await this.SR.invoke("method")}) * @returns */ -async close(){ - var that = this; - await this.SR.stop(); -}, + async close() { + try { + var that = this; + await this.SR.stop(); + } + catch + { + + } + }, async start() { @@ -49,6 +68,7 @@ async close(){ try { //使用async和await 或 promise的then 和catch 处理来自服务端的异常 + console.log(this.SR, "执行连接"); await this.SR.start(); //console.assert(this.SR.state === signalR.HubConnectionState.Connected); //console.log('signalR 连接成功了', this.SR.state); @@ -72,7 +92,7 @@ async close(){ }); connection.on("forceOut", (msg) => { useUserStore().logOut().then(() => { - ElMessage.error(msg); + alert(msg); location.href = '/index'; }) }); diff --git a/Yi.RuoYi.Vue3/src/views/ERP/material/index.vue b/Yi.RuoYi.Vue3/src/views/ERP/material/index.vue index 4c802781..458121a7 100644 --- a/Yi.RuoYi.Vue3/src/views/ERP/material/index.vue +++ b/Yi.RuoYi.Vue3/src/views/ERP/material/index.vue @@ -181,8 +181,8 @@ @@ -274,8 +274,8 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined }, @@ -295,7 +295,7 @@ listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -327,7 +327,7 @@ } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } diff --git a/Yi.RuoYi.Vue3/src/views/ERP/purchase/index.vue b/Yi.RuoYi.Vue3/src/views/ERP/purchase/index.vue index 40af68a8..f58334e7 100644 --- a/Yi.RuoYi.Vue3/src/views/ERP/purchase/index.vue +++ b/Yi.RuoYi.Vue3/src/views/ERP/purchase/index.vue @@ -251,8 +251,8 @@ @@ -425,8 +425,8 @@ @@ -560,15 +560,15 @@ const data = reactive({ purchaseDetails: [], }, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, buyer: undefined, }, queryMaterialParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -585,7 +585,7 @@ function getList() { listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -603,7 +603,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ @@ -687,7 +687,7 @@ function getMaterialList() { proxy.addDateRange(queryMaterialParams.value, dateRange.value) ).then((response) => { materialList.value = response.data.data; - materialTotal.value = response.data.total; + materialTotal.value = response.data.totalCount; }); } /** 表单改变选择 */ diff --git a/Yi.RuoYi.Vue3/src/views/ERP/stock/index.vue b/Yi.RuoYi.Vue3/src/views/ERP/stock/index.vue index 8ff6e8be..84ece9bf 100644 --- a/Yi.RuoYi.Vue3/src/views/ERP/stock/index.vue +++ b/Yi.RuoYi.Vue3/src/views/ERP/stock/index.vue @@ -175,8 +175,8 @@ @@ -253,8 +253,8 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -273,7 +273,7 @@ listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -291,7 +291,7 @@ } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/ERP/supplier/index.vue b/Yi.RuoYi.Vue3/src/views/ERP/supplier/index.vue index d90bec66..18035057 100644 --- a/Yi.RuoYi.Vue3/src/views/ERP/supplier/index.vue +++ b/Yi.RuoYi.Vue3/src/views/ERP/supplier/index.vue @@ -183,8 +183,8 @@ @@ -280,8 +280,8 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -300,7 +300,7 @@ listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -318,7 +318,7 @@ } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/ERP/unit/index.vue b/Yi.RuoYi.Vue3/src/views/ERP/unit/index.vue index 75cd66e7..551f54f0 100644 --- a/Yi.RuoYi.Vue3/src/views/ERP/unit/index.vue +++ b/Yi.RuoYi.Vue3/src/views/ERP/unit/index.vue @@ -175,8 +175,8 @@ @@ -253,8 +253,8 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -273,7 +273,7 @@ listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -291,7 +291,7 @@ } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/ERP/warehouse/index.vue b/Yi.RuoYi.Vue3/src/views/ERP/warehouse/index.vue index f23119cf..8fda6916 100644 --- a/Yi.RuoYi.Vue3/src/views/ERP/warehouse/index.vue +++ b/Yi.RuoYi.Vue3/src/views/ERP/warehouse/index.vue @@ -175,8 +175,8 @@ @@ -253,8 +253,8 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -273,7 +273,7 @@ listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -296,7 +296,7 @@ } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/bbs/article/index.vue b/Yi.RuoYi.Vue3/src/views/bbs/article/index.vue index 6dd0d8b1..58a94bf0 100644 --- a/Yi.RuoYi.Vue3/src/views/bbs/article/index.vue +++ b/Yi.RuoYi.Vue3/src/views/bbs/article/index.vue @@ -189,8 +189,8 @@ @@ -263,8 +263,8 @@ const articleId=ref(""); const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, title: undefined, isDeleted: undefined, }, @@ -282,7 +282,7 @@ function getList() { listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { articleList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -304,7 +304,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/erp/material/index.vue b/Yi.RuoYi.Vue3/src/views/erp/material/index.vue index 4c802781..458121a7 100644 --- a/Yi.RuoYi.Vue3/src/views/erp/material/index.vue +++ b/Yi.RuoYi.Vue3/src/views/erp/material/index.vue @@ -181,8 +181,8 @@ @@ -274,8 +274,8 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined }, @@ -295,7 +295,7 @@ listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -327,7 +327,7 @@ } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } diff --git a/Yi.RuoYi.Vue3/src/views/erp/purchase/index.vue b/Yi.RuoYi.Vue3/src/views/erp/purchase/index.vue index 40af68a8..f58334e7 100644 --- a/Yi.RuoYi.Vue3/src/views/erp/purchase/index.vue +++ b/Yi.RuoYi.Vue3/src/views/erp/purchase/index.vue @@ -251,8 +251,8 @@ @@ -425,8 +425,8 @@ @@ -560,15 +560,15 @@ const data = reactive({ purchaseDetails: [], }, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, buyer: undefined, }, queryMaterialParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -585,7 +585,7 @@ function getList() { listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -603,7 +603,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ @@ -687,7 +687,7 @@ function getMaterialList() { proxy.addDateRange(queryMaterialParams.value, dateRange.value) ).then((response) => { materialList.value = response.data.data; - materialTotal.value = response.data.total; + materialTotal.value = response.data.totalCount; }); } /** 表单改变选择 */ diff --git a/Yi.RuoYi.Vue3/src/views/erp/stock/index.vue b/Yi.RuoYi.Vue3/src/views/erp/stock/index.vue index 8ff6e8be..84ece9bf 100644 --- a/Yi.RuoYi.Vue3/src/views/erp/stock/index.vue +++ b/Yi.RuoYi.Vue3/src/views/erp/stock/index.vue @@ -175,8 +175,8 @@ @@ -253,8 +253,8 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -273,7 +273,7 @@ listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -291,7 +291,7 @@ } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/erp/supplier/index.vue b/Yi.RuoYi.Vue3/src/views/erp/supplier/index.vue index d90bec66..18035057 100644 --- a/Yi.RuoYi.Vue3/src/views/erp/supplier/index.vue +++ b/Yi.RuoYi.Vue3/src/views/erp/supplier/index.vue @@ -183,8 +183,8 @@ @@ -280,8 +280,8 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -300,7 +300,7 @@ listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -318,7 +318,7 @@ } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/erp/unit/index.vue b/Yi.RuoYi.Vue3/src/views/erp/unit/index.vue index 75cd66e7..551f54f0 100644 --- a/Yi.RuoYi.Vue3/src/views/erp/unit/index.vue +++ b/Yi.RuoYi.Vue3/src/views/erp/unit/index.vue @@ -175,8 +175,8 @@ @@ -253,8 +253,8 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -273,7 +273,7 @@ listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -291,7 +291,7 @@ } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/erp/warehouse/index.vue b/Yi.RuoYi.Vue3/src/views/erp/warehouse/index.vue index f23119cf..8fda6916 100644 --- a/Yi.RuoYi.Vue3/src/views/erp/warehouse/index.vue +++ b/Yi.RuoYi.Vue3/src/views/erp/warehouse/index.vue @@ -175,8 +175,8 @@ @@ -253,8 +253,8 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -273,7 +273,7 @@ listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.data; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -296,7 +296,7 @@ } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/login.vue b/Yi.RuoYi.Vue3/src/views/login.vue index f1d9a225..baed06c9 100644 --- a/Yi.RuoYi.Vue3/src/views/login.vue +++ b/Yi.RuoYi.Vue3/src/views/login.vue @@ -193,7 +193,9 @@ getCookie(); width: 33%; height: 40px; - float: right; + margin-left:auto; + border: 1px solid #DCDFE6 !important; + border-radius: 4px; img { @@ -214,7 +216,7 @@ getCookie(); letter-spacing: 1px; } .login-code-img { - height: 40px; - padding-left: 12px; + height: 100%; + width: 100%; } diff --git a/Yi.RuoYi.Vue3/src/views/monitor/job/index.vue b/Yi.RuoYi.Vue3/src/views/monitor/job/index.vue index 3c5864ee..d7e503dd 100644 --- a/Yi.RuoYi.Vue3/src/views/monitor/job/index.vue +++ b/Yi.RuoYi.Vue3/src/views/monitor/job/index.vue @@ -166,8 +166,8 @@ @@ -391,8 +391,8 @@ const IsAdd=ref(true); const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, JobId: undefined, jobGroup: undefined, status: undefined @@ -411,7 +411,7 @@ function getList() { loading.value = true; listJob(queryParams.value).then(response => { jobList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; }); } @@ -443,7 +443,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/monitor/job/log.vue b/Yi.RuoYi.Vue3/src/views/monitor/job/log.vue index 9c9d06d6..c1f67a4b 100644 --- a/Yi.RuoYi.Vue3/src/views/monitor/job/log.vue +++ b/Yi.RuoYi.Vue3/src/views/monitor/job/log.vue @@ -132,8 +132,8 @@ @@ -195,8 +195,8 @@ const route = useRoute(); const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, dictName: undefined, dictType: undefined, status: undefined @@ -221,7 +221,7 @@ function handleClose() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/monitor/logininfor/index.vue b/Yi.RuoYi.Vue3/src/views/monitor/logininfor/index.vue index ecb12a48..382e1801 100644 --- a/Yi.RuoYi.Vue3/src/views/monitor/logininfor/index.vue +++ b/Yi.RuoYi.Vue3/src/views/monitor/logininfor/index.vue @@ -100,15 +100,15 @@ - + - + @@ -116,8 +116,8 @@ @@ -142,8 +142,8 @@ const defaultSort = ref({ prop: "createTime", order: "descending" }); // 查询参数 const queryParams = ref({ - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, loginIp: undefined, loginUser: undefined, isDeleted: undefined, @@ -156,13 +156,13 @@ function getList() { loading.value = true; list(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => { logininforList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; }); } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/monitor/online/index.vue b/Yi.RuoYi.Vue3/src/views/monitor/online/index.vue index 9c45dfc5..e5599340 100644 --- a/Yi.RuoYi.Vue3/src/views/monitor/online/index.vue +++ b/Yi.RuoYi.Vue3/src/views/monitor/online/index.vue @@ -24,12 +24,12 @@ @@ -55,7 +55,7 @@ - + @@ -67,12 +67,12 @@ const { proxy } = getCurrentInstance(); const onlineList = ref([]); const loading = ref(true); const total = ref(0); -// const pageNum = ref(1); -// const pageSize = ref(10); +// const skipCount = ref(1); +// const maxResultCount = ref(10); const queryParams = ref({ - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, ipaddr: undefined, userName: undefined }); @@ -82,13 +82,13 @@ function getList() { loading.value = true; initData(queryParams.value).then(response => { onlineList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; }); } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/monitor/operlog/index.vue b/Yi.RuoYi.Vue3/src/views/monitor/operlog/index.vue index b3522056..774dfffd 100644 --- a/Yi.RuoYi.Vue3/src/views/monitor/operlog/index.vue +++ b/Yi.RuoYi.Vue3/src/views/monitor/operlog/index.vue @@ -105,9 +105,9 @@ - + @@ -125,8 +125,8 @@ @@ -135,7 +135,7 @@ - {{ form.title }} / {{ typeFormat(form) }} + {{ form.title }} {{ form.operUser }} / {{ form.operIp }} / {{ form.operLocation }} @@ -153,14 +153,14 @@ {{ form.requestResult }} - + - {{ parseTime(form.createTime) }} + {{ parseTime(form.creationTime) }} {{ form.errorMsg }} @@ -197,8 +197,8 @@ const defaultSort = ref({ prop: "operTime", order: "descending" }); const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, title: undefined, operUser: undefined, operType: undefined, @@ -213,7 +213,7 @@ function getList() { loading.value = true; list(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => { operlogList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; }); } @@ -223,7 +223,7 @@ function typeFormat(row, column) { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/system/config/index.vue b/Yi.RuoYi.Vue3/src/views/system/config/index.vue index 31fb467b..dd716605 100644 --- a/Yi.RuoYi.Vue3/src/views/system/config/index.vue +++ b/Yi.RuoYi.Vue3/src/views/system/config/index.vue @@ -134,8 +134,8 @@ @@ -194,8 +194,8 @@ const dateRange = ref([]); const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, configName: undefined, configKey: undefined, configType: undefined @@ -214,7 +214,7 @@ function getList() { loading.value = true; listConfig(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => { configList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; }); } @@ -238,7 +238,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/system/dict/data.vue b/Yi.RuoYi.Vue3/src/views/system/dict/data.vue index d4d5ee4c..d06f450b 100644 --- a/Yi.RuoYi.Vue3/src/views/system/dict/data.vue +++ b/Yi.RuoYi.Vue3/src/views/system/dict/data.vue @@ -128,8 +128,8 @@ @@ -213,8 +213,8 @@ const listClassOptions = ref([ const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, dictName: undefined, dictType: undefined, state: true @@ -248,7 +248,7 @@ function getList() { loading.value = true; listData(queryParams.value).then(response => { dataList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; }); } @@ -273,7 +273,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 返回按钮操作 */ @@ -350,6 +350,6 @@ function handleExport() { }, `dict_data_${new Date().getTime()}.xlsx`); } -getTypes(route.params && route.params.dictId); +getTypes(route.query && route.query.dictId); getTypeList(); diff --git a/Yi.RuoYi.Vue3/src/views/system/dict/index.vue b/Yi.RuoYi.Vue3/src/views/system/dict/index.vue index 60c69e35..a1998bea 100644 --- a/Yi.RuoYi.Vue3/src/views/system/dict/index.vue +++ b/Yi.RuoYi.Vue3/src/views/system/dict/index.vue @@ -107,9 +107,10 @@ @@ -145,8 +146,8 @@ @@ -181,6 +182,7 @@ diff --git a/Yi.RuoYi.Vue3/src/views/system/menu/index.vue b/Yi.RuoYi.Vue3/src/views/system/menu/index.vue index 8ffedc30..d9c84779 100644 --- a/Yi.RuoYi.Vue3/src/views/system/menu/index.vue +++ b/Yi.RuoYi.Vue3/src/views/system/menu/index.vue @@ -310,13 +310,14 @@ const refreshTable = ref(true); const showChooseIcon = ref(false); const iconSelectRef = ref(null); +const guidEmpty="00000000-0000-0000-0000-000000000000"; const data = reactive({ form: { }, queryParams: { menuName: undefined, - visible: undefined + visible: true }, rules: { menuName: [{ required: true, message: "菜单名称不能为空", trigger: "blur" }], @@ -330,6 +331,7 @@ const { queryParams, form, rules } = toRefs(data); /** 查询菜单列表 */ function getList() { loading.value = true; + console.log(queryParams.value,"queryParams.value"); listMenu(queryParams.value).then(response => { menuList.value = proxy.handleTree(response.data.items, "id"); loading.value = false; @@ -339,7 +341,7 @@ function getList() { function getTreeselect() { menuOptions.value = []; listMenu().then(response => { - const menu = { id: 0, menuName: "主类目", children: [] }; + const menu = { id: guidEmpty, menuName: "主类目", children: [] }; menu.children = proxy.handleTree(response.data.items, "id"); menuOptions.value.push(menu); }); @@ -353,7 +355,7 @@ function cancel() { function reset() { form.value = { id: undefined, - parentId: 0, + parentId: guidEmpty, menuName: undefined, menuIcon: undefined, menuType: 0, @@ -399,7 +401,7 @@ function handleAdd(row) { if (row != null && row.id) { form.value.parentId = row.id; } else { - form.value.parentId = 0; + form.value.parentId = "00000000-0000-0000-0000-000000000000"; } open.value = true; title.value = "添加菜单"; diff --git a/Yi.RuoYi.Vue3/src/views/system/notice/index.vue b/Yi.RuoYi.Vue3/src/views/system/notice/index.vue index a80baa5b..2d6e4c15 100644 --- a/Yi.RuoYi.Vue3/src/views/system/notice/index.vue +++ b/Yi.RuoYi.Vue3/src/views/system/notice/index.vue @@ -112,8 +112,8 @@ @@ -190,8 +190,8 @@ const title = ref(""); const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, noticeTitle: undefined, createBy: undefined, status: undefined @@ -231,7 +231,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/system/post/index.vue b/Yi.RuoYi.Vue3/src/views/system/post/index.vue index d4f24251..9d858263 100644 --- a/Yi.RuoYi.Vue3/src/views/system/post/index.vue +++ b/Yi.RuoYi.Vue3/src/views/system/post/index.vue @@ -112,8 +112,8 @@ @@ -167,8 +167,8 @@ const title = ref(""); const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, postCode: undefined, postName: undefined, state: undefined @@ -187,7 +187,7 @@ function getList() { loading.value = true; listPost(queryParams.value).then(response => { postList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; }); } @@ -210,7 +210,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/system/role/authUser.vue b/Yi.RuoYi.Vue3/src/views/system/role/authUser.vue index 58f7d112..f6657470 100644 --- a/Yi.RuoYi.Vue3/src/views/system/role/authUser.vue +++ b/Yi.RuoYi.Vue3/src/views/system/role/authUser.vue @@ -88,8 +88,8 @@ @@ -112,8 +112,8 @@ const total = ref(0); const userIds = ref([]); const queryParams = reactive({ - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, roleId: route.params.roleId, userName: undefined, phone: undefined, @@ -124,7 +124,7 @@ function getList() { loading.value = true; allocatedUserList(queryParams.roleId,queryParams).then(response => { userList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; }); } @@ -135,7 +135,7 @@ function handleClose() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.pageNum = 1; + queryParams.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/system/role/index.vue b/Yi.RuoYi.Vue3/src/views/system/role/index.vue index 9b7c7b41..2e2cd45d 100644 --- a/Yi.RuoYi.Vue3/src/views/system/role/index.vue +++ b/Yi.RuoYi.Vue3/src/views/system/role/index.vue @@ -82,7 +82,7 @@ - @@ -222,8 +222,8 @@ const data = reactive({ form: { }, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, roleName: undefined, roleCode: undefined, state: undefined, @@ -249,14 +249,14 @@ function getList() { listRole(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { roleList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/system/role/selectUser.vue b/Yi.RuoYi.Vue3/src/views/system/role/selectUser.vue index c300e0c8..f4e48d2f 100644 --- a/Yi.RuoYi.Vue3/src/views/system/role/selectUser.vue +++ b/Yi.RuoYi.Vue3/src/views/system/role/selectUser.vue @@ -44,8 +44,8 @@ @@ -76,8 +76,8 @@ const total = ref(0); const userIds = ref([]); const queryParams = reactive({ - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, roleId: undefined, userName: undefined, phone: undefined @@ -106,7 +106,7 @@ function getList() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.pageNum = 1; + queryParams.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/system/user/authRole.vue b/Yi.RuoYi.Vue3/src/views/system/user/authRole.vue index e5cfbf38..637b6b58 100644 --- a/Yi.RuoYi.Vue3/src/views/system/user/authRole.vue +++ b/Yi.RuoYi.Vue3/src/views/system/user/authRole.vue @@ -17,10 +17,10 @@

角色信息

- + @@ -34,7 +34,7 @@
- +
@@ -53,8 +53,8 @@ const { proxy } = getCurrentInstance(); const loading = ref(true); const total = ref(0); -const pageNum = ref(1); -const pageSize = ref(10); +const skipCount = ref(1); +const maxResultCount = ref(10); const roleIds = ref([]); const roles = ref([]); const form = ref({ diff --git a/Yi.RuoYi.Vue3/src/views/system/user/index.vue b/Yi.RuoYi.Vue3/src/views/system/user/index.vue index fa01ca09..7866d73a 100644 --- a/Yi.RuoYi.Vue3/src/views/system/user/index.vue +++ b/Yi.RuoYi.Vue3/src/views/system/user/index.vue @@ -107,8 +107,8 @@ - + @@ -291,8 +291,8 @@ const data = reactive({ form : { }, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, userName: undefined, phone: undefined, state: true, @@ -337,7 +337,7 @@ function getList() { loading.value = false; userList.value = res.data.items; - total.value = res.data.total; + total.value = res.data.totalCount; }); }; /** 节点单击事件 */ @@ -347,7 +347,7 @@ function handleNodeClick(data) { }; /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); }; /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/template.txt b/Yi.RuoYi.Vue3/src/views/template.txt index 78b91f1b..cb6cabde 100644 --- a/Yi.RuoYi.Vue3/src/views/template.txt +++ b/Yi.RuoYi.Vue3/src/views/template.txt @@ -110,8 +110,8 @@ - + @@ -175,8 +175,8 @@ const dateRange = ref([]); const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -195,7 +195,7 @@ function getList() { listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -213,7 +213,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/tool/gen/editTable.vue b/Yi.RuoYi.Vue3/src/views/tool/gen/editTable.vue index 6529e8ae..24a62ba2 100644 --- a/Yi.RuoYi.Vue3/src/views/tool/gen/editTable.vue +++ b/Yi.RuoYi.Vue3/src/views/tool/gen/editTable.vue @@ -176,7 +176,7 @@ function getFormPromise(form) { }); } function close() { - const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: route.query.pageNum } }; + const obj = { path: "/tool/gen", query: { t: Date.now(), skipCount: route.query.skipCount } }; proxy.$tab.closeOpenPage(obj); } diff --git a/Yi.RuoYi.Vue3/src/views/tool/gen/importTable.vue b/Yi.RuoYi.Vue3/src/views/tool/gen/importTable.vue index a16f2a2b..c83484af 100644 --- a/Yi.RuoYi.Vue3/src/views/tool/gen/importTable.vue +++ b/Yi.RuoYi.Vue3/src/views/tool/gen/importTable.vue @@ -34,8 +34,8 @@ @@ -58,8 +58,8 @@ const dbTableList = ref([]); const { proxy } = getCurrentInstance(); const queryParams = reactive({ - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, tableName: undefined, tableComment: undefined }); @@ -88,7 +88,7 @@ function getList() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.pageNum = 1; + queryParams.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/tool/gen/index.vue b/Yi.RuoYi.Vue3/src/views/tool/gen/index.vue index d75c6b87..48817785 100644 --- a/Yi.RuoYi.Vue3/src/views/tool/gen/index.vue +++ b/Yi.RuoYi.Vue3/src/views/tool/gen/index.vue @@ -79,7 +79,7 @@ @@ -193,8 +193,8 @@ const uniqueId = ref(""); const data = reactive({ queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, tableName: undefined, tableComment: undefined }, @@ -212,7 +212,7 @@ onActivated(() => { const time = route.query.t; if (time != null && time != uniqueId.value) { uniqueId.value = time; - queryParams.value.pageNum = Number(route.query.pageNum); + queryParams.value.skipCount = Number(route.query.skipCount); dateRange.value = []; proxy.resetForm("queryForm"); getList(); @@ -230,7 +230,7 @@ function getList() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 生成代码操作 */ @@ -289,7 +289,7 @@ function handleSelectionChange(selection) { /** 修改按钮操作 */ function handleEditTable(row) { const tableId = row.tableId || ids.value[0]; - router.push({ path: "/tool/gen-edit/index/" + tableId, query: { pageNum: queryParams.value.pageNum } }); + router.push({ path: "/tool/gen-edit/index/" + tableId, query: { skipCount: queryParams.value.skipCount } }); } /** 删除按钮操作 */ function handleDelete(row) { diff --git a/Yi.RuoYi.Vue3/src/views/webfirst/field/components/FieldList.vue b/Yi.RuoYi.Vue3/src/views/webfirst/field/components/FieldList.vue index dfb68f9c..1e8536bb 100644 --- a/Yi.RuoYi.Vue3/src/views/webfirst/field/components/FieldList.vue +++ b/Yi.RuoYi.Vue3/src/views/webfirst/field/components/FieldList.vue @@ -152,8 +152,8 @@ @@ -250,8 +250,8 @@ const data = reactive({ orderNum:0 }, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, // props.table.id }, @@ -293,7 +293,7 @@ function getList() { tableId: props.table.id, }).then((response) => { dataList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; }); } @@ -321,7 +321,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/webfirst/table/index.vue b/Yi.RuoYi.Vue3/src/views/webfirst/table/index.vue index e000b0b9..f5581ada 100644 --- a/Yi.RuoYi.Vue3/src/views/webfirst/table/index.vue +++ b/Yi.RuoYi.Vue3/src/views/webfirst/table/index.vue @@ -195,8 +195,8 @@ @@ -260,8 +260,8 @@ const dateRange = ref([]); const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, code: undefined, }, @@ -279,7 +279,7 @@ function getList() { listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -296,7 +296,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/src/views/webfirst/template/index.vue b/Yi.RuoYi.Vue3/src/views/webfirst/template/index.vue index 026119b2..83e08ea3 100644 --- a/Yi.RuoYi.Vue3/src/views/webfirst/template/index.vue +++ b/Yi.RuoYi.Vue3/src/views/webfirst/template/index.vue @@ -162,8 +162,8 @@ @@ -252,8 +252,8 @@ const dateRange = ref([]); const data = reactive({ form: {}, queryParams: { - pageNum: 1, - pageSize: 10, + skipCount: 1, + maxResultCount: 10, name: undefined, }, rules: { @@ -272,7 +272,7 @@ function getList() { listData(proxy.addDateRange(queryParams.value, dateRange.value)).then( (response) => { dataList.value = response.data.items; - total.value = response.data.total; + total.value = response.data.totalCount; loading.value = false; } ); @@ -289,7 +289,7 @@ function reset() { } /** 搜索按钮操作 */ function handleQuery() { - queryParams.value.pageNum = 1; + queryParams.value.skipCount = 1; getList(); } /** 重置按钮操作 */ diff --git a/Yi.RuoYi.Vue3/vite.config.js b/Yi.RuoYi.Vue3/vite.config.js index 0e9fb0ab..e6fd7574 100644 --- a/Yi.RuoYi.Vue3/vite.config.js +++ b/Yi.RuoYi.Vue3/vite.config.js @@ -5,7 +5,7 @@ import createVitePlugins from './vite/plugins' // https://vitejs.dev/config/ export default defineConfig(({ mode, command }) => { const env = loadEnv(mode, process.cwd()) - const { VITE_APP_ENV, VITE_APP_BASE_URL} = env + const { VITE_APP_ENV, VITE_APP_BASE_URL,VITE_APP_BASE_URL_WS} = env return { // 部署生产环境和开发环境下的URL。 // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 @@ -39,7 +39,7 @@ export default defineConfig(({ mode, command }) => { }, '/dev-ws': { - target: VITE_APP_BASE_URL, + target: VITE_APP_BASE_URL_WS, changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-ws/, ''), ws: true diff --git a/readme/1.png b/readme/1.png deleted file mode 100644 index 476268b4..00000000 Binary files a/readme/1.png and /dev/null differ diff --git a/readme/10.png b/readme/10.png deleted file mode 100644 index 50d74383..00000000 Binary files a/readme/10.png and /dev/null differ diff --git a/readme/1696760969217.jpg b/readme/1696760969217.jpg deleted file mode 100644 index fad52ebe..00000000 Binary files a/readme/1696760969217.jpg and /dev/null differ diff --git a/readme/1696761014270.jpg b/readme/1696761014270.jpg deleted file mode 100644 index 29e28e93..00000000 Binary files a/readme/1696761014270.jpg and /dev/null differ diff --git a/readme/2.png b/readme/2.png deleted file mode 100644 index 12a7c7ad..00000000 Binary files a/readme/2.png and /dev/null differ diff --git a/readme/3.png b/readme/3.png deleted file mode 100644 index 85ac88f2..00000000 Binary files a/readme/3.png and /dev/null differ diff --git a/readme/4.png b/readme/4.png deleted file mode 100644 index d7ac081f..00000000 Binary files a/readme/4.png and /dev/null differ diff --git a/readme/5.png b/readme/5.png deleted file mode 100644 index ea25ace3..00000000 Binary files a/readme/5.png and /dev/null differ diff --git a/readme/6.png b/readme/6.png deleted file mode 100644 index c67669d6..00000000 Binary files a/readme/6.png and /dev/null differ diff --git a/readme/7.png b/readme/7.png deleted file mode 100644 index 984c1297..00000000 Binary files a/readme/7.png and /dev/null differ diff --git a/readme/8.png b/readme/8.png deleted file mode 100644 index 10788d56..00000000 Binary files a/readme/8.png and /dev/null differ diff --git a/readme/9.png b/readme/9.png deleted file mode 100644 index bb6b1df9..00000000 Binary files a/readme/9.png and /dev/null differ diff --git a/readme/git提交规范.txt b/readme/git提交规范.txt deleted file mode 100644 index 77f5eaed..00000000 --- a/readme/git提交规范.txt +++ /dev/null @@ -1,12 +0,0 @@ -feat - 新功能 feature -fix - 修复 bug -docs - 文档注释 -style - 代码格式(不影响代码运行的变动) -refactor - 重构、优化(既不增加新功能,也不是修复bug) -perf - 性能优化 -test - 增加测试 -chore - 构建过程或辅助工具的变动 -revert - 回退 -build - 打包 - -