From c6371ba72ddff6fd05308a4999a2de6bd068c028 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com>
Date: Thu, 31 Mar 2022 21:22:17 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A1=86=E6=9E=B6=E7=BB=93?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CC.Yi.Old/CC.Yi.API/CC.Yi.API.csproj | 50 -
.../Controllers/StudentController.cs | 175 ---
.../CC.Yi.API/Extension/SwaggerExtension.cs | 76 -
CC.Yi.Old/CC.Yi.API/Filter/DbContextFilter.cs | 22 -
.../Migrations/20210319112041_yi1.Designer.cs | 40 -
.../Migrations/20210319112041_yi1.cs | 29 -
.../Migrations/20210320082935_yi2.Designer.cs | 40 -
.../Migrations/20210320082935_yi2.cs | 31 -
.../Migrations/20210325123550_yi3.Designer.cs | 93 --
.../Migrations/20210325123550_yi3.cs | 42 -
.../Migrations/20210325124241_yi4.Designer.cs | 301 ----
.../Migrations/20210325124241_yi4.cs | 315 ----
.../Migrations/20210410090937_yi5.Designer.cs | 40 -
.../Migrations/20210410090937_yi5.cs | 220 ---
.../Migrations/DataContextModelSnapshot.cs | 38 -
CC.Yi.Old/CC.Yi.API/Program.cs | 62 -
.../CC.Yi.API/Properties/launchSettings.json | 31 -
CC.Yi.Old/CC.Yi.API/Startup.cs | 164 ---
CC.Yi.Old/CC.Yi.API/T4Startup.cs | 23 -
CC.Yi.Old/CC.Yi.API/T4Startup.tt | 40 -
.../CC.Yi.API/appsettings.Development.json | 9 -
CC.Yi.Old/CC.Yi.API/appsettings.json | 17 -
CC.Yi.Old/CC.Yi.API/nlog.config | 35 -
CC.Yi.Old/CC.Yi.BLL/BaseBll.cs | 109 --
CC.Yi.Old/CC.Yi.BLL/CC.Yi.BLL.csproj | 32 -
CC.Yi.Old/CC.Yi.BLL/T4BLL.cs | 19 -
CC.Yi.Old/CC.Yi.BLL/T4BLL.tt | 37 -
CC.Yi.Old/CC.Yi.Common/CC.Yi.Common.csproj | 17 -
CC.Yi.Old/CC.Yi.Common/Cache/CacheHelper.cs | 51 -
CC.Yi.Old/CC.Yi.Common/Cache/ICacheWriter.cs | 18 -
CC.Yi.Old/CC.Yi.Common/Cache/RedisCache.cs | 48 -
.../CC.Yi.Common/Castle/CustomAutofacAop.cs | 23 -
CC.Yi.Old/CC.Yi.Common/HttpHelper.cs | 76 -
CC.Yi.Old/CC.Yi.Common/ImageHelper.cs | 167 ---
CC.Yi.Old/CC.Yi.Common/JsonHelper.cs | 24 -
CC.Yi.Old/CC.Yi.Common/Jwt/JwtConst.cs | 12 -
CC.Yi.Old/CC.Yi.Common/Result.cs | 40 -
CC.Yi.Old/CC.Yi.DAL/BaseDal.cs | 113 --
CC.Yi.Old/CC.Yi.DAL/CC.Yi.DAL.csproj | 31 -
CC.Yi.Old/CC.Yi.DAL/DbContentFactory.cs | 58 -
CC.Yi.Old/CC.Yi.DAL/T4DAL.cs | 12 -
CC.Yi.Old/CC.Yi.DAL/T4DAL.tt | 30 -
.../CC.Yi.DALFactory/CC.Yi.DALFactory.csproj | 40 -
CC.Yi.Old/CC.Yi.DALFactory/DbSession.cs | 45 -
.../CC.Yi.DALFactory/DbSessionFactory.cs | 35 -
.../CC.Yi.DALFactory/StaticDalFactory.cs | 24 -
CC.Yi.Old/CC.Yi.DALFactory/T4DbSession.cs | 18 -
CC.Yi.Old/CC.Yi.DALFactory/T4DbSession.tt | 36 -
.../CC.Yi.DALFactory/T4StaticDalFactory.cs | 25 -
.../CC.Yi.DALFactory/T4StaticDalFactory.tt | 43 -
CC.Yi.Old/CC.Yi.IBLL/CC.Yi.IBLL.csproj | 32 -
CC.Yi.Old/CC.Yi.IBLL/IBaseBll.cs | 78 -
CC.Yi.Old/CC.Yi.IBLL/T4IBLL.cs | 11 -
CC.Yi.Old/CC.Yi.IBLL/T4IBLL.tt | 29 -
CC.Yi.Old/CC.Yi.IDAL/CC.Yi.IDAL.csproj | 40 -
CC.Yi.Old/CC.Yi.IDAL/IBaseDal.cs | 69 -
CC.Yi.Old/CC.Yi.IDAL/IDbSession.cs | 18 -
CC.Yi.Old/CC.Yi.IDAL/T4IDAL.cs | 11 -
CC.Yi.Old/CC.Yi.IDAL/T4IDAL.tt | 29 -
CC.Yi.Old/CC.Yi.IDAL/T4IDbSession.cs | 15 -
CC.Yi.Old/CC.Yi.IDAL/T4IDbSession.tt | 33 -
CC.Yi.Old/CC.Yi.Model/CC.Yi.Model.csproj | 43 -
CC.Yi.Old/CC.Yi.Model/DataContext.cs | 14 -
CC.Yi.Old/CC.Yi.Model/T4DataContext.cs | 11 -
CC.Yi.Old/CC.Yi.Model/T4DataContext.tt | 29 -
CC.Yi.Old/CC.Yi.Model/result_user.cs | 13 -
CC.Yi.Old/CC.Yi.Model/student.cs | 16 -
.../CC.Yi.ViewModel/CC.Yi.ViewModel.csproj | 8 -
CC.Yi.Old/CC.Yi.sln | 94 --
CC.Yi.Old/T4Model/T4Model.txt | 1 -
CC.Yi.Old/T4Model/说明.txt | 5 -
CC.Yi/CC.Yi.API/CC.Yi.API.csproj | 51 -
.../Controllers/StudentController.cs | 147 --
.../CC.Yi.API/Extension/ErrorHandExtension.cs | 72 -
CC.Yi/CC.Yi.API/Extension/SwaggerExtension.cs | 76 -
CC.Yi/CC.Yi.API/Filter/DbContextFilter.cs | 21 -
CC.Yi/CC.Yi.API/Init/InitDb.cs | 71 -
CC.Yi/CC.Yi.API/Program.cs | 60 -
.../CC.Yi.API/Properties/launchSettings.json | 31 -
CC.Yi/CC.Yi.API/Startup.cs | 167 ---
CC.Yi/CC.Yi.API/T4Startup.cs | 23 -
CC.Yi/CC.Yi.API/T4Startup.tt | 40 -
CC.Yi/CC.Yi.API/YIDB.db | Bin 20480 -> 0 bytes
CC.Yi/CC.Yi.API/appsettings.Development.json | 9 -
CC.Yi/CC.Yi.API/appsettings.json | 14 -
CC.Yi/CC.Yi.API/nlog.config | 35 -
CC.Yi/CC.Yi.BLL/BaseBll.cs | 112 --
CC.Yi/CC.Yi.BLL/CC.Yi.BLL.csproj | 32 -
CC.Yi/CC.Yi.BLL/T4BLL.cs | 32 -
CC.Yi/CC.Yi.BLL/T4BLL.tt | 50 -
CC.Yi/CC.Yi.Common/CC.Yi.Common.csproj | 42 -
CC.Yi/CC.Yi.Common/Cache/CacheHelper.cs | 51 -
CC.Yi/CC.Yi.Common/Cache/ICacheWriter.cs | 18 -
CC.Yi/CC.Yi.Common/Cache/RedisCache.cs | 99 --
CC.Yi/CC.Yi.Common/Castle/CustomAutofacAop.cs | 23 -
CC.Yi/CC.Yi.Common/EmailHelper.cs | 113 --
CC.Yi/CC.Yi.Common/HttpHelper.cs | 76 -
.../Json/DatetimeJsonConverter.cs | 26 -
CC.Yi/CC.Yi.Common/Json/DefaultJsonOptions.cs | 24 -
CC.Yi/CC.Yi.Common/Json/EnumJsonConverter.cs | 38 -
.../Json/LowerCaseNamingPolicy.cs | 16 -
.../Json/TimeSpanJsonConverter.cs | 27 -
CC.Yi/CC.Yi.Common/JsonHelper.cs | 24 -
CC.Yi/CC.Yi.Common/Jwt/JwtConst.cs | 12 -
CC.Yi/CC.Yi.Common/LinqHelper.cs | 33 -
CC.Yi/CC.Yi.Common/RandomHelper.cs | 99 --
CC.Yi/CC.Yi.Common/Result.cs | 40 -
CC.Yi/CC.Yi.Common/T4Vue/T4Api.tt | 58 -
CC.Yi/CC.Yi.Common/T4Vue/T4Api.vue | 35 -
CC.Yi/CC.Yi.Common/T4Vue/T4Component.tt | 279 ----
CC.Yi/CC.Yi.Common/T4Vue/T4Component.vue | 237 ---
CC.Yi/CC.Yi.Common/T4Vue/T4Controller.cs | 59 -
CC.Yi/CC.Yi.Common/imageHelper.cs | 167 ---
CC.Yi/CC.Yi.Common/mongodb/model/student.cs | 13 -
CC.Yi/CC.Yi.Common/mongodb/mongodbContext.cs | 29 -
CC.Yi/CC.Yi.Common/settingHelper.cs | 48 -
CC.Yi/CC.Yi.DAL/BaseDal.cs | 122 --
CC.Yi/CC.Yi.DAL/CC.Yi.DAL.csproj | 31 -
CC.Yi/CC.Yi.DAL/T4DAL.cs | 17 -
CC.Yi/CC.Yi.DAL/T4DAL.tt | 35 -
CC.Yi/CC.Yi.IBLL/CC.Yi.IBLL.csproj | 32 -
CC.Yi/CC.Yi.IBLL/IBaseBll.cs | 82 --
CC.Yi/CC.Yi.IBLL/T4IBLL.cs | 13 -
CC.Yi/CC.Yi.IBLL/T4IBLL.tt | 31 -
CC.Yi/CC.Yi.IDAL/CC.Yi.IDAL.csproj | 31 -
CC.Yi/CC.Yi.IDAL/IBaseDal.cs | 75 -
CC.Yi/CC.Yi.IDAL/T4IDAL.cs | 11 -
CC.Yi/CC.Yi.IDAL/T4IDAL.tt | 29 -
CC.Yi/CC.Yi.Model/CC.Yi.Model.csproj | 34 -
CC.Yi/CC.Yi.Model/DataContext.cs | 13 -
.../Migrations/20210602114758_yi1.Designer.cs | 36 -
.../Migrations/20210602114758_yi1.cs | 29 -
.../Migrations/20210602115718_yi2.Designer.cs | 39 -
.../Migrations/20210602115718_yi2.cs | 24 -
.../Migrations/DataContextModelSnapshot.cs | 37 -
CC.Yi/CC.Yi.Model/T4DataContext.cs | 11 -
CC.Yi/CC.Yi.Model/T4DataContext.tt | 29 -
CC.Yi/CC.Yi.Model/baseModel.cs | 16 -
CC.Yi/CC.Yi.Model/student.cs | 13 -
CC.Yi/CC.Yi.ViewModel/CC.Yi.ViewModel.csproj | 8 -
CC.Yi/CC.Yi.ViewModel/Enum/DelFlagEnum.cs | 12 -
CC.Yi/CC.Yi.ViewModel/setByIds.cs | 12 -
CC.Yi/CC.Yi.sln | 87 --
CC.Yi/T4Model/T4Model.txt | 1 -
CC.Yi/T4Model/T4Vue.txt | 4 -
CC.Yi/T4Model/说明.txt | 5 -
.../Controllers/AccountController.cs | 222 ---
.../Controllers/FileController.cs | 92 --
.../Controllers/JobController.cs | 104 --
.../Controllers/MenuController.cs | 113 --
.../Controllers/MouldController.cs | 69 -
.../Controllers/RoleController.cs | 106 --
.../Controllers/SettingController.cs | 60 -
.../Controllers/UserController.cs | 147 --
.../Log4net.config | 65 -
.../Yi.Framework.ApiMicroservice/Program.cs | 44 -
.../Yi.Framework.ApiMicroservice/Startup.cs | 180 ---
.../SwaggerDoc.xml | 278 ----
.../Yi.Framework.ApiMicroservice.csproj | 39 -
.../wwwroot/Excel/Excel_20211102231510.xlsx | Bin 3014 -> 0 bytes
.../wwwroot/Excel/Excel_20211102232113.xlsx | Bin 3023 -> 0 bytes
.../0a5221e4-dca6-4d4e-8486-acf86822f2e4.jpg | Bin 47955 -> 0 bytes
.../1b0a926d-ddce-4048-9b09-e2b8ec37c161.jpg | Bin 30394 -> 0 bytes
.../3d6ed457-0c20-4ce6-b91c-8c424f2f03bb.jpeg | Bin 14035 -> 0 bytes
.../6312706b-7013-4aa5-af3c-0bbb6b3f4804.jpg | Bin 5869 -> 0 bytes
.../7ca98a58-8822-40f5-a766-2a2dd21d2431.jpg | Bin 30394 -> 0 bytes
.../966200f6-265c-4470-ad20-c91c3d84a1cc.jpg | Bin 47955 -> 0 bytes
.../feae1964-04ce-464b-848b-86f2245f3f63.jpeg | Bin 18821 -> 0 bytes
.../Controllers/WeatherForecastController.cs | 26 -
.../Program.cs | 26 -
.../Startup.cs | 59 -
.../Yi.Framework.AuthenticationCenter.csproj | 11 -
.../Yi.Framework.Common/Const/DbConst.cs | 16 -
.../Yi.Framework.Common/Const/FileConst.cs | 14 -
.../Yi.Framework.Common/Const/JobConst.cs | 17 -
.../Yi.Framework.Common/Const/JwtConst.cs | 12 -
.../Yi.Framework.Common/Const/RabbitConst.cs | 15 -
.../Yi.Framework.Common/Const/RedisConst.cs | 43 -
.../Helper/AssemblyHelper.cs | 22 -
.../Helper/Base32Helper.cs | 101 --
.../Helper/ConsoleHelper.cs | 54 -
.../Yi.Framework.Common/Helper/DateHelper.cs | 58 -
.../Yi.Framework.Common/Helper/EmailHelper.cs | 125 --
.../Yi.Framework.Common/Helper/ExcelHelper.cs | 60 -
.../Yi.Framework.Common/Helper/FileHelper.cs | 395 -----
.../Yi.Framework.Common/Helper/HtmlHelper.cs | 24 -
.../Yi.Framework.Common/Helper/HttpHelper.cs | 76 -
.../Yi.Framework.Common/Helper/IpHelper.cs | 51 -
.../Yi.Framework.Common/Helper/JsonHelper.cs | 509 -------
.../Yi.Framework.Common/Helper/MD5Hepler.cs | 67 -
.../Yi.Framework.Common/Helper/MimeHelper.cs | 244 ----
.../Yi.Framework.Common/Helper/RSAHelper.cs | 390 -----
.../Helper/RandomHelper.cs | 99 --
.../Helper/SerializeHelper.cs | 35 -
.../Helper/SnowflakeHelper.cs | 99 --
.../Helper/StringHelper.cs | 111 --
.../Helper/UnicodeHelper.cs | 47 -
.../Yi.Framework.Common/Helper/UrlHelper.cs | 23 -
.../Yi.Framework.Common/Helper/XmlHelper.cs | 51 -
.../IOCOptions/ConsulClientOption.cs | 16 -
.../IOCOptions/ConsulRegisterOption.cs | 44 -
.../IOCOptions/ElasticSearchOptions.cs | 14 -
.../IOCOptions/JWTTokenOptions.cs | 32 -
.../IOCOptions/KafkaOptions.cs | 14 -
.../IOCOptions/MySqlConnOptions.cs | 11 -
.../IOCOptions/RabbitMQOptions.cs | 90 --
.../IOCOptions/RedisConnOptions.cs | 18 -
.../IOCOptions/SMSOptions.cs | 18 -
.../IOCOptions/SqliteOptions.cs | 14 -
.../Models/AxiosUrlsModel.cs | 16 -
.../Models/Enum/AgrFlagEnum.cs | 12 -
.../Models/Enum/DelFlagEnum.cs | 12 -
.../Models/Enum/ShowFlagEnum.cs | 14 -
.../Models/Enum/TopFlagEnum.cs | 14 -
.../Models/Enum/WriteAndReadEnum.cs | 12 -
.../Yi.Framework.Common/Models/JobModel.cs | 13 -
.../Yi.Framework.Common/Models/LogModel.cs | 18 -
.../Yi.Framework.Common/Models/PageModel.cs | 13 -
.../Yi.Framework.Common/Models/Result.cs | 77 -
.../Models/SwaggerModel.cs | 19 -
.../QueueModel/OrderCreateQueueModel.cs | 41 -
.../QueueModel/SKUWarmupQueueModel.cs | 13 -
.../QueueModel/SMSQueueModel.cs | 14 -
.../QueueModel/SPUCQRSQueueModel.cs | 32 -
.../Yi.Framework.Common.csproj | 12 -
.../Yi.Framework.Core/CacheClientDB.cs | 1074 --------------
.../ClienExtend/AbstractConsulDispatcher.cs | 72 -
.../ClienExtend/AverageDispatcher.cs | 45 -
.../ClienExtend/PollingDispatcher.cs | 45 -
.../ClienExtend/WeightDispatcher.cs | 67 -
.../Yi.Framework.Core/ElasticSearchInvoker.cs | 53 -
.../Library/Microsoft.Bcl.AsyncInterfaces.dll | Bin 14920 -> 0 bytes
.../Library/ServiceStack.Common.dll | Bin 1039872 -> 0 bytes
.../Library/ServiceStack.Interfaces.dll | Bin 259584 -> 0 bytes
.../Library/ServiceStack.Redis.dll | Bin 872960 -> 0 bytes
.../Library/ServiceStack.Text.dll | Bin 658944 -> 0 bytes
.../Yi.Framework.Core/MakeJwt.cs | 63 -
.../Quartz/MyQuartzFactory.cs | 32 -
.../Yi.Framework.Core/Quartz/QuartzInvoker.cs | 150 --
.../Yi.Framework.Core/RabbitMQInvoker.cs | 257 ----
.../Yi.Framework.Core/SMS/AliyunSMSInvoker.cs | 46 -
.../Yi.Framework.Core/TreeMenuBuild.cs | 108 --
.../Yi.Framework.Core.csproj | 43 -
.../Yi.Framework.DTOModel/ChangePwdDto.cs | 15 -
.../Yi.Framework.DTOModel/ChildrenDto.cs | 14 -
.../Yi.Framework.DTOModel/IdsDto.cs | 23 -
.../Yi.Framework.DTOModel/SettingDto.cs | 16 -
.../Yi.Framework.DTOModel.csproj | 11 -
.../InitESIndexWorker.cs | 84 --
.../Log4net.config | 65 -
.../Program.cs | 68 -
.../WarmupESIndexWorker.cs | 79 -
.../Worker.cs | 29 -
...Yi.Framework.ElasticSearchProcessor.csproj | 36 -
.../Yi.Framework.Interface/IBaseService.cs | 87 --
.../Yi.Framework.Interface/IMenuService.cs | 43 -
.../Yi.Framework.Interface/IMouldService.cs | 22 -
.../Yi.Framework.Interface/IRoleService.cs | 47 -
.../Yi.Framework.Interface/IUserService.cs | 71 -
.../Yi.Framework.Interface/T4Iservice.cs | 40 -
.../Yi.Framework.Interface/T4Iservice.tt | 43 -
.../Yi - Backup.Framework.Interface.csproj | 19 -
.../Yi.Framework.Interface.csproj | 42 -
.../Yi.Framework.MSUnitTest/UnitTest1.cs | 13 -
.../Yi.Framework.MSUnitTest.csproj | 16 -
.../BaseModels/baseModel.cs | 18 -
.../BaseModels/loopModel.cs | 15 -
.../Yi.Framework.Model/DataContext.cs | 55 -
.../Migrations/20211106080544_ec1.Designer.cs | 219 ---
.../Migrations/20211106080544_ec1.cs | 17 -
.../Migrations/20211106080646_ec2.Designer.cs | 732 ----------
.../Migrations/20211106080646_ec2.cs | 436 ------
.../20211106082100_yi-1.Designer.cs | 248 ----
.../Migrations/20211106082100_yi-1.cs | 231 ---
.../Migrations/20211106084427_ec3.Designer.cs | 770 ----------
.../Migrations/20211106084427_ec3.cs | 1265 -----------------
.../Migrations/20211106110713_ec4.Designer.cs | 799 -----------
.../Migrations/20211106110713_ec4.cs | 161 ---
.../Migrations/DataContextModelSnapshot.cs | 797 -----------
.../ModelFactory/DbContextExtend.cs | 23 -
.../ModelFactory/DbContextFactory.cs | 100 --
.../ModelFactory/IDbContextFactory.cs | 13 -
.../Yi.Framework.Model/Models/menu.cs | 23 -
.../Yi.Framework.Model/Models/mould.cs | 14 -
.../Yi.Framework.Model/Models/role.cs | 18 -
.../Yi.Framework.Model/Models/user.cs | 27 -
.../Yi.Framework.Model/Models/visit.cs | 14 -
.../Yi.Framework.Model/Search/PageResult.cs | 20 -
.../Search/SearchRequest.cs | 39 -
.../Yi.Framework.Model/T4DataContext.cs | 18 -
.../Yi.Framework.Model/T4DataContext.tt | 40 -
.../Yi - Backup (1).Framework.Model.csproj | 59 -
.../Yi - Backup.Framework.Model.csproj | 23 -
.../Yi.Framework.Model.csproj | 59 -
.../Yi.Framework.OcelotGateway/Log4net.config | 65 -
.../Yi.Framework.OcelotGateway/Program.cs | 42 -
.../Yi.Framework.OcelotGateway/Startup.cs | 80 --
.../Yi.Framework.OcelotGateway/SwaggerDoc.xml | 8 -
.../Yi.Framework.OcelotGateway.csproj | 23 -
.../Controllers/PageDetaiController.cs | 25 -
.../Yi.Framework.PageDetail/Log4net.config | 65 -
.../Yi.Framework.PageDetail/Program.cs | 42 -
.../Yi.Framework.PageDetail/Startup.cs | 58 -
.../Yi.Framework.PageDetail/SwaggerDoc.xml | 8 -
.../Views/PageDetai/Index.cshtml | 90 --
.../Shared/_ValidationScriptsPartial.cshtml | 18 -
.../Yi.Framework.PageDetail.csproj | 33 -
.../Yi.Framework.SMSProcessor/Log4net.config | 65 -
.../Yi.Framework.SMSProcessor/Program.cs | 77 -
.../Yi.Framework.SMSProcessor/SendWorker.cs | 68 -
.../Yi.Framework.SMSProcessor/Worker.cs | 32 -
.../Yi.Framework.SMSProcessor.csproj | 38 -
.../Yi.Framework.Service/BaseService.cs | 136 --
.../Yi.Framework.Service/MenuService.cs | 73 -
.../Yi.Framework.Service/MouldService.cs | 25 -
.../Yi.Framework.Service/RoleService.cs | 65 -
.../Yi.Framework.Service/T4Service.cs | 103 --
.../Yi.Framework.Service/T4Service.tt | 58 -
.../Yi.Framework.Service/UserService.cs | 104 --
.../Yi - Backup.Framework.Service.csproj | 20 -
.../Yi.Framework.Service.csproj | 44 -
.../InitPageWorker.cs | 100 --
.../Log4net.config | 65 -
.../Program.cs | 67 -
.../WarmupPageWorker.cs | 133 --
.../Worker.cs | 32 -
.../Yi.Framework.StaticPageProcessor.csproj | 24 -
.../Yi.Framework.Task/HttpJob.cs | 44 -
.../Yi.Framework.Task/VisitJob.cs | 43 -
.../Yi.Framework.Task/Yi.Framework.Job.csproj | 16 -
.../Yi.Framework.WebCore/Appsettings.cs | 92 --
.../BuilderExtend/ApolloExtension.cs | 64 -
.../BuilderExtend/JsonExtension.cs | 22 -
.../BuilderExtend/JsonFileExtension.cs | 32 -
.../Yi.Framework.WebCore/CommonExtend.cs | 61 -
.../FilterExtend/CORSFilter.cs | 21 -
.../CustomAction2CommitFilterAttribute.cs | 83 --
.../CustomActionCacheFilterAttribute.cs | 33 -
.../CustomActionCheckFilterAttribute.cs | 42 -
.../CustomExceptionFilterAttribute.cs | 44 -
.../CustomIOCFilterFactoryAttribute.cs | 31 -
.../CustomResourceFilterAttribute.cs | 45 -
.../FilterExtend/LogActionFilterAttribute.cs | 83 --
.../Yi.Framework.WebCore/Init/DataSeed.cs | 258 ----
.../Yi.Framework.WebCore/Init/RedisInit.cs | 31 -
.../MiddlewareExtend/CAPExtend.cs | 59 -
.../MiddlewareExtend/ConsulRegiterExtend.cs | 61 -
.../MiddlewareExtend/CorsExtension.cs | 39 -
.../MiddlewareExtend/DbExtend.cs | 24 -
.../MiddlewareExtend/DbSeedInitExtend.cs | 36 -
.../MiddlewareExtend/ElasticSeachExtend.cs | 27 -
.../MiddlewareExtend/ErrorHandExtension.cs | 82 --
.../MiddlewareExtend/HealthCheckExtension.cs | 39 -
.../MiddlewareExtend/IocExtension.cs | 31 -
.../MiddlewareExtend/JwtExtension.cs | 39 -
.../PreOptionRequestExtension.cs | 47 -
.../MiddlewareExtend/QuartzExtensions.cs | 34 -
.../MiddlewareExtend/RabbitMQExtension.cs | 27 -
.../MiddlewareExtend/RedisExtension.cs | 26 -
.../MiddlewareExtend/RedisInitExtend.cs | 37 -
.../MiddlewareExtend/SMSExtension.cs | 29 -
.../MiddlewareExtend/StaticPageExtension.cs | 156 --
.../MiddlewareExtend/SwaggerExtension.cs | 124 --
.../Utility/CustomAutofacAop.cs | 21 -
.../Utility/CustomAutofacModule.cs | 88 --
.../Utility/CustomHostingStartup.cs | 54 -
.../Yi.Framework.WebCore.csproj | 34 -
Yi.Framework.Net5/Yi.Framework.sln | 143 --
368 files changed, 25704 deletions(-)
delete mode 100644 CC.Yi.Old/CC.Yi.API/CC.Yi.API.csproj
delete mode 100644 CC.Yi.Old/CC.Yi.API/Controllers/StudentController.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Extension/SwaggerExtension.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Filter/DbContextFilter.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/20210319112041_yi1.Designer.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/20210319112041_yi1.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/20210320082935_yi2.Designer.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/20210320082935_yi2.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/20210325123550_yi3.Designer.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/20210325123550_yi3.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/20210325124241_yi4.Designer.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/20210325124241_yi4.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/20210410090937_yi5.Designer.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/20210410090937_yi5.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Migrations/DataContextModelSnapshot.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Program.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/Properties/launchSettings.json
delete mode 100644 CC.Yi.Old/CC.Yi.API/Startup.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/T4Startup.cs
delete mode 100644 CC.Yi.Old/CC.Yi.API/T4Startup.tt
delete mode 100644 CC.Yi.Old/CC.Yi.API/appsettings.Development.json
delete mode 100644 CC.Yi.Old/CC.Yi.API/appsettings.json
delete mode 100644 CC.Yi.Old/CC.Yi.API/nlog.config
delete mode 100644 CC.Yi.Old/CC.Yi.BLL/BaseBll.cs
delete mode 100644 CC.Yi.Old/CC.Yi.BLL/CC.Yi.BLL.csproj
delete mode 100644 CC.Yi.Old/CC.Yi.BLL/T4BLL.cs
delete mode 100644 CC.Yi.Old/CC.Yi.BLL/T4BLL.tt
delete mode 100644 CC.Yi.Old/CC.Yi.Common/CC.Yi.Common.csproj
delete mode 100644 CC.Yi.Old/CC.Yi.Common/Cache/CacheHelper.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Common/Cache/ICacheWriter.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Common/Cache/RedisCache.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Common/Castle/CustomAutofacAop.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Common/HttpHelper.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Common/ImageHelper.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Common/JsonHelper.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Common/Jwt/JwtConst.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Common/Result.cs
delete mode 100644 CC.Yi.Old/CC.Yi.DAL/BaseDal.cs
delete mode 100644 CC.Yi.Old/CC.Yi.DAL/CC.Yi.DAL.csproj
delete mode 100644 CC.Yi.Old/CC.Yi.DAL/DbContentFactory.cs
delete mode 100644 CC.Yi.Old/CC.Yi.DAL/T4DAL.cs
delete mode 100644 CC.Yi.Old/CC.Yi.DAL/T4DAL.tt
delete mode 100644 CC.Yi.Old/CC.Yi.DALFactory/CC.Yi.DALFactory.csproj
delete mode 100644 CC.Yi.Old/CC.Yi.DALFactory/DbSession.cs
delete mode 100644 CC.Yi.Old/CC.Yi.DALFactory/DbSessionFactory.cs
delete mode 100644 CC.Yi.Old/CC.Yi.DALFactory/StaticDalFactory.cs
delete mode 100644 CC.Yi.Old/CC.Yi.DALFactory/T4DbSession.cs
delete mode 100644 CC.Yi.Old/CC.Yi.DALFactory/T4DbSession.tt
delete mode 100644 CC.Yi.Old/CC.Yi.DALFactory/T4StaticDalFactory.cs
delete mode 100644 CC.Yi.Old/CC.Yi.DALFactory/T4StaticDalFactory.tt
delete mode 100644 CC.Yi.Old/CC.Yi.IBLL/CC.Yi.IBLL.csproj
delete mode 100644 CC.Yi.Old/CC.Yi.IBLL/IBaseBll.cs
delete mode 100644 CC.Yi.Old/CC.Yi.IBLL/T4IBLL.cs
delete mode 100644 CC.Yi.Old/CC.Yi.IBLL/T4IBLL.tt
delete mode 100644 CC.Yi.Old/CC.Yi.IDAL/CC.Yi.IDAL.csproj
delete mode 100644 CC.Yi.Old/CC.Yi.IDAL/IBaseDal.cs
delete mode 100644 CC.Yi.Old/CC.Yi.IDAL/IDbSession.cs
delete mode 100644 CC.Yi.Old/CC.Yi.IDAL/T4IDAL.cs
delete mode 100644 CC.Yi.Old/CC.Yi.IDAL/T4IDAL.tt
delete mode 100644 CC.Yi.Old/CC.Yi.IDAL/T4IDbSession.cs
delete mode 100644 CC.Yi.Old/CC.Yi.IDAL/T4IDbSession.tt
delete mode 100644 CC.Yi.Old/CC.Yi.Model/CC.Yi.Model.csproj
delete mode 100644 CC.Yi.Old/CC.Yi.Model/DataContext.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Model/T4DataContext.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Model/T4DataContext.tt
delete mode 100644 CC.Yi.Old/CC.Yi.Model/result_user.cs
delete mode 100644 CC.Yi.Old/CC.Yi.Model/student.cs
delete mode 100644 CC.Yi.Old/CC.Yi.ViewModel/CC.Yi.ViewModel.csproj
delete mode 100644 CC.Yi.Old/CC.Yi.sln
delete mode 100644 CC.Yi.Old/T4Model/T4Model.txt
delete mode 100644 CC.Yi.Old/T4Model/说明.txt
delete mode 100644 CC.Yi/CC.Yi.API/CC.Yi.API.csproj
delete mode 100644 CC.Yi/CC.Yi.API/Controllers/StudentController.cs
delete mode 100644 CC.Yi/CC.Yi.API/Extension/ErrorHandExtension.cs
delete mode 100644 CC.Yi/CC.Yi.API/Extension/SwaggerExtension.cs
delete mode 100644 CC.Yi/CC.Yi.API/Filter/DbContextFilter.cs
delete mode 100644 CC.Yi/CC.Yi.API/Init/InitDb.cs
delete mode 100644 CC.Yi/CC.Yi.API/Program.cs
delete mode 100644 CC.Yi/CC.Yi.API/Properties/launchSettings.json
delete mode 100644 CC.Yi/CC.Yi.API/Startup.cs
delete mode 100644 CC.Yi/CC.Yi.API/T4Startup.cs
delete mode 100644 CC.Yi/CC.Yi.API/T4Startup.tt
delete mode 100644 CC.Yi/CC.Yi.API/YIDB.db
delete mode 100644 CC.Yi/CC.Yi.API/appsettings.Development.json
delete mode 100644 CC.Yi/CC.Yi.API/appsettings.json
delete mode 100644 CC.Yi/CC.Yi.API/nlog.config
delete mode 100644 CC.Yi/CC.Yi.BLL/BaseBll.cs
delete mode 100644 CC.Yi/CC.Yi.BLL/CC.Yi.BLL.csproj
delete mode 100644 CC.Yi/CC.Yi.BLL/T4BLL.cs
delete mode 100644 CC.Yi/CC.Yi.BLL/T4BLL.tt
delete mode 100644 CC.Yi/CC.Yi.Common/CC.Yi.Common.csproj
delete mode 100644 CC.Yi/CC.Yi.Common/Cache/CacheHelper.cs
delete mode 100644 CC.Yi/CC.Yi.Common/Cache/ICacheWriter.cs
delete mode 100644 CC.Yi/CC.Yi.Common/Cache/RedisCache.cs
delete mode 100644 CC.Yi/CC.Yi.Common/Castle/CustomAutofacAop.cs
delete mode 100644 CC.Yi/CC.Yi.Common/EmailHelper.cs
delete mode 100644 CC.Yi/CC.Yi.Common/HttpHelper.cs
delete mode 100644 CC.Yi/CC.Yi.Common/Json/DatetimeJsonConverter.cs
delete mode 100644 CC.Yi/CC.Yi.Common/Json/DefaultJsonOptions.cs
delete mode 100644 CC.Yi/CC.Yi.Common/Json/EnumJsonConverter.cs
delete mode 100644 CC.Yi/CC.Yi.Common/Json/LowerCaseNamingPolicy.cs
delete mode 100644 CC.Yi/CC.Yi.Common/Json/TimeSpanJsonConverter.cs
delete mode 100644 CC.Yi/CC.Yi.Common/JsonHelper.cs
delete mode 100644 CC.Yi/CC.Yi.Common/Jwt/JwtConst.cs
delete mode 100644 CC.Yi/CC.Yi.Common/LinqHelper.cs
delete mode 100644 CC.Yi/CC.Yi.Common/RandomHelper.cs
delete mode 100644 CC.Yi/CC.Yi.Common/Result.cs
delete mode 100644 CC.Yi/CC.Yi.Common/T4Vue/T4Api.tt
delete mode 100644 CC.Yi/CC.Yi.Common/T4Vue/T4Api.vue
delete mode 100644 CC.Yi/CC.Yi.Common/T4Vue/T4Component.tt
delete mode 100644 CC.Yi/CC.Yi.Common/T4Vue/T4Component.vue
delete mode 100644 CC.Yi/CC.Yi.Common/T4Vue/T4Controller.cs
delete mode 100644 CC.Yi/CC.Yi.Common/imageHelper.cs
delete mode 100644 CC.Yi/CC.Yi.Common/mongodb/model/student.cs
delete mode 100644 CC.Yi/CC.Yi.Common/mongodb/mongodbContext.cs
delete mode 100644 CC.Yi/CC.Yi.Common/settingHelper.cs
delete mode 100644 CC.Yi/CC.Yi.DAL/BaseDal.cs
delete mode 100644 CC.Yi/CC.Yi.DAL/CC.Yi.DAL.csproj
delete mode 100644 CC.Yi/CC.Yi.DAL/T4DAL.cs
delete mode 100644 CC.Yi/CC.Yi.DAL/T4DAL.tt
delete mode 100644 CC.Yi/CC.Yi.IBLL/CC.Yi.IBLL.csproj
delete mode 100644 CC.Yi/CC.Yi.IBLL/IBaseBll.cs
delete mode 100644 CC.Yi/CC.Yi.IBLL/T4IBLL.cs
delete mode 100644 CC.Yi/CC.Yi.IBLL/T4IBLL.tt
delete mode 100644 CC.Yi/CC.Yi.IDAL/CC.Yi.IDAL.csproj
delete mode 100644 CC.Yi/CC.Yi.IDAL/IBaseDal.cs
delete mode 100644 CC.Yi/CC.Yi.IDAL/T4IDAL.cs
delete mode 100644 CC.Yi/CC.Yi.IDAL/T4IDAL.tt
delete mode 100644 CC.Yi/CC.Yi.Model/CC.Yi.Model.csproj
delete mode 100644 CC.Yi/CC.Yi.Model/DataContext.cs
delete mode 100644 CC.Yi/CC.Yi.Model/Migrations/20210602114758_yi1.Designer.cs
delete mode 100644 CC.Yi/CC.Yi.Model/Migrations/20210602114758_yi1.cs
delete mode 100644 CC.Yi/CC.Yi.Model/Migrations/20210602115718_yi2.Designer.cs
delete mode 100644 CC.Yi/CC.Yi.Model/Migrations/20210602115718_yi2.cs
delete mode 100644 CC.Yi/CC.Yi.Model/Migrations/DataContextModelSnapshot.cs
delete mode 100644 CC.Yi/CC.Yi.Model/T4DataContext.cs
delete mode 100644 CC.Yi/CC.Yi.Model/T4DataContext.tt
delete mode 100644 CC.Yi/CC.Yi.Model/baseModel.cs
delete mode 100644 CC.Yi/CC.Yi.Model/student.cs
delete mode 100644 CC.Yi/CC.Yi.ViewModel/CC.Yi.ViewModel.csproj
delete mode 100644 CC.Yi/CC.Yi.ViewModel/Enum/DelFlagEnum.cs
delete mode 100644 CC.Yi/CC.Yi.ViewModel/setByIds.cs
delete mode 100644 CC.Yi/CC.Yi.sln
delete mode 100644 CC.Yi/T4Model/T4Model.txt
delete mode 100644 CC.Yi/T4Model/T4Vue.txt
delete mode 100644 CC.Yi/T4Model/说明.txt
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Controllers/AccountController.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Controllers/FileController.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Controllers/JobController.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Controllers/MouldController.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Controllers/RoleController.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Controllers/SettingController.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Controllers/UserController.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Log4net.config
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Program.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Startup.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/SwaggerDoc.xml
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/wwwroot/Excel/Excel_20211102231510.xlsx
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/wwwroot/Excel/Excel_20211102232113.xlsx
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/wwwroot/image/0a5221e4-dca6-4d4e-8486-acf86822f2e4.jpg
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/wwwroot/image/1b0a926d-ddce-4048-9b09-e2b8ec37c161.jpg
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/wwwroot/image/3d6ed457-0c20-4ce6-b91c-8c424f2f03bb.jpeg
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/wwwroot/image/6312706b-7013-4aa5-af3c-0bbb6b3f4804.jpg
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/wwwroot/image/7ca98a58-8822-40f5-a766-2a2dd21d2431.jpg
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/wwwroot/image/966200f6-265c-4470-ad20-c91c3d84a1cc.jpg
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ApiMicroservice/wwwroot/image/feae1964-04ce-464b-848b-86f2245f3f63.jpeg
delete mode 100644 Yi.Framework.Net5/Yi.Framework.AuthenticationCenter/Controllers/WeatherForecastController.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.AuthenticationCenter/Program.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.AuthenticationCenter/Startup.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.AuthenticationCenter/Yi.Framework.AuthenticationCenter.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Const/DbConst.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Const/FileConst.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Const/JobConst.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Const/JwtConst.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Const/RabbitConst.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Const/RedisConst.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/AssemblyHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/Base32Helper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/ConsoleHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/DateHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/EmailHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/ExcelHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/FileHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/HtmlHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/HttpHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/IpHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/JsonHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/MD5Hepler.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/MimeHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/RSAHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/RandomHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/SerializeHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/SnowflakeHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/StringHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/UnicodeHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/UrlHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Helper/XmlHelper.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/IOCOptions/ConsulClientOption.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/IOCOptions/ConsulRegisterOption.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/IOCOptions/ElasticSearchOptions.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/IOCOptions/JWTTokenOptions.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/IOCOptions/KafkaOptions.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/IOCOptions/MySqlConnOptions.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/IOCOptions/RabbitMQOptions.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/IOCOptions/RedisConnOptions.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/IOCOptions/SMSOptions.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/IOCOptions/SqliteOptions.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/AxiosUrlsModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/Enum/AgrFlagEnum.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/Enum/DelFlagEnum.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/Enum/ShowFlagEnum.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/Enum/TopFlagEnum.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/Enum/WriteAndReadEnum.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/JobModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/LogModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/PageModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/Result.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Models/SwaggerModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/QueueModel/OrderCreateQueueModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/QueueModel/SKUWarmupQueueModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/QueueModel/SMSQueueModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/QueueModel/SPUCQRSQueueModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Common/Yi.Framework.Common.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/CacheClientDB.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/ConsulExtend/ClienExtend/AbstractConsulDispatcher.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/ConsulExtend/ClienExtend/AverageDispatcher.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/ConsulExtend/ClienExtend/PollingDispatcher.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/ConsulExtend/ClienExtend/WeightDispatcher.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/ElasticSearchInvoker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/Library/Microsoft.Bcl.AsyncInterfaces.dll
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/Library/ServiceStack.Common.dll
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/Library/ServiceStack.Interfaces.dll
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/Library/ServiceStack.Redis.dll
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/Library/ServiceStack.Text.dll
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/MakeJwt.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/Quartz/MyQuartzFactory.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/Quartz/QuartzInvoker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/RabbitMQInvoker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/SMS/AliyunSMSInvoker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/TreeMenuBuild.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Core/Yi.Framework.Core.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.DTOModel/ChangePwdDto.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.DTOModel/ChildrenDto.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.DTOModel/IdsDto.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.DTOModel/SettingDto.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.DTOModel/Yi.Framework.DTOModel.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ElasticSearchProcessor/InitESIndexWorker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ElasticSearchProcessor/Log4net.config
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ElasticSearchProcessor/Program.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ElasticSearchProcessor/WarmupESIndexWorker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ElasticSearchProcessor/Worker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.ElasticSearchProcessor/Yi.Framework.ElasticSearchProcessor.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Interface/IBaseService.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Interface/IMenuService.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Interface/IMouldService.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Interface/IRoleService.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Interface/IUserService.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Interface/T4Iservice.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Interface/T4Iservice.tt
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Interface/Yi - Backup.Framework.Interface.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Interface/Yi.Framework.Interface.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.MSUnitTest/UnitTest1.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.MSUnitTest/Yi.Framework.MSUnitTest.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/BaseModels/baseModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/BaseModels/loopModel.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/DataContext.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/20211106080544_ec1.Designer.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/20211106080544_ec1.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/20211106080646_ec2.Designer.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/20211106080646_ec2.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/20211106082100_yi-1.Designer.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/20211106082100_yi-1.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/20211106084427_ec3.Designer.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/20211106084427_ec3.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/20211106110713_ec4.Designer.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/20211106110713_ec4.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Migrations/DataContextModelSnapshot.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/ModelFactory/DbContextExtend.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/ModelFactory/DbContextFactory.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/ModelFactory/IDbContextFactory.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Models/menu.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Models/mould.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Models/role.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Models/user.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Models/visit.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Search/PageResult.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Search/SearchRequest.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/T4DataContext.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/T4DataContext.tt
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Yi - Backup (1).Framework.Model.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Yi - Backup.Framework.Model.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Model/Yi.Framework.Model.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.OcelotGateway/Log4net.config
delete mode 100644 Yi.Framework.Net5/Yi.Framework.OcelotGateway/Program.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.OcelotGateway/Startup.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.OcelotGateway/SwaggerDoc.xml
delete mode 100644 Yi.Framework.Net5/Yi.Framework.OcelotGateway/Yi.Framework.OcelotGateway.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.PageDetail/Controllers/PageDetaiController.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.PageDetail/Log4net.config
delete mode 100644 Yi.Framework.Net5/Yi.Framework.PageDetail/Program.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.PageDetail/Startup.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.PageDetail/SwaggerDoc.xml
delete mode 100644 Yi.Framework.Net5/Yi.Framework.PageDetail/Views/PageDetai/Index.cshtml
delete mode 100644 Yi.Framework.Net5/Yi.Framework.PageDetail/Views/Shared/_ValidationScriptsPartial.cshtml
delete mode 100644 Yi.Framework.Net5/Yi.Framework.PageDetail/Yi.Framework.PageDetail.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.SMSProcessor/Log4net.config
delete mode 100644 Yi.Framework.Net5/Yi.Framework.SMSProcessor/Program.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.SMSProcessor/SendWorker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.SMSProcessor/Worker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.SMSProcessor/Yi.Framework.SMSProcessor.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Service/BaseService.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Service/MenuService.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Service/MouldService.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Service/RoleService.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Service/T4Service.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Service/T4Service.tt
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Service/UserService.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Service/Yi - Backup.Framework.Service.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Service/Yi.Framework.Service.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.StaticPageProcessor/InitPageWorker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.StaticPageProcessor/Log4net.config
delete mode 100644 Yi.Framework.Net5/Yi.Framework.StaticPageProcessor/Program.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.StaticPageProcessor/WarmupPageWorker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.StaticPageProcessor/Worker.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.StaticPageProcessor/Yi.Framework.StaticPageProcessor.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Task/HttpJob.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Task/VisitJob.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.Task/Yi.Framework.Job.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/Appsettings.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/BuilderExtend/ApolloExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/BuilderExtend/JsonExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/BuilderExtend/JsonFileExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/CommonExtend.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/FilterExtend/CORSFilter.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/FilterExtend/CustomAction2CommitFilterAttribute.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/FilterExtend/CustomActionCacheFilterAttribute.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/FilterExtend/CustomActionCheckFilterAttribute.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/FilterExtend/CustomExceptionFilterAttribute.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/FilterExtend/CustomIOCFilterFactoryAttribute.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/FilterExtend/CustomResourceFilterAttribute.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/FilterExtend/LogActionFilterAttribute.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/Init/DataSeed.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/Init/RedisInit.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/CAPExtend.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/ConsulRegiterExtend.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/CorsExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/DbExtend.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/DbSeedInitExtend.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/ElasticSeachExtend.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/ErrorHandExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/HealthCheckExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/IocExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/JwtExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/PreOptionRequestExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/QuartzExtensions.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/RabbitMQExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/RedisExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/RedisInitExtend.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/SMSExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/StaticPageExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/MiddlewareExtend/SwaggerExtension.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/Utility/CustomAutofacAop.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/Utility/CustomAutofacModule.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/Utility/CustomHostingStartup.cs
delete mode 100644 Yi.Framework.Net5/Yi.Framework.WebCore/Yi.Framework.WebCore.csproj
delete mode 100644 Yi.Framework.Net5/Yi.Framework.sln
diff --git a/CC.Yi.Old/CC.Yi.API/CC.Yi.API.csproj b/CC.Yi.Old/CC.Yi.API/CC.Yi.API.csproj
deleted file mode 100644
index 6b3e84cf..00000000
--- a/CC.Yi.Old/CC.Yi.API/CC.Yi.API.csproj
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
- net5.0
-
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
-
-
-
-
-
-
- Always
-
-
-
-
-
-
-
-
-
- True
- True
- T4Startup.tt
-
-
-
-
-
- TextTemplatingFileGenerator
- T4Startup.cs
-
-
-
-
diff --git a/CC.Yi.Old/CC.Yi.API/Controllers/StudentController.cs b/CC.Yi.Old/CC.Yi.API/Controllers/StudentController.cs
deleted file mode 100644
index ecbe8d2f..00000000
--- a/CC.Yi.Old/CC.Yi.API/Controllers/StudentController.cs
+++ /dev/null
@@ -1,175 +0,0 @@
-using CC.Yi.API.Filter;
-using CC.Yi.Common;
-using CC.Yi.Common.Cache;
-using CC.Yi.Common.Jwt;
-using CC.Yi.IBLL;
-using CC.Yi.Model;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Identity;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.Logging;
-using Microsoft.IdentityModel.Tokens;
-using System;
-using System.Collections.Generic;
-using System.IdentityModel.Tokens.Jwt;
-using System.Linq;
-using System.Security.Claims;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CC.Yi.API.Controllers
-{
- [ApiController]
- [Route("[controller]/[action]")]
- public class StudentController : Controller
- {
- private readonly ILogger _logger;//处理日志相关文件
-
- //private UserManager _userManager;//处理用户相关逻辑:添加密码,修改密码,添加删除角色等等
- //private SignInManager _signInManager;//处理注册登录的相关逻辑
-
- private IstudentBll _studentBll;
- public StudentController(ILogger logger, IstudentBll studentBll)
- {
-
- _logger = logger;
- _logger.LogInformation("现在你进入了StudentController控制器");
- _studentBll = studentBll;
- //_userManager = userManager;
- //_signInManager = signInManager;
- }
- #region
- //关于身份认证配置使用:
- //在需要身份认证的控制器上打上 [Authorize] 特性标签
- #endregion
- //[HttpGet]
- //public async Task IdentityTest()
- //{
- // //用户登入
- // var data = await _signInManager.PasswordSignInAsync("账号", "密码", false, false); //"是否记住密码","是否登入失败锁定用户"
- // //用户登出
- // await _signInManager.SignOutAsync();
- // //创建用户
- // var data2 = await _userManager.CreateAsync(new result_user { UserName="账户",Email="邮箱"},"密码");
- // //获取用户
- // var data3 = _userManager.Users;//这里可以使用Linq表达式Select
- // return Ok();
- //}
-
- #region
- //下面,这里是操作reids
- #endregion
- [HttpGet]
- public Result GetReids()
- {
- var data = CacheHelper.CacheWriter.GetCache("key01");
- return Result.Success(data);
- }
-
- #region
- //下面,权限验证
- #endregion
-
- //发送令牌
- [HttpGet]
- public Result Login(string role)
- {
- string userName = "admin";
- var claims = new[]
- {
- new Claim(JwtRegisteredClaimNames.Nbf,$"{new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds()}") ,
- new Claim (JwtRegisteredClaimNames.Exp,$"{new DateTimeOffset(DateTime.Now.AddMinutes(30)).ToUnixTimeSeconds()}"),
- new Claim(ClaimTypes.Name, userName),
- new Claim(ClaimTypes.Role,role)
-
- };
- var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(JwtConst.SecurityKey));
- var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
-
- var token = new JwtSecurityToken(
- issuer: JwtConst.Domain,
- audience: JwtConst.Domain,
- claims: claims,
- expires: DateTime.Now.AddMinutes(30),
- signingCredentials: creds);
-
- var tokenData= new JwtSecurityTokenHandler().WriteToken(token);
- return Result.Success("欢迎你!管理员!").SetData(new { token= tokenData });
- }
-
- [HttpGet]
- [Authorize(Policy = "myadmin")]//基于策略的验证
- public Result MyAdmin()
- {
- return Result.Success("欢迎你!管理员!");
- }
-
- [HttpGet]
- [Authorize(Roles ="user")]//基于角色的验证
- public Result MyUser()
- {
- return Result.Success("欢迎你!游客!");
- }
-
-
- #region
- //下面,经典的 增删改查 即为简易--Yi意框架
- //注意:请确保你的数据库中存在合理的数据
- #endregion
- [HttpGet]
- [DbContextFilter]
- public async Task GetTest()//查
- {
- _logger.LogInformation("调用查方法");
- var data =await _studentBll.GetAllEntities().ToListAsync();
- return Result.Success("查询成功").SetData(data);
- }
- [HttpGet]
- [DbContextFilter]
- public Result AddTest()//增
- {
- _logger.LogInformation("调用增方法");
- List students = new List() {new student { name = "学生a" } ,new student { name="学生d"} };
- if (_studentBll.Add(students))
- {
- return Result.Success("增加成功");
- }
- else
- {
- return Result.Error("增加失败");
- }
-
-
- }
- [HttpGet]
- [DbContextFilter]
- public Result RemoveTest()//删
- {
- _logger.LogInformation("调用删方法");
- if (_studentBll.Delete(u=>u.name=="学生a"))
- {
- return Result.Success("删除成功");
- }
- else
- {
- return Result.Error("删除失败");
- }
- }
- [HttpGet]
- [DbContextFilter]
- public Result UpdateTest()//改
- {
- _logger.LogInformation("调用改方法");
- if (_studentBll.Update(new student { id=2, name = "学生a" }, "name"))
- {
- return Result.Success("修改成功");
- }
- else
- {
- return Result.Error("修改失败");
- }
-
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Extension/SwaggerExtension.cs b/CC.Yi.Old/CC.Yi.API/Extension/SwaggerExtension.cs
deleted file mode 100644
index 6db50f61..00000000
--- a/CC.Yi.Old/CC.Yi.API/Extension/SwaggerExtension.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-using Microsoft.AspNetCore.Builder;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.OpenApi.Models;
-using System;
-using System.IO;
-
-namespace CC.Yi.API.Extension
-{
- ///
- /// Swagger文档扩展方法
- ///
- public static class SwaggerExtension
- {
- public static IServiceCollection AddSwaggerService(this IServiceCollection services)
- {
- var apiInfo = new OpenApiInfo
- {
- Title = "Yi意框架-API接口",
- Version = "v1",
- Contact = new OpenApiContact { Name = "橙子", Email = "454313500@qq.com", Url = new System.Uri("https://jiftcc.com") }
- };
- #region 注册Swagger服务
- services.AddSwaggerGen(c =>
- {
- c.SwaggerDoc("v1", apiInfo);
-
- //添加注释服务
- //为 Swagger JSON and UI设置xml文档注释路径
- //获取应用程序所在目录(绝对路径,不受工作目录影响,建议采用此方法获取路径使用windwos&Linux)
- var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
- var apiXmlPath = Path.Combine(basePath, @"ApiDoc.xml");//控制器层注释
- var entityXmlPath = Path.Combine(basePath, @"Model\ModelDoc.xml");//实体注释
- //c.IncludeXmlComments(apiXmlPath, true);//true表示显示控制器注释
- //c.IncludeXmlComments(entityXmlPath);
-
- //添加控制器注释
- //c.DocumentFilter();
-
- //添加header验证信息
- //c.OperationFilter();
- //var security = new Dictionary> { { "Bearer", new string[] { } }, };
-
- c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme()
- {
- Description = "文本框里输入从服务器获取的Token。格式为:Bearer + 空格+token",//JWT授权(数据将在请求头中进行传输) 参数结构: \"Authorization: Bearer {token}\"
- Name = "Authorization",////jwt默认的参数名称
- In = ParameterLocation.Header,////jwt默认存放Authorization信息的位置(请求头中)
- Type = SecuritySchemeType.ApiKey,
- });
- c.AddSecurityRequirement(new OpenApiSecurityRequirement
- {
- { new OpenApiSecurityScheme
- {
- Reference = new OpenApiReference()
- {
- Id = "Bearer",
- Type = ReferenceType.SecurityScheme
- }
- }, Array.Empty() }
- });
- });
- #endregion
-
- return services;
- }
-
- public static void UseSwaggerService(this IApplicationBuilder app)
- {
- //在 Startup.Configure 方法中,启用中间件为生成的 JSON 文档和 Swagger UI 提供服务:
- // Enable middleware to serve generated Swagger as a JSON endpoint.
- app.UseSwagger();
- app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "JwtTest v1"));
- }
-
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Filter/DbContextFilter.cs b/CC.Yi.Old/CC.Yi.API/Filter/DbContextFilter.cs
deleted file mode 100644
index 82fd8aac..00000000
--- a/CC.Yi.Old/CC.Yi.API/Filter/DbContextFilter.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using CC.Yi.DAL;
-using CC.Yi.Model;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Mvc.Filters;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace CC.Yi.API.Filter
-{
- public class DbContextFilter : ActionFilterAttribute
- {
- public override void OnActionExecuting(ActionExecutingContext filterContext)
- {
- var cache = filterContext.HttpContext.RequestServices.GetService(typeof(DataContext)) as DataContext;
- DbContentFactory.Initialize(cache);
- base.OnActionExecuting(filterContext);
-
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/20210319112041_yi1.Designer.cs b/CC.Yi.Old/CC.Yi.API/Migrations/20210319112041_yi1.Designer.cs
deleted file mode 100644
index fa669c28..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/20210319112041_yi1.Designer.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-using CC.Yi.Model;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-namespace CC.Yi.API.Migrations
-{
- [DbContext(typeof(DataContext))]
- [Migration("20210319112041_yi1")]
- partial class yi1
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 128)
- .HasAnnotation("ProductVersion", "5.0.4")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- modelBuilder.Entity("CC.Yi.Model.student", b =>
- {
- b.Property("id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- b.Property("name")
- .HasColumnType("int");
-
- b.HasKey("id");
-
- b.ToTable("student");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/20210319112041_yi1.cs b/CC.Yi.Old/CC.Yi.API/Migrations/20210319112041_yi1.cs
deleted file mode 100644
index 03299091..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/20210319112041_yi1.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace CC.Yi.API.Migrations
-{
- public partial class yi1 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "student",
- columns: table => new
- {
- id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- name = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_student", x => x.id);
- });
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "student");
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/20210320082935_yi2.Designer.cs b/CC.Yi.Old/CC.Yi.API/Migrations/20210320082935_yi2.Designer.cs
deleted file mode 100644
index c9bbf025..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/20210320082935_yi2.Designer.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-using CC.Yi.Model;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-namespace CC.Yi.API.Migrations
-{
- [DbContext(typeof(DataContext))]
- [Migration("20210320082935_yi2")]
- partial class yi2
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 128)
- .HasAnnotation("ProductVersion", "5.0.4")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- modelBuilder.Entity("CC.Yi.Model.student", b =>
- {
- b.Property("id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- b.Property("name")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("id");
-
- b.ToTable("student");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/20210320082935_yi2.cs b/CC.Yi.Old/CC.Yi.API/Migrations/20210320082935_yi2.cs
deleted file mode 100644
index 6875efa1..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/20210320082935_yi2.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace CC.Yi.API.Migrations
-{
- public partial class yi2 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AlterColumn(
- name: "name",
- table: "student",
- type: "nvarchar(max)",
- nullable: true,
- oldClrType: typeof(int),
- oldType: "int");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AlterColumn(
- name: "name",
- table: "student",
- type: "int",
- nullable: false,
- defaultValue: 0,
- oldClrType: typeof(string),
- oldType: "nvarchar(max)",
- oldNullable: true);
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/20210325123550_yi3.Designer.cs b/CC.Yi.Old/CC.Yi.API/Migrations/20210325123550_yi3.Designer.cs
deleted file mode 100644
index 2803473c..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/20210325123550_yi3.Designer.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-using System;
-using CC.Yi.Model;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-namespace CC.Yi.API.Migrations
-{
- [DbContext(typeof(DataContext))]
- [Migration("20210325123550_yi3")]
- partial class yi3
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 128)
- .HasAnnotation("ProductVersion", "5.0.4")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- modelBuilder.Entity("CC.Yi.Model.result_user", b =>
- {
- b.Property("Id")
- .HasColumnType("nvarchar(450)");
-
- b.Property("AccessFailedCount")
- .HasColumnType("int");
-
- b.Property("ConcurrencyStamp")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .HasColumnType("nvarchar(max)");
-
- b.Property("EmailConfirmed")
- .HasColumnType("bit");
-
- b.Property("LockoutEnabled")
- .HasColumnType("bit");
-
- b.Property("LockoutEnd")
- .HasColumnType("datetimeoffset");
-
- b.Property("NormalizedEmail")
- .HasColumnType("nvarchar(max)");
-
- b.Property("NormalizedUserName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("PasswordHash")
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumber")
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumberConfirmed")
- .HasColumnType("bit");
-
- b.Property("SecurityStamp")
- .HasColumnType("nvarchar(max)");
-
- b.Property("TwoFactorEnabled")
- .HasColumnType("bit");
-
- b.Property("UserName")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("result_user");
- });
-
- modelBuilder.Entity("CC.Yi.Model.student", b =>
- {
- b.Property("id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- b.Property("name")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("id");
-
- b.ToTable("student");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/20210325123550_yi3.cs b/CC.Yi.Old/CC.Yi.API/Migrations/20210325123550_yi3.cs
deleted file mode 100644
index ba0128cc..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/20210325123550_yi3.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace CC.Yi.API.Migrations
-{
- public partial class yi3 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "result_user",
- columns: table => new
- {
- Id = table.Column(type: "nvarchar(450)", nullable: false),
- UserName = table.Column(type: "nvarchar(max)", nullable: true),
- NormalizedUserName = table.Column(type: "nvarchar(max)", nullable: true),
- Email = table.Column(type: "nvarchar(max)", nullable: true),
- NormalizedEmail = table.Column(type: "nvarchar(max)", nullable: true),
- EmailConfirmed = table.Column(type: "bit", nullable: false),
- PasswordHash = table.Column(type: "nvarchar(max)", nullable: true),
- SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true),
- ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true),
- PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true),
- PhoneNumberConfirmed = table.Column(type: "bit", nullable: false),
- TwoFactorEnabled = table.Column(type: "bit", nullable: false),
- LockoutEnd = table.Column(type: "datetimeoffset", nullable: true),
- LockoutEnabled = table.Column(type: "bit", nullable: false),
- AccessFailedCount = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_result_user", x => x.Id);
- });
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "result_user");
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/20210325124241_yi4.Designer.cs b/CC.Yi.Old/CC.Yi.API/Migrations/20210325124241_yi4.Designer.cs
deleted file mode 100644
index dff90a75..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/20210325124241_yi4.Designer.cs
+++ /dev/null
@@ -1,301 +0,0 @@
-//
-using System;
-using CC.Yi.Model;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-namespace CC.Yi.API.Migrations
-{
- [DbContext(typeof(DataContext))]
- [Migration("20210325124241_yi4")]
- partial class yi4
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 128)
- .HasAnnotation("ProductVersion", "5.0.4")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- modelBuilder.Entity("CC.Yi.Model.student", b =>
- {
- b.Property("id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- b.Property("name")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("id");
-
- b.ToTable("student");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
- {
- b.Property("Id")
- .HasColumnType("nvarchar(450)");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Name")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("NormalizedName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedName")
- .IsUnique()
- .HasDatabaseName("RoleNameIndex")
- .HasFilter("[NormalizedName] IS NOT NULL");
-
- b.ToTable("AspNetRoles");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- b.Property("ClaimType")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ClaimValue")
- .HasColumnType("nvarchar(max)");
-
- b.Property("RoleId")
- .IsRequired()
- .HasColumnType("nvarchar(450)");
-
- b.HasKey("Id");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetRoleClaims");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
- {
- b.Property("Id")
- .HasColumnType("nvarchar(450)");
-
- b.Property("AccessFailedCount")
- .HasColumnType("int");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Discriminator")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("EmailConfirmed")
- .HasColumnType("bit");
-
- b.Property("LockoutEnabled")
- .HasColumnType("bit");
-
- b.Property("LockoutEnd")
- .HasColumnType("datetimeoffset");
-
- b.Property("NormalizedEmail")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("NormalizedUserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("PasswordHash")
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumber")
- .HasColumnType("nvarchar(max)");
-
- b.Property("PhoneNumberConfirmed")
- .HasColumnType("bit");
-
- b.Property("SecurityStamp")
- .HasColumnType("nvarchar(max)");
-
- b.Property("TwoFactorEnabled")
- .HasColumnType("bit");
-
- b.Property("UserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedEmail")
- .HasDatabaseName("EmailIndex");
-
- b.HasIndex("NormalizedUserName")
- .IsUnique()
- .HasDatabaseName("UserNameIndex")
- .HasFilter("[NormalizedUserName] IS NOT NULL");
-
- b.ToTable("AspNetUsers");
-
- b.HasDiscriminator("Discriminator").HasValue("IdentityUser");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- b.Property("ClaimType")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ClaimValue")
- .HasColumnType("nvarchar(max)");
-
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("nvarchar(450)");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserClaims");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.Property("LoginProvider")
- .HasColumnType("nvarchar(450)");
-
- b.Property("ProviderKey")
- .HasColumnType("nvarchar(450)");
-
- b.Property("ProviderDisplayName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("nvarchar(450)");
-
- b.HasKey("LoginProvider", "ProviderKey");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserLogins");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.Property("UserId")
- .HasColumnType("nvarchar(450)");
-
- b.Property("RoleId")
- .HasColumnType("nvarchar(450)");
-
- b.HasKey("UserId", "RoleId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetUserRoles");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.Property("UserId")
- .HasColumnType("nvarchar(450)");
-
- b.Property("LoginProvider")
- .HasColumnType("nvarchar(450)");
-
- b.Property("Name")
- .HasColumnType("nvarchar(450)");
-
- b.Property("Value")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("UserId", "LoginProvider", "Name");
-
- b.ToTable("AspNetUserTokens");
- });
-
- modelBuilder.Entity("CC.Yi.Model.result_user", b =>
- {
- b.HasBaseType("Microsoft.AspNetCore.Identity.IdentityUser");
-
- b.HasDiscriminator().HasValue("result_user");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/20210325124241_yi4.cs b/CC.Yi.Old/CC.Yi.API/Migrations/20210325124241_yi4.cs
deleted file mode 100644
index 4b105b4d..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/20210325124241_yi4.cs
+++ /dev/null
@@ -1,315 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace CC.Yi.API.Migrations
-{
- public partial class yi4 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropPrimaryKey(
- name: "PK_result_user",
- table: "result_user");
-
- migrationBuilder.RenameTable(
- name: "result_user",
- newName: "AspNetUsers");
-
- migrationBuilder.AlterColumn(
- name: "UserName",
- table: "AspNetUsers",
- type: "nvarchar(256)",
- maxLength: 256,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(max)",
- oldNullable: true);
-
- migrationBuilder.AlterColumn(
- name: "NormalizedUserName",
- table: "AspNetUsers",
- type: "nvarchar(256)",
- maxLength: 256,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(max)",
- oldNullable: true);
-
- migrationBuilder.AlterColumn(
- name: "NormalizedEmail",
- table: "AspNetUsers",
- type: "nvarchar(256)",
- maxLength: 256,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(max)",
- oldNullable: true);
-
- migrationBuilder.AlterColumn(
- name: "Email",
- table: "AspNetUsers",
- type: "nvarchar(256)",
- maxLength: 256,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(max)",
- oldNullable: true);
-
- migrationBuilder.AddColumn(
- name: "Discriminator",
- table: "AspNetUsers",
- type: "nvarchar(max)",
- nullable: false,
- defaultValue: "");
-
- migrationBuilder.AddPrimaryKey(
- name: "PK_AspNetUsers",
- table: "AspNetUsers",
- column: "Id");
-
- migrationBuilder.CreateTable(
- name: "AspNetRoles",
- columns: table => new
- {
- Id = table.Column(type: "nvarchar(450)", nullable: false),
- Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetRoles", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserClaims",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- UserId = table.Column(type: "nvarchar(450)", nullable: false),
- ClaimType = table.Column(type: "nvarchar(max)", nullable: true),
- ClaimValue = table.Column(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
- table.ForeignKey(
- name: "FK_AspNetUserClaims_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserLogins",
- columns: table => new
- {
- LoginProvider = table.Column(type: "nvarchar(450)", nullable: false),
- ProviderKey = table.Column(type: "nvarchar(450)", nullable: false),
- ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true),
- UserId = table.Column(type: "nvarchar(450)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
- table.ForeignKey(
- name: "FK_AspNetUserLogins_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserTokens",
- columns: table => new
- {
- UserId = table.Column(type: "nvarchar(450)", nullable: false),
- LoginProvider = table.Column(type: "nvarchar(450)", nullable: false),
- Name = table.Column(type: "nvarchar(450)", nullable: false),
- Value = table.Column(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
- table.ForeignKey(
- name: "FK_AspNetUserTokens_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetRoleClaims",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- RoleId = table.Column(type: "nvarchar(450)", nullable: false),
- ClaimType = table.Column(type: "nvarchar(max)", nullable: true),
- ClaimValue = table.Column(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
- table.ForeignKey(
- name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
- column: x => x.RoleId,
- principalTable: "AspNetRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserRoles",
- columns: table => new
- {
- UserId = table.Column(type: "nvarchar(450)", nullable: false),
- RoleId = table.Column(type: "nvarchar(450)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
- table.ForeignKey(
- name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
- column: x => x.RoleId,
- principalTable: "AspNetRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_AspNetUserRoles_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateIndex(
- name: "EmailIndex",
- table: "AspNetUsers",
- column: "NormalizedEmail");
-
- migrationBuilder.CreateIndex(
- name: "UserNameIndex",
- table: "AspNetUsers",
- column: "NormalizedUserName",
- unique: true,
- filter: "[NormalizedUserName] IS NOT NULL");
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetRoleClaims_RoleId",
- table: "AspNetRoleClaims",
- column: "RoleId");
-
- migrationBuilder.CreateIndex(
- name: "RoleNameIndex",
- table: "AspNetRoles",
- column: "NormalizedName",
- unique: true,
- filter: "[NormalizedName] IS NOT NULL");
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUserClaims_UserId",
- table: "AspNetUserClaims",
- column: "UserId");
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUserLogins_UserId",
- table: "AspNetUserLogins",
- column: "UserId");
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUserRoles_RoleId",
- table: "AspNetUserRoles",
- column: "RoleId");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "AspNetRoleClaims");
-
- migrationBuilder.DropTable(
- name: "AspNetUserClaims");
-
- migrationBuilder.DropTable(
- name: "AspNetUserLogins");
-
- migrationBuilder.DropTable(
- name: "AspNetUserRoles");
-
- migrationBuilder.DropTable(
- name: "AspNetUserTokens");
-
- migrationBuilder.DropTable(
- name: "AspNetRoles");
-
- migrationBuilder.DropPrimaryKey(
- name: "PK_AspNetUsers",
- table: "AspNetUsers");
-
- migrationBuilder.DropIndex(
- name: "EmailIndex",
- table: "AspNetUsers");
-
- migrationBuilder.DropIndex(
- name: "UserNameIndex",
- table: "AspNetUsers");
-
- migrationBuilder.DropColumn(
- name: "Discriminator",
- table: "AspNetUsers");
-
- migrationBuilder.RenameTable(
- name: "AspNetUsers",
- newName: "result_user");
-
- migrationBuilder.AlterColumn(
- name: "UserName",
- table: "result_user",
- type: "nvarchar(max)",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(256)",
- oldMaxLength: 256,
- oldNullable: true);
-
- migrationBuilder.AlterColumn(
- name: "NormalizedUserName",
- table: "result_user",
- type: "nvarchar(max)",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(256)",
- oldMaxLength: 256,
- oldNullable: true);
-
- migrationBuilder.AlterColumn(
- name: "NormalizedEmail",
- table: "result_user",
- type: "nvarchar(max)",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(256)",
- oldMaxLength: 256,
- oldNullable: true);
-
- migrationBuilder.AlterColumn(
- name: "Email",
- table: "result_user",
- type: "nvarchar(max)",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(256)",
- oldMaxLength: 256,
- oldNullable: true);
-
- migrationBuilder.AddPrimaryKey(
- name: "PK_result_user",
- table: "result_user",
- column: "Id");
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/20210410090937_yi5.Designer.cs b/CC.Yi.Old/CC.Yi.API/Migrations/20210410090937_yi5.Designer.cs
deleted file mode 100644
index 6038f52c..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/20210410090937_yi5.Designer.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-using CC.Yi.Model;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-namespace CC.Yi.API.Migrations
-{
- [DbContext(typeof(DataContext))]
- [Migration("20210410090937_yi5")]
- partial class yi5
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 128)
- .HasAnnotation("ProductVersion", "5.0.4")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- modelBuilder.Entity("CC.Yi.Model.student", b =>
- {
- b.Property("id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- b.Property("name")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("id");
-
- b.ToTable("student");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/20210410090937_yi5.cs b/CC.Yi.Old/CC.Yi.API/Migrations/20210410090937_yi5.cs
deleted file mode 100644
index 73cf0845..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/20210410090937_yi5.cs
+++ /dev/null
@@ -1,220 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace CC.Yi.API.Migrations
-{
- public partial class yi5 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "AspNetRoleClaims");
-
- migrationBuilder.DropTable(
- name: "AspNetUserClaims");
-
- migrationBuilder.DropTable(
- name: "AspNetUserLogins");
-
- migrationBuilder.DropTable(
- name: "AspNetUserRoles");
-
- migrationBuilder.DropTable(
- name: "AspNetUserTokens");
-
- migrationBuilder.DropTable(
- name: "AspNetRoles");
-
- migrationBuilder.DropTable(
- name: "AspNetUsers");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "AspNetRoles",
- columns: table => new
- {
- Id = table.Column(type: "nvarchar(450)", nullable: false),
- ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true),
- Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetRoles", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUsers",
- columns: table => new
- {
- Id = table.Column(type: "nvarchar(450)", nullable: false),
- AccessFailedCount = table.Column(type: "int", nullable: false),
- ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true),
- Discriminator = table.Column(type: "nvarchar(max)", nullable: false),
- Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- EmailConfirmed = table.Column(type: "bit", nullable: false),
- LockoutEnabled = table.Column(type: "bit", nullable: false),
- LockoutEnd = table.Column(type: "datetimeoffset", nullable: true),
- NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
- PasswordHash = table.Column(type: "nvarchar(max)", nullable: true),
- PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true),
- PhoneNumberConfirmed = table.Column(type: "bit", nullable: false),
- SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true),
- TwoFactorEnabled = table.Column(type: "bit", nullable: false),
- UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUsers", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetRoleClaims",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ClaimType = table.Column(type: "nvarchar(max)", nullable: true),
- ClaimValue = table.Column(type: "nvarchar(max)", nullable: true),
- RoleId = table.Column(type: "nvarchar(450)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
- table.ForeignKey(
- name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
- column: x => x.RoleId,
- principalTable: "AspNetRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserClaims",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ClaimType = table.Column(type: "nvarchar(max)", nullable: true),
- ClaimValue = table.Column(type: "nvarchar(max)", nullable: true),
- UserId = table.Column(type: "nvarchar(450)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
- table.ForeignKey(
- name: "FK_AspNetUserClaims_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserLogins",
- columns: table => new
- {
- LoginProvider = table.Column(type: "nvarchar(450)", nullable: false),
- ProviderKey = table.Column(type: "nvarchar(450)", nullable: false),
- ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true),
- UserId = table.Column(type: "nvarchar(450)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
- table.ForeignKey(
- name: "FK_AspNetUserLogins_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserRoles",
- columns: table => new
- {
- UserId = table.Column(type: "nvarchar(450)", nullable: false),
- RoleId = table.Column(type: "nvarchar(450)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
- table.ForeignKey(
- name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
- column: x => x.RoleId,
- principalTable: "AspNetRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_AspNetUserRoles_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AspNetUserTokens",
- columns: table => new
- {
- UserId = table.Column(type: "nvarchar(450)", nullable: false),
- LoginProvider = table.Column(type: "nvarchar(450)", nullable: false),
- Name = table.Column(type: "nvarchar(450)", nullable: false),
- Value = table.Column(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
- table.ForeignKey(
- name: "FK_AspNetUserTokens_AspNetUsers_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetRoleClaims_RoleId",
- table: "AspNetRoleClaims",
- column: "RoleId");
-
- migrationBuilder.CreateIndex(
- name: "RoleNameIndex",
- table: "AspNetRoles",
- column: "NormalizedName",
- unique: true,
- filter: "[NormalizedName] IS NOT NULL");
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUserClaims_UserId",
- table: "AspNetUserClaims",
- column: "UserId");
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUserLogins_UserId",
- table: "AspNetUserLogins",
- column: "UserId");
-
- migrationBuilder.CreateIndex(
- name: "IX_AspNetUserRoles_RoleId",
- table: "AspNetUserRoles",
- column: "RoleId");
-
- migrationBuilder.CreateIndex(
- name: "EmailIndex",
- table: "AspNetUsers",
- column: "NormalizedEmail");
-
- migrationBuilder.CreateIndex(
- name: "UserNameIndex",
- table: "AspNetUsers",
- column: "NormalizedUserName",
- unique: true,
- filter: "[NormalizedUserName] IS NOT NULL");
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Migrations/DataContextModelSnapshot.cs b/CC.Yi.Old/CC.Yi.API/Migrations/DataContextModelSnapshot.cs
deleted file mode 100644
index 1952adda..00000000
--- a/CC.Yi.Old/CC.Yi.API/Migrations/DataContextModelSnapshot.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-using CC.Yi.Model;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-namespace CC.Yi.API.Migrations
-{
- [DbContext(typeof(DataContext))]
- partial class DataContextModelSnapshot : ModelSnapshot
- {
- protected override void BuildModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 128)
- .HasAnnotation("ProductVersion", "5.0.4")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- modelBuilder.Entity("CC.Yi.Model.student", b =>
- {
- b.Property("id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- b.Property("name")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("id");
-
- b.ToTable("student");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Program.cs b/CC.Yi.Old/CC.Yi.API/Program.cs
deleted file mode 100644
index 9fe2b1eb..00000000
--- a/CC.Yi.Old/CC.Yi.API/Program.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-using Autofac.Extensions.DependencyInjection;
-using CC.Yi.DAL;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Logging;
-using NLog.Web;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace CC.Yi.API
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- var logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger();
- try
- {
- logger.Debug("Yiܡ");
- var host = CreateHostBuilder(args).Build();
- //var scope = host.Services.CreateScope();
- //var services = scope.ServiceProvider;
- //var context = services.GetRequiredService();//ȡ
- //DbContentFactory.Initialize(context);//þ̬ע
- host.Run();
- logger.Info("Yiɹ");
- }
- catch (Exception exception)
- {
- //NLog: catch setup errors
- logger.Error(exception, "Stopped program because of exception");
- throw;
- }
- finally
- {
- // Ensure to flush and stop internal timers/threads before application-exit (Avoid segmentation fault on Linux)
- NLog.LogManager.Shutdown();
- }
-
-
-
-
- }
-
- public static IHostBuilder CreateHostBuilder(string[] args) =>
- Host.CreateDefaultBuilder(args)
- .ConfigureWebHostDefaults(webBuilder =>
- {
- webBuilder.UseStartup();
- }).UseServiceProviderFactory(new AutofacServiceProviderFactory())
- .ConfigureLogging(logging =>
- {
- // logging.ClearProviders(); // п̨
- logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
- }).UseNLog();//nlog־
-
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Properties/launchSettings.json b/CC.Yi.Old/CC.Yi.API/Properties/launchSettings.json
deleted file mode 100644
index 9942be97..00000000
--- a/CC.Yi.Old/CC.Yi.API/Properties/launchSettings.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "$schema": "http://json.schemastore.org/launchsettings.json",
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:55197",
- "sslPort": 44334
- }
- },
- "profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "launchUrl": "swagger",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "CC.Yi.API": {
- "commandName": "Project",
- "dotnetRunMessages": "true",
- "launchBrowser": true,
- "launchUrl": "swagger",
- "applicationUrl": "https://localhost:5001;http://localhost:5000",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/Startup.cs b/CC.Yi.Old/CC.Yi.API/Startup.cs
deleted file mode 100644
index 55003dc4..00000000
--- a/CC.Yi.Old/CC.Yi.API/Startup.cs
+++ /dev/null
@@ -1,164 +0,0 @@
-
-using Autofac;
-using Autofac.Extras.DynamicProxy;
-using CC.Yi.API.Extension;
-using CC.Yi.API.Filter;
-using CC.Yi.BLL;
-using CC.Yi.Common.Cache;
-using CC.Yi.Common.Castle;
-using CC.Yi.Common.Jwt;
-using CC.Yi.DAL;
-using CC.Yi.IBLL;
-using CC.Yi.IDAL;
-using CC.Yi.Model;
-using Microsoft.AspNetCore.Authentication.JwtBearer;
-using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.HttpsPolicy;
-using Microsoft.AspNetCore.Identity;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Logging;
-using Microsoft.IdentityModel.Tokens;
-using Microsoft.OpenApi.Models;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CC.Yi.API
-{
- public partial class Startup
- {
- public Startup(IConfiguration configuration)
- {
- Configuration = configuration;
- }
-
- public IConfiguration Configuration { get; }
-
-
- public void ConfigureServices(IServiceCollection services)
- {
- // Jwt
- services.AddAuthorization(options =>
- {
- //ûڲԵ֤
- options.AddPolicy("myadmin", policy =>
- policy.RequireRole("admin"));
- });
-
-
- services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
- .AddJwtBearer(options => {
- options.TokenValidationParameters = new TokenValidationParameters
- {
- ValidateIssuer = true,//Ƿ֤Issuer
- ValidateAudience = true,//Ƿ֤Audience
- ValidateLifetime = true,//Ƿ֤ʧЧʱ
- ClockSkew = TimeSpan.FromSeconds(30),
- ValidateIssuerSigningKey = true,//Ƿ֤SecurityKey
- ValidAudience = JwtConst.Domain,//Audience
- ValidIssuer = JwtConst.Domain,//Issuerǰǩjwtһ
- IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(JwtConst.SecurityKey))//õSecurityKey
- };
- });
-
-
- services.AddControllers();
- services.AddSwaggerService();
- services.AddSession();
-
-
-
- //ù
- Action filters = new Action(r => {
- //r.Filters.Add(typeof(DbContextFilter));
- });
- services.AddMvc(filters);
-
- //ݿ
- string connection1 = Configuration["ConnectionStringBySQL"];
- string connection2 = Configuration["ConnectionStringByMySQL"];
- string connection3 = Configuration["ConnectionStringBySQLite"];
- services.AddDbContext(options =>
- {
- options.UseSqlServer(connection1, b => b.MigrationsAssembly("CC.Yi.API"));//ݿ
- });
-
-
- //עתAutofac
- //services.AddScoped(typeof(IBaseDal<>), typeof(BaseDal<>));
- //services.AddScoped(typeof(IstudentBll), typeof(studentBll));
-
- //reidsע
- //services.AddSingleton(typeof(ICacheWriter), new RedisCacheService(new Microsoft.Extensions.Caching.Redis.RedisCacheOptions()
- //{
- // Configuration = Configuration.GetSection("Cache.ConnectionString").Value,
- // InstanceName = Configuration.GetSection("Cache.InstanceName").Value
- //}));
-
-
- //Identity֤
- //services.AddIdentity(options =>
- // {
- // options.Password.RequiredLength = 6;//̳
- // options.Password.RequireDigit = false;//
- // options.Password.RequireLowercase = false;//Сдĸ
- // options.Password.RequireNonAlphanumeric = false;//ַ
- // options.Password.RequireUppercase = false;//дĸ
- // //options.User.RequireUniqueEmail = false;//עǷԲظ
- // //options.User.AllowedUserNameCharacters="abcd"//ַֻ
- //}).AddEntityFrameworkStores().AddDefaultTokenProviders();
-
- //
- services.AddCors(options => options.AddPolicy("CorsPolicy",
- builder =>
- {
- builder.AllowAnyMethod()
- .SetIsOriginAllowed(_ => true)
- .AllowAnyHeader()
- .AllowCredentials();
- }));
- }
-
- //ʼʹú
- private void InitData(IServiceProvider serviceProvider)
- {
- //var serviceScope = serviceProvider.GetRequiredService().CreateScope();
-
- //var context = serviceScope.ServiceProvider.GetService();
- //DbContentFactory.Initialize(context);//þ̬ע
- }
-
-
-
- public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
- {
-
- if (env.IsDevelopment())
- {
- app.UseDeveloperExceptionPage();
- app.UseSwaggerService();
- }
-
- //app.UseAuthentication();
- app.UseCors("CorsPolicy");
- app.UseHttpsRedirection();
- app.UseSession();
- app.UseRouting();
- app.UseAuthentication();
- app.UseAuthorization();
-
- app.UseEndpoints(endpoints =>
- {
- endpoints.MapControllers();
- });
- InitData(app.ApplicationServices);
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/T4Startup.cs b/CC.Yi.Old/CC.Yi.API/T4Startup.cs
deleted file mode 100644
index 75e8a6fd..00000000
--- a/CC.Yi.Old/CC.Yi.API/T4Startup.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using Autofac;
-using Autofac.Extras.DynamicProxy;
-using CC.Yi.BLL;
-using CC.Yi.Common.Castle;
-using CC.Yi.DAL;
-using CC.Yi.IBLL;
-using CC.Yi.IDAL;
-using System;
-
-
-namespace CC.Yi.API
-{
- public partial class Startup
- {
- //动态 面向AOP思想的依赖注入 Autofac
- public void ConfigureContainer(ContainerBuilder builder)
- {
- builder.RegisterType(typeof(CustomAutofacAop));
- builder.RegisterGeneric(typeof(BaseDal<>)).As(typeof(IBaseDal<>));
- builder.RegisterType().As().EnableInterfaceInterceptors();//表示注入前后要执行Castle,AOP
- }
- }
-}
\ No newline at end of file
diff --git a/CC.Yi.Old/CC.Yi.API/T4Startup.tt b/CC.Yi.Old/CC.Yi.API/T4Startup.tt
deleted file mode 100644
index 166ebfc5..00000000
--- a/CC.Yi.Old/CC.Yi.API/T4Startup.tt
+++ /dev/null
@@ -1,40 +0,0 @@
-<#@ template debug="false" hostspecific="true" language="C#" #>
-<#@ assembly name="System.Core" #>
-<#@ import namespace="System.Linq" #>
-<#@ import namespace="System.Text" #>
-<#@ import namespace="System.Collections.Generic" #>
-<#@ import namespace="System.IO" #>
-<#@ output extension=".cs" #>
-<#
- string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径
- string txt;
- StreamReader sr = new StreamReader(solutionsPath+@"\T4Model\T4Model.txt");
- txt=sr.ReadToEnd();
- sr.Close();
- string[] ModelData= txt.Split(',');
- #>
-using Autofac;
-using Autofac.Extras.DynamicProxy;
-using CC.Yi.BLL;
-using CC.Yi.Common.Castle;
-using CC.Yi.DAL;
-using CC.Yi.IBLL;
-using CC.Yi.IDAL;
-using System;
-
-
-namespace CC.Yi.API
-{
- public partial class Startup
- {
- //动态 面向AOP思想的依赖注入 Autofac
- public void ConfigureContainer(ContainerBuilder builder)
- {
- builder.RegisterType(typeof(CustomAutofacAop));
- builder.RegisterGeneric(typeof(BaseDal<>)).As(typeof(IBaseDal<>));
-<# foreach(string k in ModelData){#>
- builder.RegisterType<<#=k #>Bll>().AsBll>().EnableInterfaceInterceptors();//表示注入前后要执行Castle,AOP
-<# } #>
- }
- }
-}
\ No newline at end of file
diff --git a/CC.Yi.Old/CC.Yi.API/appsettings.Development.json b/CC.Yi.Old/CC.Yi.API/appsettings.Development.json
deleted file mode 100644
index 8983e0fc..00000000
--- a/CC.Yi.Old/CC.Yi.API/appsettings.Development.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.API/appsettings.json b/CC.Yi.Old/CC.Yi.API/appsettings.json
deleted file mode 100644
index 429d06ac..00000000
--- a/CC.Yi.Old/CC.Yi.API/appsettings.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- },
- "AllowedHosts": "*",
- "Cache": {
- "InstanceName": "Redis",
- "ConnectionString": "127.0.0.1:12345,password=123456"
- },
- "ConnectionStringBySQL": "server=.;Database=YIDB;UId=sa;PWD=Qz52013142020.",
- "ConnectionStringByMySQL": "Data Source=.;Database=YIDB;User ID=root;Password=Qz52013142020.;pooling=true;port=3306;sslmode=none;CharSet=utf8;",
- "ConnectionStringBySQLite": "Filename=YIDB.db"
-}
diff --git a/CC.Yi.Old/CC.Yi.API/nlog.config b/CC.Yi.Old/CC.Yi.API/nlog.config
deleted file mode 100644
index ff359770..00000000
--- a/CC.Yi.Old/CC.Yi.API/nlog.config
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CC.Yi.Old/CC.Yi.BLL/BaseBll.cs b/CC.Yi.Old/CC.Yi.BLL/BaseBll.cs
deleted file mode 100644
index 90cd98a0..00000000
--- a/CC.Yi.Old/CC.Yi.BLL/BaseBll.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-using CC.Yi.DALFactory;
-using CC.Yi.IBLL;
-using CC.Yi.IDAL;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-
-namespace CC.Yi.BLL
-{
- public class BaseBll : IBaseBll where T : class, new()
- {
- public IBaseDal CurrentDal;
- public BaseBll(IBaseDal cd)
- {
- CurrentDal = cd;
- }
-
- public IQueryable GetAllEntities()
- {
- return CurrentDal.GetAllEntities();
- }
-
- public IQueryable GetEntities(Expression> whereLambda)
- {
- return CurrentDal.GetEntities(whereLambda);
- }
-
- public int GetCount(Expression> whereLambda) //统计数量
- {
- return CurrentDal.GetCount(whereLambda);
- }
-
- public IQueryable> GetGroup(Expression> whereLambda, Expression> groupByLambda) //分组
- {
- return CurrentDal.GetGroup(whereLambda, groupByLambda);
-
- }
-
-
- public IQueryable GetPageEntities(int pageSize, int pageIndex, out int total, Expression> whereLambda, Expression> orderByLambda, bool isAsc)
- {
- return CurrentDal.GetPageEntities(pageSize, pageIndex, out total, whereLambda, orderByLambda, isAsc);
- }
-
- public T Add(T entity)
- {
- var myEntity=CurrentDal.Add(entity);
- DbSession.SaveChanges();
- return myEntity;
- }
-
- public bool Add(IEnumerable entities)
- {
- CurrentDal.AddRange(entities);
- return DbSession.SaveChanges() > 0;
- }
-
- public bool Update(T entity)
- {
- CurrentDal.Update(entity);
- return DbSession.SaveChanges() > 0;
- }
-
- public bool Update(T entity, params string[] propertyNames)
- {
- CurrentDal.Update(entity,propertyNames);
- return DbSession.SaveChanges() > 0;
- }
-
- public bool Delete(T entity)
- {
- CurrentDal.Delete(entity);
- return DbSession.SaveChanges() > 0;
- }
- public IDbSession DbSession
- {
- get
- {
- return DbSessionFactory.GetCurrentDbSession();
- }
- }
- public bool Delete(int id)
- {
- CurrentDal.Detete(id);
- return DbSession.SaveChanges() > 0;
- }
-
- public bool Delete(IEnumerable ids)
- {
- foreach (var id in ids)
- {
- CurrentDal.Detete(id);
- }
- return DbSession.SaveChanges()>0;
- }
- public bool Delete(Expression> where)
- {
- IQueryable entities = CurrentDal.GetEntities(where);
- if (entities != null)
- {
- CurrentDal.DeteteRange(entities);
-
- return DbSession.SaveChanges()>0;
- }
- return false;
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.BLL/CC.Yi.BLL.csproj b/CC.Yi.Old/CC.Yi.BLL/CC.Yi.BLL.csproj
deleted file mode 100644
index ce6c0299..00000000
--- a/CC.Yi.Old/CC.Yi.BLL/CC.Yi.BLL.csproj
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- netcoreapp3.1
-
-
-
-
-
-
-
-
-
-
- TextTemplatingFileGenerator
- T4BLL.cs
-
-
-
-
-
-
-
-
-
- True
- True
- T4BLL.tt
-
-
-
-
diff --git a/CC.Yi.Old/CC.Yi.BLL/T4BLL.cs b/CC.Yi.Old/CC.Yi.BLL/T4BLL.cs
deleted file mode 100644
index da68edd2..00000000
--- a/CC.Yi.Old/CC.Yi.BLL/T4BLL.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-
-using CC.Yi.IBLL;
-using CC.Yi.IDAL;
-using CC.Yi.Model;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace CC.Yi.BLL
-{
- public partial class studentBll : BaseBll, IstudentBll
- {
- public studentBll(IBaseDal cd):base(cd)
- {
- CurrentDal = cd;
- }
- }
-}
\ No newline at end of file
diff --git a/CC.Yi.Old/CC.Yi.BLL/T4BLL.tt b/CC.Yi.Old/CC.Yi.BLL/T4BLL.tt
deleted file mode 100644
index dcda0135..00000000
--- a/CC.Yi.Old/CC.Yi.BLL/T4BLL.tt
+++ /dev/null
@@ -1,37 +0,0 @@
-<#@ template debug="false" hostspecific="true" language="C#" #>
-<#@ assembly name="System.Core" #>
-<#@ import namespace="System.Linq" #>
-<#@ import namespace="System.Text" #>
-<#@ import namespace="System.Collections.Generic" #>
-<#@ import namespace="System.IO" #>
-<#@ output extension=".cs" #>
-<#
- string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径
- string txt;
- StreamReader sr = new StreamReader(solutionsPath+@"\T4Model\T4Model.txt");
- txt=sr.ReadToEnd();
- sr.Close();
- string[] ModelData= txt.Split(',');
- #>
-
-using CC.Yi.IBLL;
-using CC.Yi.IDAL;
-using CC.Yi.Model;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace CC.Yi.BLL
-{
-<# foreach(string k in ModelData){
- #>
- public partial class <#=k #>Bll : BaseBll<<#=k #>>, I<#=k #>Bll
- {
- public <#=k #>Bll(IBaseDal<<#=k #>> cd):base(cd)
- {
- CurrentDal = cd;
- }
- }
-<# } #>
-}
\ No newline at end of file
diff --git a/CC.Yi.Old/CC.Yi.Common/CC.Yi.Common.csproj b/CC.Yi.Old/CC.Yi.Common/CC.Yi.Common.csproj
deleted file mode 100644
index 2d1ddc8f..00000000
--- a/CC.Yi.Old/CC.Yi.Common/CC.Yi.Common.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- netcoreapp3.1
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CC.Yi.Old/CC.Yi.Common/Cache/CacheHelper.cs b/CC.Yi.Old/CC.Yi.Common/Cache/CacheHelper.cs
deleted file mode 100644
index e77f8fbc..00000000
--- a/CC.Yi.Old/CC.Yi.Common/Cache/CacheHelper.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using Autofac;
-using Microsoft.AspNetCore.Http;
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace CC.Yi.Common.Cache
-{
- public class CacheHelper
- {
- public static ICacheWriter CacheWriter { get; set; }
- static CacheHelper()
- {
- CacheHelper.CacheWriter = new RedisCache();
- }
-
-
-
-
- public bool AddCache(string key, T value, DateTime expDate)
- {
- return CacheWriter.AddCache(key,value,expDate);
- }
-
- public bool AddCache(string key, T value)
- {
- return CacheWriter.AddCache(key, value);
- }
-
- public bool RemoveCache(string key)
- {
- return CacheWriter.RemoveCache(key);
- }
-
- public T GetCache(string key)
- {
- return CacheWriter.GetCache(key);
- }
-
- public bool SetCache(string key, T value, DateTime expDate)
- {
- return CacheWriter.SetCache(key,value,expDate);
- }
-
- public bool SetCache(string key, T value)
- {
- return CacheWriter.SetCache(key, value);
- }
-
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.Common/Cache/ICacheWriter.cs b/CC.Yi.Old/CC.Yi.Common/Cache/ICacheWriter.cs
deleted file mode 100644
index 712f6857..00000000
--- a/CC.Yi.Old/CC.Yi.Common/Cache/ICacheWriter.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CC.Yi.Common.Cache
-{
- public interface ICacheWriter
- {
- bool AddCache(string key, T value, DateTime expDate);
- bool AddCache(string key, T value);
- bool RemoveCache(string key);
- T GetCache(string key);
- bool SetCache(string key, T value, DateTime expDate);
- bool SetCache(string key, T value);
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.Common/Cache/RedisCache.cs b/CC.Yi.Old/CC.Yi.Common/Cache/RedisCache.cs
deleted file mode 100644
index 3e695f02..00000000
--- a/CC.Yi.Old/CC.Yi.Common/Cache/RedisCache.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using ServiceStack.Redis;
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace CC.Yi.Common.Cache
-{
- public class RedisCache : ICacheWriter
- {
- private RedisClient client;
- public string redisIp { get; set; }
-
- public RedisCache()
- {
- client = new RedisClient("127.0.0.1", 6379, "52013142020.");
- }
-
- public bool AddCache(string key, T value, DateTime expDate)
- {
- return client.Add(key, value, expDate);
- }
-
- public bool AddCache(string key, T value)
- {
- return client.Add(key, value);
- }
-
- public bool RemoveCache(string key)
- {
- return client.Remove(key);
- }
-
- public T GetCache(string key)
- {
- return client.Get(key);
- }
-
- public bool SetCache(string key,T value, DateTime expDate)
- {
- return client.Set(key, value, expDate);
- }
-
- public bool SetCache(string key, T value)
- {
- return client.Set(key, value);
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.Common/Castle/CustomAutofacAop.cs b/CC.Yi.Old/CC.Yi.Common/Castle/CustomAutofacAop.cs
deleted file mode 100644
index 526d39ef..00000000
--- a/CC.Yi.Old/CC.Yi.Common/Castle/CustomAutofacAop.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using Castle.DynamicProxy;
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace CC.Yi.Common.Castle
-{
- public class CustomAutofacAop : IInterceptor
- {
- public void Intercept(IInvocation invocation)
- {
- {
-
- //这里写执行方法前
- }
- invocation.Proceed();//执行具体的实例
- {
-
- //这里写执行方法后
- }
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.Common/HttpHelper.cs b/CC.Yi.Old/CC.Yi.Common/HttpHelper.cs
deleted file mode 100644
index 6bfdfb18..00000000
--- a/CC.Yi.Old/CC.Yi.Common/HttpHelper.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
-
-namespace CC.Yi.Common
-{
- public static class HttpHelper
- {
- public static string HttpGet(string Url, string postDataStr="")
- {
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url + (postDataStr == "" ? "" : "?") + postDataStr);
- request.Method = "GET";
- request.ContentType = "text/html;charset=UTF-8";
-
- HttpWebResponse response = (HttpWebResponse)request.GetResponse();
- Stream myResponseStream = response.GetResponseStream();
- StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
- string retString = myStreamReader.ReadToEnd();
- myStreamReader.Close();
- myResponseStream.Close();
-
- return retString;
- }
-
- public static bool HttpIOGet(string Url, string file, string postDataStr="")
- {
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url + (postDataStr == "" ? "" : "?") + postDataStr);
- request.Method = "GET";
- request.ContentType = "text/html;charset=UTF-8";
-
- HttpWebResponse response = (HttpWebResponse)request.GetResponse();
- Stream myResponseStream = response.GetResponseStream();
- FileStream writer = new FileStream(file, FileMode.OpenOrCreate, FileAccess.Write);
- byte[] buffer = new byte[1024];
- int c;
- while ((c = myResponseStream.Read(buffer, 0, buffer.Length)) > 0)
- {
- writer.Write(buffer, 0, c);
- }
- writer.Close();
- myResponseStream.Close();
-
- return true;
- }
-
- public static string HttpPost(string Url, string postDataStr="")
- {
- CookieContainer cookie = new CookieContainer();
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);
- request.Method = "POST";
- request.ContentType = "application/x-www-form-urlencoded";
- request.ContentLength = Encoding.UTF8.GetByteCount(postDataStr);
- request.CookieContainer = cookie;
- Stream myRequestStream = request.GetRequestStream();
- StreamWriter myStreamWriter = new StreamWriter(myRequestStream, Encoding.GetEncoding("gb2312"));
- myStreamWriter.Write(postDataStr);
- myStreamWriter.Close();
-
- HttpWebResponse response = (HttpWebResponse)request.GetResponse();
-
- response.Cookies = cookie.GetCookies(response.ResponseUri);
- Stream myResponseStream = response.GetResponseStream();
- StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
- string retString = myStreamReader.ReadToEnd();
- myStreamReader.Close();
- myResponseStream.Close();
-
- return retString;
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.Common/ImageHelper.cs b/CC.Yi.Old/CC.Yi.Common/ImageHelper.cs
deleted file mode 100644
index 170aba9c..00000000
--- a/CC.Yi.Old/CC.Yi.Common/ImageHelper.cs
+++ /dev/null
@@ -1,167 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using System.IO;
-using System.IO.Compression;
-using System.Drawing;
-
-namespace CC.Yi.Common
-{
- public class SimilarPhoto
- {
- Image SourceImg;
- public SimilarPhoto(string filePath)
- {
- SourceImg = Image.FromFile(filePath);
- }
- public SimilarPhoto(Stream stream)
- {
- SourceImg = Image.FromStream(stream);
- }
- public String GetHash()
- {
- Image image = ReduceSize();
- Byte[] grayValues = ReduceColor(image);
- Byte average = CalcAverage(grayValues);
- String reslut = ComputeBits(grayValues, average);
- return reslut;
- }
- // Step 1 : Reduce size to 8*8
- private Image ReduceSize(int width = 8, int height = 8)
- {
- Image image = SourceImg.GetThumbnailImage(width, height, () => { return false; }, IntPtr.Zero);
- return image;
- }
- // Step 2 : Reduce Color
- private Byte[] ReduceColor(Image image)
- {
- Bitmap bitMap = new Bitmap(image);
- Byte[] grayValues = new Byte[image.Width * image.Height];
- for (int x = 0; x < image.Width; x++)
- for (int y = 0; y < image.Height; y++)
- {
- Color color = bitMap.GetPixel(x, y);
- byte grayValue = (byte)((color.R * 30 + color.G * 59 + color.B * 11) / 100);
- grayValues[x * image.Width + y] = grayValue;
- }
- return grayValues;
- }
- // Step 3 : Average the colors
- private Byte CalcAverage(byte[] values)
- {
- int sum = 0;
- for (int i = 0; i < values.Length; i++)
- sum += (int)values[i];
- return Convert.ToByte(sum / values.Length);
- }
- // Step 4 : Compute the bits
- private String ComputeBits(byte[] values, byte averageValue)
- {
- char[] result = new char[values.Length];
- for (int i = 0; i < values.Length; i++)
- {
- if (values[i] < averageValue)
- result[i] = '0';
- else
- result[i] = '1';
- }
- SourceImg.Dispose();
- return new String(result);
- }
- // Compare hash
- public static Int32 CalcSimilarDegree(string a, string b)
- {
- if (a.Length != b.Length)
- throw new ArgumentException();
- int count = 0;
- for (int i = 0; i < a.Length; i++)
- {
- if (a[i] != b[i])
- count++;
- }
- return count;
- }
- }
- public static class imageHelper
- {
- public static int Compare(string filePath1, string filePath2)
- {
- SimilarPhoto photo1 = new SimilarPhoto(filePath1);
- SimilarPhoto photo2 = new SimilarPhoto(filePath2);
- return SimilarPhoto.CalcSimilarDegree(photo1.GetHash(), photo2.GetHash());
- }
- public static bool ByStringToSave(string name, string iss)
- {
- iss = iss.Replace("data:image/png;base64,", "").Replace("data:image/jgp;base64,", "")
- .Replace("data:image/jpg;base64,", "").Replace("data:image/jpeg;base64,", "");
- byte[] arr = Convert.FromBase64String(iss);
- MemoryStream ms = new MemoryStream(arr);
- Bitmap bmp = new Bitmap(ms);
- string StudentWorkImages = "StudentWorkImages";
-
- if (Directory.Exists(@"./wwwroot/" + StudentWorkImages) == false)//如果不存在就创建file文件夹
- {
- Directory.CreateDirectory(@"./wwwroot/" + StudentWorkImages);
- }
-
-
-
- bmp.Save(@"./wwwroot/" + StudentWorkImages + "/" + name + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
- ms.Close();
- return true;
- }
- public static bool CreateZip()
- {
- string file_path = @"./wwwroot/StudentWorkImages.zip";
- string file_path2 = @"./wwwroot/StudentWorkImages/";
- if (File.Exists(file_path))
- {
- File.Delete(file_path);
- }
-
- ZipFile.CreateFromDirectory(file_path2, file_path);
- return true;
- }
- public static bool DeleteAll()
- {
- string file_path = @"./wwwroot/StudentWorkImages/";
- if (Directory.Exists(file_path))
- {
- DelectDir(file_path);
- return true;
- }
- else
- return false;
- }
- public static bool DeleteByString(string name)
- {
- File.Delete(@"./wwwroot/StudentWorkImages/" + name + ".jpg");
- return true;
- }
- public static void DelectDir(string srcPath)
- {
- try
- {
- DirectoryInfo dir = new DirectoryInfo(srcPath);
- FileSystemInfo[] fileinfo = dir.GetFileSystemInfos(); //返回目录中所有文件和子目录
- foreach (FileSystemInfo i in fileinfo)
- {
- if (i is DirectoryInfo) //判断是否文件夹
- {
- DirectoryInfo subdir = new DirectoryInfo(i.FullName);
- subdir.Delete(true); //删除子目录和文件
- }
- else
- {
- File.Delete(i.FullName); //删除指定文件
- }
- }
- }
- catch (Exception e)
- {
- Console.Write(e.ToString());
- }
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.Common/JsonHelper.cs b/CC.Yi.Old/CC.Yi.Common/JsonHelper.cs
deleted file mode 100644
index bf4c8dfa..00000000
--- a/CC.Yi.Old/CC.Yi.Common/JsonHelper.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-
-namespace CC.Yi.Common
-{
- public static class JsonHelper
- {
- public static string JsonToString(object data=null, int code = 200, bool flag = true, string message = "成功")
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(new { code = code, flag = flag, message = message, data = data });
- }
- public static string JsonToString2(object data = null, int code = 200, bool flag = true, string message = "成功",int count=0)
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(new { code = code, flag = flag, message = message, count=count,data = data });
- }
- public static string ToString(object data)
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(data);
- }
- public static T ToJson(string data)
- {
- return Newtonsoft.Json.JsonConvert.DeserializeObject(data);
- }
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.Common/Jwt/JwtConst.cs b/CC.Yi.Old/CC.Yi.Common/Jwt/JwtConst.cs
deleted file mode 100644
index 1e7713ff..00000000
--- a/CC.Yi.Old/CC.Yi.Common/Jwt/JwtConst.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace CC.Yi.Common.Jwt
-{
- public class JwtConst
- {
- public const string SecurityKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDI2a2EJ7m872v0afyoSDJT2o1+SitIeJSWtLJU8/Wz2m7gStexajkeD+Lka6DSTy8gt9UwfgVQo6uKjVLG5Ex7PiGOODVqAEghBuS7JzIYU5RvI543nNDAPfnJsas96mSA7L/mD7RTE2drj6hf3oZjJpMPZUQI/B1Qjb5H3K3PNwIDAQAB";
- public const string Domain = "http://localhost:5000";
- }
-}
diff --git a/CC.Yi.Old/CC.Yi.Common/Result.cs b/CC.Yi.Old/CC.Yi.Common/Result.cs
deleted file mode 100644
index 6f210764..00000000
--- a/CC.Yi.Old/CC.Yi.Common/Result.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-
-namespace CC.Yi.Common
-{
- ///
- /// 结果数据
- ///
- public class Result
- {
- public bool status { get; set; }
- public int code { get; set; }
- public string msg { get; set; }
- public object data { get; set; }
- public static Result Instance(bool status, string msg)
- {
- return new Result() { status = status, code = 500, msg = msg };
- }
- public static Result Error(string msg = "fail")
- {
- return new Result() { status = false, code = 500, msg = msg };
- }
- public static Result Success(string msg = "succeed")
- {
- return new Result() { status = true, code = 200, msg = msg };
- }
- public Result SetData(object obj)
- {
- this.data = obj;
- return this;
- }
- public Result SetCode(int Code)
- {
- this.code = Code;
- return this;
- }
- }
-}
\ No newline at end of file
diff --git a/CC.Yi.Old/CC.Yi.DAL/BaseDal.cs b/CC.Yi.Old/CC.Yi.DAL/BaseDal.cs
deleted file mode 100644
index 4839e885..00000000
--- a/CC.Yi.Old/CC.Yi.DAL/BaseDal.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-using CC.Yi.IDAL;
-using CC.Yi.Model;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.ChangeTracking;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-
-namespace CC.Yi.DAL
-{
- public class BaseDal : IBaseDal where T : class, new()
- {
- public DbContext Db
- {
- get { return DbContentFactory.GetCurrentDbContent(); }
- }
- public IQueryable GetEntities(Expression> whereLambda)
- {
- return Db.Set().Where(whereLambda).AsQueryable();
- }
-
- public IQueryable GetAllEntities()
- {
- return Db.Set().AsQueryable();
- }
-
-
- public int GetCount(Expression> whereLambda)
- {
- return Db.Set().Where(whereLambda).Count();
- }
-
- public IQueryable> GetGroup(Expression> whereLambda, Expression> groupByLambda) //分组
- {
- return Db.Set().Where(whereLambda).GroupBy(groupByLambda).AsQueryable();
-
- }
-
-
-
- public IQueryable GetPageEntities