From f5fb2ea17b3abc22e58f14361ade0287666237bf Mon Sep 17 00:00:00 2001 From: chenchun Date: Sat, 2 Apr 2022 17:44:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重构代码 --- Yi.Framework.Net6/.editorconfig | 4 + .../{ => Config}/Log4net.config | 0 .../Config}/SwaggerDoc.xml | 2 +- .../Controllers/AccountController.cs | 228 ---- .../Controllers/FileController.cs | 92 -- .../Controllers/JobController.cs | 104 -- .../Controllers/MenuController.cs | 114 -- .../Controllers/MouldController.cs | 69 - .../Controllers/RoleController.cs | 106 -- .../Controllers/SettingController.cs | 60 - .../Controllers/UserController.cs | 127 +- .../Yi.Framework.ApiMicroservice/Program.cs | 16 +- .../SwaggerDoc.xml | 278 ---- .../Yi.Framework.ApiMicroservice.csproj | 10 +- .../Yi.Framework.Common/Helper/HttpHelper.cs | 4 + .../Yi.Framework.Common/Helper/MD5Hepler.cs | 2 + .../IOCOptions/AuthorizationOptions.cs | 18 + .../IOCOptions/JWTTokenOptions.cs | 31 +- .../Models/Enum/ResultCode.cs | 41 + .../Yi.Framework.Common/Models/Result.cs | 87 +- .../Models/ServiceLocator.cs | 10 + .../Yi.Framework.Common.csproj | 5 + .../Yi.Framework.Core/CacheClientDB.cs | 1136 ++--------------- .../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 | 19 +- .../Yi.Framework.Core.csproj | 5 + .../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 | 4 + .../Yi.Framework.DTOModel/loginDto.cs | 14 - .../Yi.Framework.DTOModel/menuDto.cs | 19 - ...Yi.Framework.ElasticSearchProcessor.csproj | 5 - .../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 | 76 +- .../Yi.Framework.Interface/T4Iservice.cs | 40 - .../Yi.Framework.Interface/T4Iservice.tt | 43 - .../Yi.Framework.Interface.csproj | 16 +- .../Yi.Framework.Language/LocalLanguage.cs | 7 + .../LocalLanguage.en.resx | 171 +++ .../LocalLanguage.zh.resx | 171 +++ .../Yi.Framework.Language.csproj | 9 + .../BaseModels/baseModel.cs | 18 - .../BaseModels/loopModel.cs | 20 - .../Yi.Framework.Model/DataContext.cs | 55 - .../20220221034128_yi-1.Designer.cs | 239 ---- .../Migrations/20220221034128_yi-1.cs | 221 ---- .../Migrations/DataContextModelSnapshot.cs | 237 ---- .../ModelFactory/DbContextExtend.cs | 23 - .../ModelFactory/DbContextFactory.cs | 100 -- .../ModelFactory/IDbContextFactory.cs | 13 - .../Yi.Framework.Model/Models/menu.cs | 21 - .../Yi.Framework.Model/Models/mould.cs | 14 - .../Yi.Framework.Model/Models/role.cs | 18 - .../Yi.Framework.Model/Models/user.cs | 26 +- .../Yi.Framework.Model/Models/visit.cs | 14 - .../Yi.Framework.Model/T4DataContext.cs | 18 - .../Yi.Framework.Model/T4DataContext.tt | 40 - .../Yi.Framework.Model.csproj | 22 +- .../Builder/AbstractBuilder.cs | 25 + .../Builder/AccoutBuilder.cs | 22 + .../Builder/DataContext.cs | 43 + .../Builder/GateStartBuilder.cs | 43 + .../Builder/MenuBuilder.cs | 30 + .../Builder/RefreshBuilder.cs | 26 + .../Builder/TenantBuilder.cs | 22 + .../Builder/TokenBuilder.cs | 42 + .../Builder/UserWhiteListBuilder.cs | 18 + .../Builder/WhiteListBuilder.cs | 29 + .../{ => Config}/Log4net.config | 0 .../Config/SwaggerDoc.xml | 13 + .../WebCore/OcelotExtension.cs | 65 + .../Yi.Framework.OcelotGateway.csproj | 5 +- .../Yi.Framework.Repository/DataContext.cs | 70 + .../Yi.Framework.Repository/IRepository.cs | 31 + .../Yi.Framework.Repository/Repository.cs | 321 +++++ .../Yi.Framework.Repository.csproj | 13 + .../Yi.Framework.Service/BaseService.cs | 136 -- .../Yi.Framework.Service/MenuService.cs | 72 -- .../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 | 100 +- .../Yi.Framework.Service.csproj | 16 +- .../Yi.Framework.Task/VisitJob.cs | 8 +- .../CustomAuthorizationHandler.cs | 17 +- .../Yi.Framework.WebCore/CommonExtend.cs | 16 +- .../Yi.Framework.WebCore/Init/DataSeed.cs | 78 -- .../Yi.Framework.WebCore/Init/RedisInit.cs | 31 - .../MiddlewareExtend/DbExtend.cs | 24 - .../MiddlewareExtend/DbSeedInitExtend.cs | 36 - .../MiddlewareExtend/IocExtension.cs | 6 +- .../MiddlewareExtend/RedisInitExtend.cs | 4 +- .../Utility/CustomAutofacModule.cs | 3 +- .../Yi.Framework.WebCore.csproj | 4 + Yi.Framework.Net6/Yi.Framework.sln | 14 + 105 files changed, 1489 insertions(+), 4654 deletions(-) create mode 100644 Yi.Framework.Net6/.editorconfig rename Yi.Framework.Net6/Yi.Framework.ApiMicroservice/{ => Config}/Log4net.config (100%) rename Yi.Framework.Net6/{Yi.Framework.OcelotGateway => Yi.Framework.ApiMicroservice/Config}/SwaggerDoc.xml (65%) delete mode 100644 Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/AccountController.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/FileController.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/JobController.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MouldController.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/RoleController.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/SettingController.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.ApiMicroservice/SwaggerDoc.xml create mode 100644 Yi.Framework.Net6/Yi.Framework.Common/IOCOptions/AuthorizationOptions.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.Common/Models/Enum/ResultCode.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.Common/Models/ServiceLocator.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Core/Library/Microsoft.Bcl.AsyncInterfaces.dll delete mode 100644 Yi.Framework.Net6/Yi.Framework.Core/Library/ServiceStack.Common.dll delete mode 100644 Yi.Framework.Net6/Yi.Framework.Core/Library/ServiceStack.Interfaces.dll delete mode 100644 Yi.Framework.Net6/Yi.Framework.Core/Library/ServiceStack.Redis.dll delete mode 100644 Yi.Framework.Net6/Yi.Framework.Core/Library/ServiceStack.Text.dll delete mode 100644 Yi.Framework.Net6/Yi.Framework.DTOModel/ChangePwdDto.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.DTOModel/ChildrenDto.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.DTOModel/IdsDto.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.DTOModel/SettingDto.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.DTOModel/loginDto.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.DTOModel/menuDto.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Interface/IBaseService.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Interface/IMenuService.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Interface/IMouldService.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Interface/IRoleService.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Interface/T4Iservice.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Interface/T4Iservice.tt create mode 100644 Yi.Framework.Net6/Yi.Framework.Language/LocalLanguage.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.Language/LocalLanguage.en.resx create mode 100644 Yi.Framework.Net6/Yi.Framework.Language/LocalLanguage.zh.resx create mode 100644 Yi.Framework.Net6/Yi.Framework.Language/Yi.Framework.Language.csproj delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/BaseModels/baseModel.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/BaseModels/loopModel.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/DataContext.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/Migrations/20220221034128_yi-1.Designer.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/Migrations/20220221034128_yi-1.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/Migrations/DataContextModelSnapshot.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/ModelFactory/DbContextExtend.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/ModelFactory/DbContextFactory.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/ModelFactory/IDbContextFactory.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/Models/menu.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/Models/mould.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/Models/role.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/Models/visit.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/T4DataContext.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Model/T4DataContext.tt create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/AbstractBuilder.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/AccoutBuilder.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/DataContext.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/GateStartBuilder.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/MenuBuilder.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/RefreshBuilder.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/TenantBuilder.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/TokenBuilder.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/UserWhiteListBuilder.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/WhiteListBuilder.cs rename Yi.Framework.Net6/Yi.Framework.OcelotGateway/{ => Config}/Log4net.config (100%) create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/Config/SwaggerDoc.xml create mode 100644 Yi.Framework.Net6/Yi.Framework.OcelotGateway/WebCore/OcelotExtension.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.Repository/DataContext.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.Repository/IRepository.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.Repository/Repository.cs create mode 100644 Yi.Framework.Net6/Yi.Framework.Repository/Yi.Framework.Repository.csproj delete mode 100644 Yi.Framework.Net6/Yi.Framework.Service/BaseService.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Service/MenuService.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Service/MouldService.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Service/RoleService.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Service/T4Service.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.Service/T4Service.tt delete mode 100644 Yi.Framework.Net6/Yi.Framework.WebCore/Init/DataSeed.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.WebCore/Init/RedisInit.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.WebCore/MiddlewareExtend/DbExtend.cs delete mode 100644 Yi.Framework.Net6/Yi.Framework.WebCore/MiddlewareExtend/DbSeedInitExtend.cs diff --git a/Yi.Framework.Net6/.editorconfig b/Yi.Framework.Net6/.editorconfig new file mode 100644 index 00000000..4de968e1 --- /dev/null +++ b/Yi.Framework.Net6/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] + +# SYSLIB0014: 类型或成员已过时 +dotnet_diagnostic.SYSLIB0014.severity = none diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Log4net.config b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/Log4net.config similarity index 100% rename from Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Log4net.config rename to Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/Log4net.config diff --git a/Yi.Framework.Net6/Yi.Framework.OcelotGateway/SwaggerDoc.xml b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml similarity index 65% rename from Yi.Framework.Net6/Yi.Framework.OcelotGateway/SwaggerDoc.xml rename to Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml index 16f3de1b..1f59e900 100644 --- a/Yi.Framework.Net6/Yi.Framework.OcelotGateway/SwaggerDoc.xml +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml @@ -1,7 +1,7 @@ - Yi.Framework.OcelotGateway + Yi.Framework.ApiMicroservice diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/AccountController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/AccountController.cs deleted file mode 100644 index 6d815d82..00000000 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/AccountController.cs +++ /dev/null @@ -1,228 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Yi.Framework.Common; -using Yi.Framework.Common.Const; -using Yi.Framework.Common.Helper; -using Yi.Framework.Common.Models; -using Yi.Framework.Common.QueueModel; -using Yi.Framework.Core; -using Yi.Framework.DTOModel; -using Yi.Framework.Interface; -using Yi.Framework.Model.Models; -using Yi.Framework.WebCore; -using Yi.Framework.WebCore.AuthorizationPolicy; -using Yi.Framework.WebCore.Mapper; - -namespace Yi.Framework.ApiMicroservice.Controllers -{ - [ApiController] - [Route("api/[controller]/[action]")] - public class AccountController : Controller - { - private readonly ILogger _logger; - - private IUserService _userService; - private IMenuService _menuService; - private RabbitMQInvoker _rabbitMQInvoker; - private CacheClientDB _cacheClientDB; - private IRoleService _roleService; - private IHttpContextAccessor _httpContext; - public AccountController(ILogger logger, IUserService userService, IMenuService menuService, RabbitMQInvoker rabbitMQInvoker, CacheClientDB cacheClientDB, IRoleService roleService, IHttpContextAccessor httpContext) - { - _logger = logger; - _userService = userService; - _menuService = menuService; - _rabbitMQInvoker = rabbitMQInvoker; - _cacheClientDB = cacheClientDB; - _roleService = roleService; - _httpContext = httpContext; - } - - - /// - /// 登录方法,要返回data:{user,token} token - /// - /// - /// - [HttpPost] - public async Task Login(loginDto login) - { - var _user = MapperHelper.Map(login); - var user_data = await _userService.Login(_user); - if (user_data == null) - { - return Result.Error("该用户不存在"); - } - var menuList = await _menuService.GetTopMenuByUserId(user_data.id); - if (user_data != null) - { - var token = MakeJwt.app(new jwtUser() { user = user_data, menuIds = menuList }); - JobModel.visitNum += 1; - //同时要将api路径放置到redis中 - var menuDto = MapperHelper.MapList(menuList); - _userService.SaveUserApi(user_data.id, menuDto); - return Result.Success().SetData(new { user = new { user_data.id, user_data.username, user_data.introduction, user_data.icon, user_data.nick }, token }); - } - return Result.Error(); - } - - /// - /// 不用写,单纯制作日志 - /// - /// - - [HttpPost] - public Result Logout() - { - return Result.Success(); - } - - /// - /// code为验证码,从redis中判断一下code是否正确 - /// - /// - /// - /// - [HttpPost] - public async Task Register(user _user, string code) - { - _user.username = _user.username.Trim(); - if (string.IsNullOrEmpty(_user.username)) - code = code.Trim(); - - string trueCode = _cacheClientDB.Get(RedisConst.keyCode + _user.phone); - if (code == trueCode) - { - //设置默认头像 - var setting = JsonHelper.StrToObj(_cacheClientDB.Get(RedisConst.key)); - _user.icon = setting.InitIcon; - _user.ip = _httpContext.HttpContext?.Request.Headers["X-Real-IP"].FirstOrDefault();//通过上下文获取ip - //设置默认角色 - if (string.IsNullOrEmpty(setting.InitRole)) - { - return Result.Error("无默认角色,请初始化数据库"); - } - _user.roles = new List(); - _user.roles.Add(await _roleService.GetEntity(u => u.role_name == setting.InitRole)); - await _userService.Register(_user); - - return Result.Success("恭喜,你已加入我们!"); - } - return Result.Error("验证码有误,请重新输入!"); - } - - - /// - /// 发送短信,需要将生成的sms+code存入redis - /// - /// - /// - [HttpPost] - public async Task SendSMS(string SMSAddress) - { - if (string.IsNullOrEmpty(SMSAddress)) - { - return Result.Error("请输入电话号码"); - } - SMSAddress = SMSAddress.Trim(); - if (!await _userService.PhoneIsExsit(SMSAddress)) - { - SMSQueueModel sMSQueueModel = new SMSQueueModel(); - sMSQueueModel.phone = SMSAddress; - sMSQueueModel.code = RandomHelper.GenerateCheckCodeNum(6); - - //10分钟过期 - _cacheClientDB.Set(RedisConst.keyCode + sMSQueueModel.phone, sMSQueueModel.code, TimeSpan.FromMinutes(10)); - - _rabbitMQInvoker.Send(new Common.IOCOptions.RabbitMQConsumerModel() { ExchangeName = RabbitConst.SMS_Exchange, QueueName = RabbitConst.SMS_Queue_Send }, JsonHelper.ObjToStr(sMSQueueModel)); - return Result.Success("发送短信成功,10分钟后过期,请留意短信接收"); - } - return Result.Error("该号码已被注册"); - } - - /// - /// 发送邮箱,需要先到数据库判断该邮箱是否被人注册过,到userservice写mail_exist方法,还有接口别忘了。 - /// - /// - /// - [HttpPost]//邮箱验证 - public async Task Email(string emailAddress) - { - emailAddress = emailAddress.Trim().ToLower(); - //先判断邮箱是否被注册使用过,如果被使用过,便不让操作 - if (!await _userService.EmailIsExsit(emailAddress)) - { - string code = RandomHelper.GenerateRandomLetter(6); - code = code.ToUpper();//全部转为大写 - EmailHelper.sendMail(code, emailAddress); - - //我要把邮箱和对应的code加进到数据库,还有申请时间 - //设置10分钟过期 - //set不存在便添加,如果存在便替换 - //CacheHelper.SetCache(emailAddress, code, TimeSpan.FromSeconds(10)); - - return Result.Success("发送邮件成功,请查看邮箱(可能在垃圾箱)"); - } - else - { - return Result.Error("该邮箱已被注册"); - } - // 邮箱和验证码都要被记住,然后注册时候比对邮箱和验证码是不是都和现在生成的一样 - } - /// - /// 修改密码 - /// - /// - /// - [HttpPut] - [Authorize] - public async Task ChangePassword(ChangePwdDto pwdDto) - { - var user_data = await _userService.GetUserById(pwdDto.user.id); - string msg = "修改成功"; - if (!string.IsNullOrEmpty(pwdDto.newPassword)) - { - if (user_data.password == pwdDto.user.password) - { - - user_data.password = pwdDto.newPassword; - user_data.phone = pwdDto.user.phone; - user_data.introduction = pwdDto.user.introduction; - user_data.email = pwdDto.user.email; - user_data.age = pwdDto.user.age; - user_data.address = pwdDto.user.address; - user_data.nick = pwdDto.user.nick; - - - await _userService.UpdateAsync(user_data); - user_data.password = null; - return Result.Success(msg); - } - else - { - msg = "密码错误"; - return Result.Error(msg); - } - } - - user_data.phone = pwdDto.user.phone; - user_data.introduction = pwdDto.user.introduction; - user_data.email = pwdDto.user.email; - user_data.age = pwdDto.user.age; - user_data.address = pwdDto.user.address; - user_data.nick = pwdDto.user.nick; - - await _userService.UpdateAsync(user_data); - - - return Result.Success(msg); - } - - } -} \ No newline at end of file diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/FileController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/FileController.cs deleted file mode 100644 index 8dcae4c7..00000000 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/FileController.cs +++ /dev/null @@ -1,92 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Hosting; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Yi.Framework.Common.Models; -using Yi.Framework.Interface; -using Yi.Framework.WebCore; - -namespace Yi.Framework.ApiMicroservice.Controllers -{ - [Route("api/[controller]/[action]")] - [ApiController] - public class FileController : ControllerBase - { - private IUserService _userService; - private readonly IHostEnvironment _env; - public FileController(IUserService userService, IHostEnvironment env) - { - _userService = userService; - _env = env; - } - [HttpPost] - [Authorize] - public async Task EditIcon(IFormFile file) - { - try - { - var _user = HttpContext.GetCurrentUserInfo(); - var user_data = await _userService.GetUserById(_user.id); - var type = "image"; - var filename = await Upload(type, file); - user_data.icon = filename; - await _userService.UpdateAsync(user_data); - return Result.Success(); - } - catch - { - return Result.Error(); - } - } - - [Route("/api/{type}/{fileName}")] - [HttpGet] - public IActionResult Get(string type, string fileName) - { - try - { - var path = Path.Combine($"wwwroot/{type}", fileName); - var stream = System.IO.File.OpenRead(path); - var MimeType = Common.Helper.MimeHelper.GetMimeMapping(fileName); - return new FileStreamResult(stream, MimeType); - } - catch - { - return new NotFoundResult(); - } - } - - /// - /// 该方法不对外暴露 - /// - /// - /// - /// - private async Task Upload(string type, IFormFile file) - { - string filename = Guid.NewGuid().ToString() + Path.GetExtension(file.FileName); - using (var stream = new FileStream(Path.Combine($"wwwroot/{type}", filename), FileMode.CreateNew, FileAccess.Write)) - { - await file.CopyToAsync(stream); - } - - return filename; - } - - [HttpGet] - public async Task ExportFile() - { - var userdata = await _userService.GetAllEntitiesTrueAsync(); - var userList = userdata.ToList(); - List header = new() { "用户", "密码", "头像", "昵称", "邮箱", "ip", "年龄", "个人介绍", "地址", "手机", "角色" }; - var filename = Common.Helper.ExcelHelper.CreateExcelFromList(userList, header, _env.ContentRootPath.ToString()); - var MimeType = Common.Helper.MimeHelper.GetMimeMapping(filename); - return new FileStreamResult(new FileStream(Path.Combine(_env.ContentRootPath+@"/wwwroot/Excel", filename), FileMode.Open),MimeType); - } - } -} diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/JobController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/JobController.cs deleted file mode 100644 index a7d0f35d..00000000 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/JobController.cs +++ /dev/null @@ -1,104 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Yi.Framework.Common; -using Yi.Framework.Common.Const; -using Yi.Framework.Common.Helper; -using Yi.Framework.Common.Models; -using Yi.Framework.Core; -using Yi.Framework.DTOModel; -using Yi.Framework.Interface; -using Yi.Framework.Model.Models; - -namespace Yi.Framework.ApiMicroservice.Controllers -{ - [ApiController] - [Route("api/[controller]/[action]")] - public class JobController : Controller - { - private readonly ILogger _logger; - private QuartzInvoker _quartzInvoker; - public JobController(ILogger logger,QuartzInvoker quartzInvoker) - { - _logger = logger; - _quartzInvoker = quartzInvoker; - } - - /// - /// - /// - /// - [HttpPost] - public async Task startJob() - { - //任务1 - //await _quartzInvoker.start("*/1 * * * * ? ", new Quartz.JobKey("test", "my"), "VisitJob"); - - //任务2 - Dictionary data = new Dictionary() - { - {JobConst.method,"get" }, - {JobConst.url,"https://www.baidu.com" } - }; - await _quartzInvoker.start("*/5 * * * * ?", new Quartz.JobKey("test", "my"), "Yi.Framework.Job", "HttpJob",data: data); - return Result.Success(); - } - - /// - /// - /// - /// - [HttpGet] - public async Task getRunJobList() - { - return Result.Success().SetData(await _quartzInvoker.getRunJobList()); - } - - /// - /// - /// - /// - [HttpGet] - public Result getJobClass() - { - return Result.Success().SetData(_quartzInvoker.getJobClassList()); - } - - /// - /// - /// - /// - [HttpPut] - public async Task stopJob() - { - await _quartzInvoker.Stop(new Quartz.JobKey("test", "my")); - return Result.Success(); - } - - /// - /// - /// - /// - [HttpDelete] - public async Task DeleteJob() - { - await _quartzInvoker.Delete(new Quartz.JobKey("test", "my")); - return Result.Success(); - } - - /// - /// - /// - /// - [HttpPut] - public async Task ResumeJob() - { - await _quartzInvoker.Resume(new Quartz.JobKey("test", "my")); - return Result.Success(); - } - } -} \ No newline at end of file diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs deleted file mode 100644 index 7bb08bd4..00000000 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs +++ /dev/null @@ -1,114 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Yi.Framework.Common.Models; -using Yi.Framework.DTOModel; -using Yi.Framework.Interface; -using Yi.Framework.Model.Models; -using Yi.Framework.WebCore; - -namespace Yi.Framework.ApiMicroservice.Controllers -{ - [Route("api/[controller]/[action]")] - [ApiController] - [Authorize] - public class MenuController : ControllerBase - { - private IMenuService _menuService; - private IUserService _userService; - public MenuController(IMenuService menuService,IUserService userService) - { - _menuService = menuService; - _userService = userService; - } - /// - /// 这个是要递归的,但是要过滤掉删除的,所以,可以写一个通用过滤掉删除的方法 - /// - /// - [HttpGet] - public async Task GetMenuInMould() - { - return Result.Success().SetData(await _menuService.GetMenuInMould()); - } - - /// - /// 更 - /// - /// - /// - [HttpPut] - public async Task UpdateMenu(menu _menu) - { - await _menuService.UpdateAsync(_menu); - return Result.Success(); - - } - - /// - /// 删 - /// - /// - /// - [HttpDelete] - public async Task DelListMenu(List _ids) - { - await _menuService.DelListByUpdateAsync(_ids); - return Result.Success(); - } - - /// - /// 增 - /// 现在,top菜单只允许为一个 - /// - /// - /// - [HttpPost] - public async Task AddTopMenu(menu _menu) - { - await _menuService.AddTopMenu(_menu); - return Result.Success(); - } - - /// - /// 给一个菜单设置一个接口,Id1为菜单id,Id2为接口id - /// 用于给菜单设置接口 - /// - /// - /// - [HttpPost] - public async Task SetMouldByMenu(IdDto idDto) - { - await _menuService.SetMouldByMenu(idDto.id1, idDto.id2); - return Result.Success(); - } - - - /// - /// 给一个菜单添加子节点(注意:添加,不是覆盖) - /// - /// - /// - [HttpPost] - public async Task AddChildrenMenu(ChildrenDto childrenDto) - { - await _menuService.AddChildrenMenu(childrenDto.parentId, childrenDto.data); - return Result.Success(); - } - - /// - /// 获取用户的目录菜单,不包含接口 - /// 用于账户信息页面,显示这个用户有哪些菜单,需要并列 - /// - /// - [HttpGet] - public async Task GetTopMenusByHttpUser() - { - var menuIds = _userService.GetCurrentMenuInfo(HttpContext.GetCurrentUserInfo().id); - return Result.Success().SetData(await _menuService.GetTopMenusByTopMenuIds(menuIds)); - } - } -} diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MouldController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MouldController.cs deleted file mode 100644 index 7c0ee94a..00000000 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MouldController.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Yi.Framework.Common.Models; -using Yi.Framework.Interface; -using Yi.Framework.Model.Models; - -namespace Yi.Framework.ApiMicroservice.Controllers -{ - [Route("api/[controller]/[action]")] - [ApiController] - [Authorize] - public class MouldController : ControllerBase - { - private IMouldService _mouldService; - public MouldController(IMouldService mouldService) - { - _mouldService = mouldService; - } - [HttpGet] - public async Task GetMould() - { - return Result.Success().SetData(await _mouldService.GetAllEntitiesTrueAsync()); - } - - /// - /// 更 - /// - /// - /// - [HttpPut] - public async Task UpdateMould(mould _mould) - { - await _mouldService.UpdateAsync(_mould); - return Result.Success(); - - } - - /// - /// 删 - /// - /// - /// - [HttpDelete] - public async Task DelListMould(List _ids) - { - await _mouldService.DelListByUpdateAsync(_ids); - return Result.Success(); - } - - /// - /// 增 - /// - /// - /// - [HttpPost] - public async Task AddMould(mould _mould) - { - await _mouldService.AddAsync(_mould); - return Result.Success(); - } - - - } -} diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/RoleController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/RoleController.cs deleted file mode 100644 index 46fe2cc3..00000000 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/RoleController.cs +++ /dev/null @@ -1,106 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Yi.Framework.Common.Models; -using Yi.Framework.DTOModel; -using Yi.Framework.Interface; -using Yi.Framework.Model.Models; -using Yi.Framework.WebCore; - -namespace Yi.Framework.ApiMicroservice.Controllers -{ - [Route("api/[controller]/[action]")] - [ApiController] - [Authorize] - public class RoleController : ControllerBase - { - private IRoleService _roleService; - public RoleController(IRoleService roleService) - { - _roleService = roleService; - } - [HttpGet] - public async Task GetRole() - { - return Result.Success().SetData(await _roleService.GetAllEntitiesTrueAsync()); - } - - - /// - /// 更 - /// - /// - /// - [HttpPut] - public async Task UpdateRole(role _role) - { - await _roleService.UpdateAsync(_role); - return Result.Success(); - - } - - /// - /// 删 - /// - /// - /// - [HttpDelete] - public async Task DelListRole(List _ids) - { - await _roleService.DelListByUpdateAsync(_ids); - return Result.Success(); - } - - /// - /// 增 - /// - /// - /// - [HttpPost] - public async Task AddRole(role _role) - { - await _roleService.AddAsync(_role); - return Result.Success(); - } - - /// - /// 根据用户id得到该用户有哪些角色 - /// 用于显示用户详情中的角色说明 - /// - /// - [HttpGet] - public async Task GetRolesByUserId(int userId) - { - - return Result.Success().SetData(await _roleService.GetRolesByUserId(userId)); - } - /// - /// 给角色设置菜单,多个角色与多个菜单,让每一个角色都设置,ids1为角色,ids2为菜单 - /// 用于设置角色 - /// - /// - /// - [HttpPost] - public async Task SetMenuByRole(IdsListDto idsListDto) - { - await _roleService.SetMenusByRolesId(idsListDto.ids2, idsListDto.ids1); - return Result.Success(); - } - /// - /// 用于给角色设置菜单的时候,点击一个角色,显示这个角色拥有的并列的菜单 - /// - /// - /// - [HttpGet] - public async Task GetTopMenusByRoleId(int roleId) - { - - return Result.Success().SetData(await _roleService.GetTopMenusByRoleId(roleId) ); ; - } - } -} diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/SettingController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/SettingController.cs deleted file mode 100644 index d101bc9d..00000000 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/SettingController.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Yi.Framework.Common.Const; -using Yi.Framework.Common.Models; -using Yi.Framework.Core; -using Yi.Framework.DTOModel; -using Yi.Framework.Interface; -using Yi.Framework.Model.Models; -using Yi.Framework.WebCore; - -namespace Yi.Framework.ApiMicroservice.Controllers -{ - [ApiController] - [Route("api/[controller]/[action]")] - [Authorize] - public class SettingController : ControllerBase - { - private readonly ILogger _logger; - private readonly CacheClientDB _cacheClientDB; - - public SettingController(ILogger logger, CacheClientDB cacheClientDB) - { - _logger = logger; - _cacheClientDB = cacheClientDB; - } - - - - /// - /// 查 - /// - /// - [HttpGet] - public Result GetSetting() - { - var setDto = Common.Helper.JsonHelper.StrToObj(_cacheClientDB.Get(RedisConst.key)); - return Result.Success().SetData( setDto); - } - - /// - /// 更 - /// - /// - /// - [HttpPut] - public Result UpdateSetting(SettingDto settingDto) - { - var setDto = Common.Helper.JsonHelper.ObjToStr(settingDto); - - _cacheClientDB.Set(RedisConst.key, setDto); - return Result.Success(); - - } - } -} diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/UserController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/UserController.cs index 24a3dc96..3bd4adb2 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/UserController.cs +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/UserController.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Yi.Framework.Common.Models; -using Yi.Framework.DTOModel; using Yi.Framework.Interface; using Yi.Framework.Model.Models; using Yi.Framework.WebCore; @@ -21,133 +20,17 @@ namespace Yi.Framework.ApiMicroservice.Controllers { private readonly ILogger _logger; - private IUserService _userService; - public UserController(ILogger logger, IUserService userService) + private IUserService _iUserService; + public UserController(ILogger logger, IUserService iUserService) { _logger = logger; - _userService = userService; + _iUserService = iUserService; } - /// - /// 查 - /// - /// - - [Authorize(PolicyName.Menu)] [HttpGet] - public async Task GetUser() + public async Task Get() { - return Result.Success().SetData(await _userService.GetAllEntitiesTrueAsync()); + return Result.Success().SetData(await _iUserService.GetListAsync()); } - - /// - /// 更 - /// - /// - /// - [HttpPut] - [Authorize(PolicyName.Menu)] - public async Task UpdateUser(user _user) - { - await _userService.UpdateAsync(_user); - return Result.Success(); - - } - - /// - /// 删 - /// - /// - /// - [HttpDelete] - [Authorize(PolicyName.Menu)] - public async Task DelListUser(List _ids) - { - await _userService.DelListByUpdateAsync(_ids); - return Result.Success(); - } - - /// - /// 增 - /// - /// - /// - [HttpPost] - [Authorize(PolicyName.Menu)] - public async Task AddUser(user _user) - { - await _userService.AddAsync(_user); - return Result.Success(); - } - - - /// - /// SetRoleByUser - /// 给多个用户设置多个角色,ids有用户id与 角色列表ids,多对多,ids1用户,ids2为角色 - /// 用户设置给用户设置角色 - /// - /// - /// - [HttpPost] - public async Task SetRoleByUser(IdsListDto idsListDto) - { - await _userService.SetRoleByUser(idsListDto.ids2, idsListDto.ids1); - return Result.Success(); - } - - /// - /// 根据http上下文的用户得到该用户信息,关联角色 - /// 用于显示账号信息页中的用户信息和角色信息 - /// - /// - [HttpGet] - public async Task GetUserInRolesByHttpUser() - { - var _user = HttpContext.GetCurrentUserInfo(); - return Result.Success().SetData( await _userService.GetUserInRolesByHttpUser(_user.id)); - } - - /// - /// 得到登录用户的递归菜单,放到导航栏 - /// 用户放到导航栏中 - /// - /// - [HttpGet] - public async Task GetMenuByHttpUser() - { - var allMenuIds= _userService.GetCurrentMenuInfo(HttpContext.GetCurrentUserInfo().id); - return Result.Success().SetData(await _userService.GetMenuByHttpUser(allMenuIds)); - } - - /// - /// 得到请求模型 - /// - /// - /// - [HttpGet] - public async Task GetAxiosByRouter(string router) - { - var _user = HttpContext.GetCurrentUserInfo(); - var menuIds = _userService.GetCurrentMenuInfo(_user.id); - if (menuIds == null) - { - return Result.Error(); - } - var menuList= await _userService.GetAxiosByRouter(router, menuIds); - AxiosUrlsModel urlsModel = new(); - menuList.ForEach(u => - { - switch (u.menu_name) - { - case "get":urlsModel.get = u.mould.url;break; - case "del": urlsModel.del = u.mould.url; break; - case "add": urlsModel.add = u.mould.url; break; - case "update": urlsModel.update = u.mould.url; break; - } - }); - - return Result.Success().SetData(urlsModel); - } - } } diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Program.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Program.cs index a3407a57..0204b559 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Program.cs +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Program.cs @@ -1,10 +1,10 @@ using Autofac.Extensions.DependencyInjection; using Yi.Framework.WebCore.BuilderExtend; using Yi.Framework.Core; -using Yi.Framework.Model.ModelFactory; using Yi.Framework.WebCore.MiddlewareExtend; using Yi.Framework.WebCore.Utility; using Autofac; +using Yi.Framework.Common.Models; var builder = WebApplication.CreateBuilder(args); @@ -70,10 +70,6 @@ builder.Services.AddJwtService(); #endregion builder.Services.AddAuthorizationService(); #region -//ݿ -#endregion -builder.Services.AddDbService(); -#region //Redis #endregion builder.Services.AddRedisService(); @@ -95,6 +91,11 @@ builder.Services.AddSMSService(); builder.Services.AddCAPService(); //----------------------------------------------------------------------------------------------------------- var app = builder.Build(); + +#region +// +#endregion +ServiceLocator.Instance = app.Services; //if (app.Environment.IsDevelopment()) { #region @@ -110,7 +111,6 @@ var app = builder.Build(); //ץȡע #endregion app.UseErrorHandlingService(); - #region //̬ļע #endregion @@ -144,10 +144,6 @@ app.UseAuthorization(); #endregion app.UseConsulService(); #region -//ݿע -#endregion -app.UseDbSeedInitService(app.Services.GetService()); -#region //redisע #endregion app.UseRedisSeedInitService(app.Services.GetService()); diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/SwaggerDoc.xml b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/SwaggerDoc.xml deleted file mode 100644 index 2eed29be..00000000 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/SwaggerDoc.xml +++ /dev/null @@ -1,278 +0,0 @@ - - - - Yi.Framework.ApiMicroservice - - - - - 登录方法,要返回data:{user,token} token - - - - - - - 不用写,单纯制作日志 - - - - - - code为验证码,从redis中判断一下code是否正确 - - - - - - - - 发送短信,需要将生成的sms+code存入redis - - - - - - - 发送邮箱,需要先到数据库判断该邮箱是否被人注册过,到userservice写mail_exist方法,还有接口别忘了。 - - - - - - - 修改密码 - - - - - - - 该方法不对外暴露 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 这个是要递归的,但是要过滤掉删除的,所以,可以写一个通用过滤掉删除的方法 - - - - - - 更 - - - - - - - 删 - - - - - - - 增 - 现在,top菜单只允许为一个 - - - - - - - 给一个菜单设置一个接口,Id1为菜单id,Id2为接口id - 用于给菜单设置接口 - - - - - - - 给一个菜单添加子节点(注意:添加,不是覆盖) - - - - - - - 获取用户的目录菜单,不包含接口 - 用于账户信息页面,显示这个用户有哪些菜单,需要并列 - - - - - - 更 - - - - - - - 删 - - - - - - - 增 - - - - - - - 更 - - - - - - - 删 - - - - - - - 增 - - - - - - - 根据用户id得到该用户有哪些角色 - 用于显示用户详情中的角色说明 - - - - - - 给角色设置菜单,多个角色与多个菜单,让每一个角色都设置,ids1为角色,ids2为菜单 - 用于设置角色 - - - - - - - 用于给角色设置菜单的时候,点击一个角色,显示这个角色拥有的并列的菜单 - - - - - - - 查 - - - - - - 更 - - - - - - - 查 - - - - - - 更 - - - - - - - 删 - - - - - - - 增 - - - - - - - SetRoleByUser - 给多个用户设置多个角色,ids有用户id与 角色列表ids,多对多,ids1用户,ids2为角色 - 用户设置给用户设置角色 - - - - - - - 根据http上下文的用户得到该用户信息,关联角色 - 用于显示账号信息页中的用户信息和角色信息 - - - - - - 得到登录用户的递归菜单,放到导航栏 - 用户放到导航栏中 - - - - - - 得到请求模型 - - - - - - diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj index 67e6d2f3..f721809f 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj @@ -9,7 +9,7 @@ - D:\CC.Yi\CC.Yi\Yi.Framework.Net6\Yi.Framework.ApiMicroservice\SwaggerDoc.xml + ./Config/SwaggerDoc.xml 1701;1702;CS1591 @@ -20,14 +20,6 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/Yi.Framework.Net6/Yi.Framework.Common/Helper/HttpHelper.cs b/Yi.Framework.Net6/Yi.Framework.Common/Helper/HttpHelper.cs index afc9c4d7..cd668621 100644 --- a/Yi.Framework.Net6/Yi.Framework.Common/Helper/HttpHelper.cs +++ b/Yi.Framework.Net6/Yi.Framework.Common/Helper/HttpHelper.cs @@ -14,7 +14,9 @@ namespace Yi.Framework.Common.Helper { public static string HttpGet(string Url, string postDataStr="") { +#pragma warning disable SYSLIB0014 // 类型或成员已过时 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url + (postDataStr == "" ? "" : "?") + postDataStr); +#pragma warning restore SYSLIB0014 // 类型或成员已过时 request.Method = "GET"; request.ContentType = "text/html;charset=UTF-8"; @@ -52,7 +54,9 @@ namespace Yi.Framework.Common.Helper public static string HttpPost(string Url, string postDataStr="") { CookieContainer cookie = new CookieContainer(); +#pragma warning disable SYSLIB0014 // 类型或成员已过时 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url); +#pragma warning restore SYSLIB0014 // 类型或成员已过时 request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = Encoding.UTF8.GetByteCount(postDataStr); diff --git a/Yi.Framework.Net6/Yi.Framework.Common/Helper/MD5Hepler.cs b/Yi.Framework.Net6/Yi.Framework.Common/Helper/MD5Hepler.cs index 6eb53422..016d4e63 100644 --- a/Yi.Framework.Net6/Yi.Framework.Common/Helper/MD5Hepler.cs +++ b/Yi.Framework.Net6/Yi.Framework.Common/Helper/MD5Hepler.cs @@ -13,7 +13,9 @@ namespace Yi.Framework.Common.Helper /// public static string MD5Encrypt16(string password) { +#pragma warning disable SYSLIB0021 // 类型或成员已过时 var md5 = new MD5CryptoServiceProvider(); +#pragma warning restore SYSLIB0021 // 类型或成员已过时 string t2 = BitConverter.ToString(md5.ComputeHash(Encoding.Default.GetBytes(password)), 4, 8); t2 = t2.Replace("-", string.Empty); return t2; diff --git a/Yi.Framework.Net6/Yi.Framework.Common/IOCOptions/AuthorizationOptions.cs b/Yi.Framework.Net6/Yi.Framework.Common/IOCOptions/AuthorizationOptions.cs new file mode 100644 index 00000000..f204dd05 --- /dev/null +++ b/Yi.Framework.Net6/Yi.Framework.Common/IOCOptions/AuthorizationOptions.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Yi.Framework.Common.IOCOptions +{ + public class AuthorizationOptions + { + public string Refresh { get; set; } + public List WhiteList { get; set; } + public List AccountList { get; set; } + public List UserList { get; set; } + + public List TenantList { get; set; } + } +} diff --git a/Yi.Framework.Net6/Yi.Framework.Common/IOCOptions/JWTTokenOptions.cs b/Yi.Framework.Net6/Yi.Framework.Common/IOCOptions/JWTTokenOptions.cs index 89fd0993..9403d337 100644 --- a/Yi.Framework.Net6/Yi.Framework.Common/IOCOptions/JWTTokenOptions.cs +++ b/Yi.Framework.Net6/Yi.Framework.Common/IOCOptions/JWTTokenOptions.cs @@ -1,32 +1,21 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; namespace Yi.Framework.Common.IOCOptions { public class JWTTokenOptions { - public string Audience - { - get; - set; - } - public string SecurityKey - { - get; - set; - } - //public SigningCredentials Credentials - //{ - // get; - // set; - //} - public string Issuer - { - get; - set; - } + public string Audience { get; set; } + + public string Issuer { get; set; } + + public string SecurityKey { get; set; } + + public string DefaultScheme { get; set; } + public int Expiration { get; set; } + + public int ReExpiration { get; set; } } } diff --git a/Yi.Framework.Net6/Yi.Framework.Common/Models/Enum/ResultCode.cs b/Yi.Framework.Net6/Yi.Framework.Common/Models/Enum/ResultCode.cs new file mode 100644 index 00000000..3e049148 --- /dev/null +++ b/Yi.Framework.Net6/Yi.Framework.Common/Models/Enum/ResultCode.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Yi.Framework.Common.Models.Enum +{ + public enum ResultCode + { + /// + /// 操作成功。 + /// + Success = 200, + + /// + /// 操作不成功 + /// + NotSuccess = 500, + + /// + /// 无权限 + /// + NoPermission = 401, + + /// + /// Access过期 + /// + AccessTokenExpire = 1001, + + /// + /// Refresh过期 + /// + RefreshTokenExpire = 1002, + + /// + /// 没有角色登录 + /// + NoRoleLogin = 1003, + } +} diff --git a/Yi.Framework.Net6/Yi.Framework.Common/Models/Result.cs b/Yi.Framework.Net6/Yi.Framework.Common/Models/Result.cs index 890b01f7..3e2e1cac 100644 --- a/Yi.Framework.Net6/Yi.Framework.Common/Models/Result.cs +++ b/Yi.Framework.Net6/Yi.Framework.Common/Models/Result.cs @@ -1,70 +1,90 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; +using Microsoft.Extensions.Localization; +using Yi.Framework.Common.Models.Enum; +using Yi.Framework.Language; namespace Yi.Framework.Common.Models { - /// - /// 结果数据 - /// public class Result { + public static IStringLocalizer _local; + public ResultCode code { get; set; } + public bool status { get; set; } - public int code { get; set; } - public string msg { get; set; } + public string message { get; set; } public object data { get; set; } - public static Result Instance(bool status, string msg) + public static Result Expire(ResultCode code, string msg="") { - return new Result() { status = status, code = 500, msg = msg }; + return new Result() { code = code, status=false, message = Get(msg, "token_expiration") }; } - public static Result Error(string msg = "fail") + public static Result Error(string msg = "") { - return new Result() { status = false, code = 500, msg = msg }; + return new Result() { code = ResultCode.NotSuccess,status=false, message =Get(msg, "fail") }; } - public static Result Success(string msg = "succeed") + public static Result Success(string msg = "") { - return new Result() { status = true, code = 200, msg = msg }; + return new Result() { code = ResultCode.Success,status=true, message =Get( msg, "succeed" )}; } - public static Result UnAuthorize(string msg = "unAuthorize") + public static Result SuccessError(string msg = "") { - return new Result() { status = false, code = 401, msg = msg }; + return new Result() { code = ResultCode.Success, status = false, message = Get(msg, "fail") }; } + + public static Result UnAuthorize(string msg = "") + { + return new Result() { code = ResultCode.NoPermission,status=false, message = Get(msg, "unAuthorize") }; + } + public Result SetStatus(bool _status) + { + this.status = _status; + return this; + } public Result SetData(object obj) { this.data = obj; return this; } - public Result SetCode(int Code) + public Result SetCode(ResultCode Code) { this.code = Code; return this; } + public Result StatusFalse() + { + this.status = false; + return this; + } + public Result StatusTrue() + { + this.status = true; + return this; + } + + public static string Get(string msg,string msg2) + { + if (msg=="") + { + msg = _local[msg2]; + } + return msg; + } } public class Result { - public bool status { get; set; } - public int code { get; set; } - public string msg { get; set; } + public ResultCode code { get; set; } + public string message { get; set; } public T 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 }; + return new Result() { code = ResultCode.NotSuccess, message = msg }; } public static Result Success(string msg = "succeed") { - return new Result { status = true, code = 200, msg = msg }; + return new Result() { code = ResultCode.Success, message = msg }; } - public static Result UnAuthorize(string msg = "unAuthorize") { - return new Result{ status = false, code = 401, msg = msg }; + return new Result() { code = ResultCode.NoPermission, message = msg }; } public Result SetData(T TValue) @@ -72,6 +92,11 @@ namespace Yi.Framework.Common.Models this.data = TValue; return this; } - } + public Result SetCode(ResultCode Code) + { + this.code = Code; + return this; + } + } } \ No newline at end of file diff --git a/Yi.Framework.Net6/Yi.Framework.Common/Models/ServiceLocator.cs b/Yi.Framework.Net6/Yi.Framework.Common/Models/ServiceLocator.cs new file mode 100644 index 00000000..09b6c5cd --- /dev/null +++ b/Yi.Framework.Net6/Yi.Framework.Common/Models/ServiceLocator.cs @@ -0,0 +1,10 @@ +using System; + +namespace Yi.Framework.Common.Models +{ + public static class ServiceLocator + { + public static IServiceProvider Instance { get; set; } + } + +} diff --git a/Yi.Framework.Net6/Yi.Framework.Common/Yi.Framework.Common.csproj b/Yi.Framework.Net6/Yi.Framework.Common/Yi.Framework.Common.csproj index bea37057..70af49f1 100644 --- a/Yi.Framework.Net6/Yi.Framework.Common/Yi.Framework.Common.csproj +++ b/Yi.Framework.Net6/Yi.Framework.Common/Yi.Framework.Common.csproj @@ -6,7 +6,12 @@ + + + + + diff --git a/Yi.Framework.Net6/Yi.Framework.Core/CacheClientDB.cs b/Yi.Framework.Net6/Yi.Framework.Core/CacheClientDB.cs index c9ffbb7e..a5b6c3a3 100644 --- a/Yi.Framework.Net6/Yi.Framework.Core/CacheClientDB.cs +++ b/Yi.Framework.Net6/Yi.Framework.Core/CacheClientDB.cs @@ -1,8 +1,4 @@ using Microsoft.Extensions.Options; -using ServiceStack; -using ServiceStack.Redis; -using ServiceStack.Redis.Pipeline; -using ServiceStack.Text; using System; using System.Collections; using System.Collections.Generic; @@ -12,1068 +8,78 @@ using System.Text; using System.Threading.Tasks; using System.IO; using Yi.Framework.Common.IOCOptions; +using CSRedis; namespace Yi.Framework.Core { - public class CacheClientDB : IDisposable - { - private readonly RedisConnOptions _RedisOptions; - - #region TestRedisCrack - //static CacheClientDB() - //{ - // try - // { - // Parallel.For(0, 10000, (i) => - // { - // using (RedisClient client = new RedisClient("192.168.3.254")) - // { - // client.Set("name" + i, i); - // client.Incr("name" + i); - // Console.WriteLine(i); - // } - - // }); - // Console.WriteLine("ok"); - - // Console.WriteLine("Hello World!"); - // } - // catch (Exception ex) - // { - // Console.WriteLine(ex.Message); - // } - //} - #endregion - public CacheClientDB(IOptionsMonitor redisConnOptions) - { - this._RedisOptions = redisConnOptions.CurrentValue; - client = new RedisClient(_RedisOptions.Host, _RedisOptions.Prot, _RedisOptions.Password, _RedisOptions.DB); - } - // 管道模式 三种模式 - public IRedisClient GetClient() - { - return client; - } - private IRedisClient client; - - public void Dispose() - { - - this.TryCatchException(delegate - { - this.client.Dispose(); - }, string.Empty); - } - // 为了以后全链路做准备 - private void TryCatchException(Action action, string key) - { - try - { - action(); - } - catch (Exception e) - { - - Console.WriteLine(e.Message); - } - } - - private T TryCatch(Func action, string key) - { - Stopwatch sw = Stopwatch.StartNew(); - //Exception ex = null; - //bool isError = false; - T result; - try - { - result = action(); - } - catch (Exception exinfo) - { - object p=null; - result =(T)p; - //isError = true; - Console.WriteLine(exinfo); - - } - finally - { - - sw.Stop(); - - } - - return result; - } - - private void TryCatch(Action action, string key) - { - - Stopwatch sw = Stopwatch.StartNew(); - //bool isError = false; - //Exception ex = null; - try - { - action(); - } - catch (Exception exinfo) - { - - //isError = true; - Console.WriteLine(exinfo); - } - finally - { - sw.Stop(); - - } - } - public bool Add(string key, T value) - { - - return this.TryCatch(() => this.client.Add(key, value), key); - } - /// - /// 简单模式 事务模式 - /// - /// - /// - /// - /// - /// - public bool Add(string key, T value, DateTime expiresAt) - { - - return this.TryCatch(() => this.client.Add(key, value, expiresAt), key); - } - - public bool Add(string key, T value, TimeSpan expiresIn) - { - return this.TryCatch(() => this.client.Add(key, value, expiresIn), key); - } - - public long Decrement(string key, uint amount) - { - return this.TryCatch(() => this.client.Decrement(key, amount), key); - } - - public void FlushAll() - { - this.TryCatch(delegate - { - this.client.FlushAll(); - }, string.Empty); - } - - public T Get(string key) - { - return this.TryCatch(() => this.client.Get(key), key); - } - - public IDictionary GetAll(IEnumerable keys) - { - return this.TryCatch>(() => this.client.GetAll(keys), keys.FirstOrDefault()); - } - - public long Increment(string key, uint amount) - { - return this.TryCatch(() => this.client.Increment(key, amount), key); - } - - public bool Remove(string key) - { - return this.TryCatch(() => this.client.Remove(key), key); - } - - public void RemoveAll(IEnumerable keys) - { - this.TryCatch(delegate - { - this.client.RemoveAll(keys); - }, keys.FirstOrDefault()); - } - - public bool Replace(string key, T value) - { - return this.TryCatch(() => this.client.Replace(key, value), key); - } - - public bool Replace(string key, T value, DateTime expiresAt) - { - return this.TryCatch(() => this.client.Replace(key, value, expiresAt), key); - } - - public bool Replace(string key, T value, TimeSpan expiresIn) - { - return this.TryCatch(() => this.client.Replace(key, value, expiresIn), key); - } - - public bool Set(string key, T value) - { - return this.TryCatch(() => this.client.Set(key, value), key); - } - - public bool Set(string key, T value, DateTime expiresAt) - { - return this.TryCatch(() => this.client.Set(key, value, expiresAt), key); - } - - public bool Set(string key, T value, TimeSpan expiresIn) - { - return this.TryCatch(() => this.client.Set(key, value, expiresIn), key); - } - - public void SetAll(IDictionary values) - { - this.TryCatch(delegate - { - this.client.SetAll(values); - }, values.Keys.FirstOrDefault()); - } - - - public void Delete(T entity) where T : class, new() - { - this.TryCatch(delegate - { - this.client.Delete(entity); - }, string.Empty); - } - - public void DeleteAll() where TEntity : class, new() - { - this.TryCatch(delegate - { - this.client.DeleteAll(); - }, string.Empty); - } - - public void DeleteById(object id) where T : class, new() - { - this.TryCatch(delegate - { - this.client.DeleteById(id); - }, string.Empty); - } - - public void DeleteByIds(ICollection ids) where T : class, new() - { - this.TryCatch(delegate - { - this.client.DeleteById(ids); - }, string.Empty); - } - - public T GetById(object id) where T : class, new() - { - return this.TryCatch(() => this.client.GetById(id), string.Empty); - } - - public IList GetByIds(ICollection ids) where T : class, new() - { - return this.TryCatch>(() => this.client.GetByIds(ids), string.Empty); - } - - public T Store(T entity) where T : class, new() - { - return this.TryCatch(() => this.client.Store(entity), string.Empty); - } - - public void StoreAll(IEnumerable entities) where TEntity : class, new() - { - this.TryCatch(delegate - { - this.client.StoreAll(entities); - }, string.Empty); - } - - public void AddItemToList(string listId, string value) - { - this.TryCatch(delegate - { - this.client.AddItemToList(listId, value); - }, listId); - } - - public void AddItemToSet(string setId, string item) - { - this.TryCatch(delegate - { - this.client.AddItemToSet(setId, item); - }, setId); - } - - public bool AddItemToSortedSet(string setId, string value) - { - return this.TryCatch(() => this.client.AddItemToSortedSet(setId, value), setId); - } - - public bool AddItemToSortedSet(string setId, string value, double score) - { - return this.TryCatch(() => this.client.AddItemToSortedSet(setId, value, score), setId); - } - - public void AddRangeToList(string listId, List values) - { - this.TryCatch(delegate - { - this.client.AddRangeToList(listId, values); - }, listId); - } - - public void AddRangeToSet(string setId, List items) - { - this.TryCatch(delegate - { - this.client.AddRangeToSet(setId, items); - }, setId); - } - - public bool AddRangeToSortedSet(string setId, List values, double score) - { - return this.TryCatch(() => this.client.AddRangeToSortedSet(setId, values, score), setId); - } - - public bool AddRangeToSortedSet(string setId, List values, long score) - { - return this.TryCatch(() => this.client.AddRangeToSortedSet(setId, values, score), setId); - } - - public long AppendToValue(string key, string value) - { - return this.TryCatch(() => this.client.AppendToValue(key, value), key); - } - - public string BlockingDequeueItemFromList(string listId, TimeSpan? timeOut) - { - return this.TryCatch(() => this.client.BlockingDequeueItemFromList(listId, timeOut), listId); - } - - public KeyValuePair BlockingDequeueItemFromLists(string[] listIds, TimeSpan? timeOut) - { - return this.TryCatch>(delegate - { - ItemRef item = this.client.BlockingDequeueItemFromLists(listIds, timeOut); - return new KeyValuePair(item.Id, item.Item); - }, listIds[0]); - } - - public string BlockingPopAndPushItemBetweenLists(string fromListId, string toListId, TimeSpan? timeOut) - { - return this.TryCatch(() => this.client.BlockingPopAndPushItemBetweenLists(fromListId, toListId, timeOut), fromListId); - } - - public string BlockingPopItemFromList(string listId, TimeSpan? timeOut) - { - return this.TryCatch(() => this.client.BlockingPopItemFromList(listId, timeOut), listId); - } - - public KeyValuePair BlockingPopItemFromLists(string[] listIds, TimeSpan? timeOut) - { - return this.TryCatch>(delegate - { - ItemRef item = this.client.BlockingPopItemFromLists(listIds, timeOut); - return new KeyValuePair(item.Id, item.Item); - }, listIds[0]); - } - - public string BlockingRemoveStartFromList(string listId, TimeSpan? timeOut) - { - return this.TryCatch(() => this.client.BlockingRemoveStartFromList(listId, timeOut), listId); - } - - public KeyValuePair BlockingRemoveStartFromLists(string[] listIds, TimeSpan? timeOut) - { - return this.TryCatch>(delegate - { - ItemRef item = this.client.BlockingRemoveStartFromLists(listIds, timeOut); - return new KeyValuePair(item.Id, item.Item); - }, listIds[0]); - } - - public bool ContainsKey(string key) - { - return this.TryCatch(() => this.client.ContainsKey(key), key); - } - - public long DecrementValue(string key) - { - return this.TryCatch(() => this.client.DecrementValue(key), key); - } - - public long DecrementValueBy(string key, int count) - { - return this.TryCatch(() => this.client.DecrementValueBy(key, count), key); - } - - public string DequeueItemFromList(string listId) - { - return this.TryCatch(() => this.client.DequeueItemFromList(listId), listId); - } - - public void EnqueueItemOnList(string listId, string value) - { - this.TryCatch(delegate - { - this.client.EnqueueItemOnList(listId, value); - }, listId); - } - - public bool ExpireEntryAt(string key, DateTime expireAt) - { - return this.TryCatch(() => this.client.ExpireEntryAt(key, expireAt), key); - } - - public bool ExpireEntryIn(string key, TimeSpan expireIn) - { - return this.TryCatch(() => this.client.ExpireEntryIn(key, expireIn), key); - } - - public Dictionary GetAllEntriesFromHash(string hashId) - { - return this.TryCatch>(() => this.client.GetAllEntriesFromHash(hashId), hashId); - } - - public List GetAllItemsFromList(string listId) - { - return this.TryCatch>(() => this.client.GetAllItemsFromList(listId), listId); - } - - public HashSet GetAllItemsFromSet(string setId) - { - return this.TryCatch>(() => this.client.GetAllItemsFromSet(setId), setId); - } - - public List GetAllItemsFromSortedSet(string setId) - { - return this.TryCatch>(() => this.client.GetAllItemsFromSortedSet(setId), setId); - } - - public List GetAllItemsFromSortedSetDesc(string setId) - { - return this.TryCatch>(() => this.client.GetAllItemsFromSortedSetDesc(setId), setId); - } - - public List GetAllKeys() - { - return this.TryCatch>(() => this.client.GetAllKeys(), string.Empty); - } - - public IDictionary GetAllWithScoresFromSortedSet(string setId) - { - return this.TryCatch>(() => this.client.GetAllWithScoresFromSortedSet(setId), setId); - } - - public string GetAndSetEntry(string key, string value) - { - return this.TryCatch(() => this.client.GetAndSetValue(key, value), key); - } - - public HashSet GetDifferencesFromSet(string fromSetId, params string[] withSetIds) - { - return this.TryCatch>(() => this.client.GetDifferencesFromSet(fromSetId, withSetIds), fromSetId); - } - - public T GetFromHash(object id) - { - return this.TryCatch(() => this.client.GetFromHash(id), string.Empty); - } - - public long GetHashCount(string hashId) - { - return this.TryCatch(() => this.client.GetHashCount(hashId), hashId); - } - - public List GetHashKeys(string hashId) - { - return this.TryCatch>(() => this.client.GetHashKeys(hashId), hashId); - } - - public List GetHashValues(string hashId) - { - return this.TryCatch>(() => this.client.GetHashValues(hashId), hashId); - } - - public HashSet GetIntersectFromSets(params string[] setIds) - { - return this.TryCatch>(() => this.client.GetIntersectFromSets(setIds), setIds[0]); - } - - public string GetItemFromList(string listId, int listIndex) - { - return this.TryCatch(() => this.client.GetItemFromList(listId, listIndex), listId); - } - - public long GetItemIndexInSortedSet(string setId, string value) - { - return this.TryCatch(() => this.client.GetItemIndexInSortedSet(setId, value), setId); - } - - public long GetItemIndexInSortedSetDesc(string setId, string value) - { - return this.TryCatch(() => this.client.GetItemIndexInSortedSetDesc(setId, value), setId); - } - - public double GetItemScoreInSortedSet(string setId, string value) - { - return this.TryCatch(() => this.client.GetItemScoreInSortedSet(setId, value), setId); - } - - public long GetListCount(string listId) - { - return this.TryCatch(() => this.client.GetListCount(listId), listId); - } - - public string GetRandomItemFromSet(string setId) - { - return this.TryCatch(() => this.client.GetRandomItemFromSet(setId), setId); - } - - public List GetRangeFromList(string listId, int startingFrom, int endingAt) - { - return this.TryCatch>(() => this.client.GetRangeFromList(listId, startingFrom, endingAt), listId); - } - - public List GetRangeFromSortedList(string listId, int startingFrom, int endingAt) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedList(listId, startingFrom, endingAt), listId); - } - - public List GetRangeFromSortedSet(string setId, int fromRank, int toRank) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSet(setId, fromRank, toRank), setId); - } - - public List GetRangeFromSortedSetByHighestScore(string setId, double fromScore, double toScore) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromScore, toScore), setId); - } - - public List GetRangeFromSortedSetByHighestScore(string setId, long fromScore, long toScore) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromScore, toScore), setId); - } - - public List GetRangeFromSortedSetByHighestScore(string setId, string fromStringScore, string toStringScore) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromStringScore, toStringScore), setId); - } - - public List GetRangeFromSortedSetByHighestScore(string setId, double fromScore, double toScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromScore, toScore, skip, take), setId); - } - - public List GetRangeFromSortedSetByHighestScore(string setId, long fromScore, long toScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromScore, toScore, skip, take), setId); - } - - public List GetRangeFromSortedSetByHighestScore(string setId, string fromStringScore, string toStringScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromStringScore, toStringScore, skip, take), setId); - } - - public List GetRangeFromSortedSetByLowestScore(string setId, double fromScore, double toScore) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromScore, toScore), setId); - } - - public List GetRangeFromSortedSetByLowestScore(string setId, long fromScore, long toScore) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromScore, toScore), setId); - } - - public List GetRangeFromSortedSetByLowestScore(string setId, string fromStringScore, string toStringScore) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromStringScore, toStringScore), setId); - } - - public List GetRangeFromSortedSetByLowestScore(string setId, double fromScore, double toScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromScore, toScore, skip, take), setId); - } - - public List GetRangeFromSortedSetByLowestScore(string setId, long fromScore, long toScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromScore, toScore, skip, take), setId); - } - - public List GetRangeFromSortedSetByLowestScore(string setId, string fromStringScore, string toStringScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromStringScore, toStringScore, skip, take), setId); - } - - public List GetRangeFromSortedSetDesc(string setId, int fromRank, int toRank) - { - return this.TryCatch>(() => this.client.GetRangeFromSortedSetDesc(setId, fromRank, toRank), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSet(string setId, int fromRank, int toRank) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSet(setId, fromRank, toRank), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, double fromScore, double toScore) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromScore, toScore), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, long fromScore, long toScore) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromScore, toScore), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, string fromStringScore, string toStringScore) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromStringScore, toStringScore), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, double fromScore, double toScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromScore, toScore, skip, take), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, long fromScore, long toScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromScore, toScore, skip, take), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, string fromStringScore, string toStringScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromStringScore, toStringScore, skip, take), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, double fromScore, double toScore) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromScore, toScore), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, long fromScore, long toScore) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByLowestScore(setId, fromScore, toScore), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, string fromStringScore, string toStringScore) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByLowestScore(setId, fromStringScore, toStringScore), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, double fromScore, double toScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByLowestScore(setId, fromScore, toScore, skip, take), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, long fromScore, long toScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByLowestScore(setId, fromScore, toScore, skip, take), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, string fromStringScore, string toStringScore, int? skip, int? take) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByLowestScore(setId, fromStringScore, toStringScore, skip, take), setId); - } - - public IDictionary GetRangeWithScoresFromSortedSetDesc(string setId, int fromRank, int toRank) - { - return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetDesc(setId, fromRank, toRank), setId); - } - - public long GetSetCount(string setId) - { - return this.TryCatch(() => this.client.GetSetCount(setId), setId); - } - - public List GetSortedEntryValues(string key, int startingFrom, int endingAt) - { - return this.TryCatch>(() => this.client.GetSortedEntryValues(key, startingFrom, endingAt), key); - } - - public long GetSortedSetCount(string setId) - { - return this.TryCatch(() => this.client.GetSortedSetCount(setId), setId); - } - - public long GetSortedSetCount(string setId, double fromScore, double toScore) - { - return this.TryCatch(() => this.client.GetSortedSetCount(setId, fromScore, toScore), setId); - } - - public long GetSortedSetCount(string setId, long fromScore, long toScore) - { - return this.TryCatch(() => this.client.GetSortedSetCount(setId, fromScore, toScore), setId); - } - - public long GetSortedSetCount(string setId, string fromStringScore, string toStringScore) - { - return this.TryCatch(() => this.client.GetSortedSetCount(setId, fromStringScore, toStringScore), setId); - } - - public string GetSubstring(string key, int fromIndex, int toIndex) - { - return this.TryCatch(delegate - { - byte[] bytes = ((RedisClient)this.client).GetRange(key, fromIndex, toIndex); - if (bytes != null) - { - return StringExtensions.FromUtf8Bytes(bytes); - } - return null; - }, key); - } - - public TimeSpan GetTimeToLive(string key) - { - return this.TryCatch(delegate - { - TimeSpan? t = this.client.GetTimeToLive(key); - if (!t.HasValue) - { - return TimeSpan.Zero; - } - return t.Value; - }, key); - } - - public HashSet GetUnionFromSets(params string[] setIds) - { - return this.TryCatch>(() => this.client.GetUnionFromSets(setIds), setIds[0]); - } - - public string GetValue(string key) - { - return this.TryCatch(() => this.client.GetValue(key), key); - } - - public string GetValueFromHash(string hashId, string key) - { - return this.TryCatch(() => this.client.GetValueFromHash(hashId, key), hashId); - } - - public List GetValues(List keys) - { - return this.TryCatch>(() => this.client.GetValues(keys), keys[0]); - } - - public List GetValues(List keys) - { - return this.TryCatch>(() => this.client.GetValues(keys), keys[0]); - } - - public List GetValuesFromHash(string hashId, params string[] keys) - { - return this.TryCatch>(() => this.client.GetValuesFromHash(hashId, keys), hashId); - } - - public Dictionary GetValuesMap(List keys) - { - return this.TryCatch>(() => this.client.GetValuesMap(keys), keys[0]); - } - - public Dictionary GetValuesMap(List keys) - { - return this.TryCatch>(() => this.client.GetValuesMap(keys), keys[0]); - } - - public bool HashContainsEntry(string hashId, string key) - { - return this.TryCatch(() => this.client.HashContainsEntry(hashId, key), hashId); - } - - public double IncrementItemInSortedSet(string setId, string value, double incrementBy) - { - return this.TryCatch(() => this.client.IncrementItemInSortedSet(setId, value, incrementBy), setId); - } - - public double IncrementItemInSortedSet(string setId, string value, long incrementBy) - { - return this.TryCatch(() => this.client.IncrementItemInSortedSet(setId, value, incrementBy), setId); - } - - public long IncrementValue(string key) - { - return this.TryCatch(() => this.client.IncrementValue(key), key); - } - - public long IncrementValueBy(string key, int count) - { - return this.TryCatch(() => this.client.IncrementValueBy(key, count), key); - } - - public long IncrementValueInHash(string hashId, string key, int incrementBy) - { - return this.TryCatch(() => this.client.IncrementValueInHash(hashId, key, incrementBy), hashId); - } - - public void MoveBetweenSets(string fromSetId, string toSetId, string item) - { - this.TryCatch(delegate - { - this.client.MoveBetweenSets(fromSetId, toSetId, item); - }, fromSetId); - } - - public string PopAndPushItemBetweenLists(string fromListId, string toListId) - { - return this.TryCatch(() => this.client.PopAndPushItemBetweenLists(fromListId, toListId), fromListId); - } - - public string PopItemFromList(string listId) - { - return this.TryCatch(() => this.client.PopItemFromList(listId), listId); - } - - public string PopItemFromSet(string setId) - { - return this.TryCatch(() => this.client.PopItemFromSet(setId), setId); - } - - public string PopItemWithHighestScoreFromSortedSet(string setId) - { - return this.TryCatch(() => this.client.PopItemWithHighestScoreFromSortedSet(setId), setId); - } - - public string PopItemWithLowestScoreFromSortedSet(string setId) - { - return this.TryCatch(() => this.client.PopItemWithLowestScoreFromSortedSet(setId), setId); - } - - public void PrependItemToList(string listId, string value) - { - this.TryCatch(delegate - { - this.client.PrependItemToList(listId, value); - }, listId); - } - - public void PrependRangeToList(string listId, List values) - { - this.TryCatch(delegate - { - this.client.PrependRangeToList(listId, values); - }, listId); - } - - public long PublishMessage(string toChannel, string message) - { - return this.TryCatch(() => this.client.PublishMessage(toChannel, message), string.Empty); - } - - public void PushItemToList(string listId, string value) - { - this.TryCatch(delegate - { - this.client.PushItemToList(listId, value); - }, listId); - } - - public void RemoveAllFromList(string listId) - { - this.TryCatch(delegate - { - this.client.Remove(listId); - }, listId); - } - - public string RemoveEndFromList(string listId) - { - return this.TryCatch(() => this.client.RemoveEndFromList(listId), listId); - } - - public bool RemoveEntry(params string[] args) - { - return this.TryCatch(() => this.client.RemoveEntry(args), args[0]); - } - - public bool RemoveEntryFromHash(string hashId, string key) - { - return this.TryCatch(() => this.client.RemoveEntryFromHash(hashId, key), hashId); - } - - public long RemoveItemFromList(string listId, string value) - { - return this.TryCatch(() => this.client.RemoveItemFromList(listId, value), listId); - } - - public long RemoveItemFromList(string listId, string value, int noOfMatches) - { - return this.TryCatch(() => this.client.RemoveItemFromList(listId, value, noOfMatches), listId); - } - - public void RemoveItemFromSet(string setId, string item) - { - this.TryCatch(delegate - { - this.client.RemoveItemFromSet(setId, item); - }, setId); - } - - public bool RemoveItemFromSortedSet(string setId, string value) - { - return this.TryCatch(() => this.client.RemoveItemFromSortedSet(setId, value), setId); - } - /// - /// 骚操作-- redis 连接池-- 如果出现高并发,客户端的连接数量会上限,为了节省资源,重复利用连接对象,通过线程池去获取连接 - /// - /// - /// - /// - /// - public static IRedisClientsManager GetPoolClient(string host, int port, int db) - { - return new PooledRedisClientManager(db, host + ":" + port); - } - public long RemoveRangeFromSortedSet(string setId, int minRank, int maxRank) - { - return this.TryCatch(() => this.client.RemoveRangeFromSortedSet(setId, minRank, maxRank), setId); - } - - public long RemoveRangeFromSortedSetByScore(string setId, double fromScore, double toScore) - { - return this.TryCatch(() => this.client.RemoveRangeFromSortedSetByScore(setId, fromScore, toScore), setId); - } - - public long RemoveRangeFromSortedSetByScore(string setId, long fromScore, long toScore) - { - return this.TryCatch(() => this.client.RemoveRangeFromSortedSetByScore(setId, fromScore, toScore), setId); - } - - public string RemoveStartFromList(string listId) - { - return this.TryCatch(() => this.client.RemoveStartFromList(listId), listId); - } - - public void RenameKey(string fromName, string toName) - { - this.TryCatch(delegate - { - this.client.RenameKey(fromName, toName); - }, string.Empty); - } - - public List SearchKeys(string pattern) - { - return this.TryCatch>(() => this.client.SearchKeys(pattern), pattern); - } - - public void SetAll(Dictionary map) - { - this.TryCatch(delegate - { - this.client.SetAll(map); - }, string.Empty); - } - - public void SetAll(IEnumerable keys, IEnumerable values) - { - this.TryCatch(delegate - { - this.client.SetAll(keys, values); - }, string.Empty); - } - - public bool SetContainsItem(string setId, string item) - { - return this.TryCatch(() => this.client.SetContainsItem(setId, item), setId); - } - - public void SetEntry(string key, string value) - { - this.TryCatch(delegate - { - this.client.SetValue(key, value); - }, key); - } - - public void SetEntry(string key, string value, TimeSpan expireIn) - { - this.TryCatch(delegate - { - this.client.SetValue(key, value, expireIn); - }, key); - } - - public bool SetEntryIfNotExists(string key, string value) - { - return this.TryCatch(() => this.client.SetValueIfNotExists(key, value), key); - } - - public bool SetEntryInHash(string hashId, string key, string value) - { - return this.TryCatch(() => this.client.SetEntryInHash(hashId, key, value), hashId); - } - - public bool SetEntryInHashIfNotExists(string hashId, string key, string value) - { - return this.TryCatch(() => this.client.SetEntryInHashIfNotExists(hashId, key, value), hashId); - } - - public void SetItemInList(string listId, int listIndex, string value) - { - this.TryCatch(delegate - { - this.client.SetItemInList(listId, listIndex, value); - }, listId); - } - - public void SetRangeInHash(string hashId, IEnumerable> keyValuePairs) - { - this.TryCatch(delegate - { - this.client.SetRangeInHash(hashId, keyValuePairs); - }, hashId); - } - - public bool SortedSetContainsItem(string setId, string value) - { - return this.TryCatch(() => this.client.SortedSetContainsItem(setId, value), setId); - } - - public void StoreAsHash(T entity) - { - this.TryCatch(delegate - { - this.client.StoreAsHash(entity); - }, string.Empty); - } - - - public bool SetEntryInHash(string hashId, string key, T value) - { - - return this.TryCatch(() => this.client.SetEntryInHash(hashId, key, TextExtensions.SerializeToString(value)), hashId); - } - public bool SetEntryInHash(string hashId, string key, T value, TimeSpan expiresIn) - { - - return this.TryCatch(() => this.client.SetEntryInHash(hashId, key, TextExtensions.SerializeToString(value)), hashId); - } - public T GetValueFromHash(string hashId, string key) - { - return this.TryCatch(() => JsonSerializer.DeserializeFromString(this.client.GetValueFromHash(hashId, key)), hashId); - } - - public bool SetEntryInHashIfNotExists(string hashId, string key, T value) - { - return this.TryCatch(() => this.client.SetEntryInHashIfNotExists(hashId, key, TextExtensions.SerializeToString(value)), hashId); - } - - public IDisposable AcquireLock(string key) - { - return this.TryCatch(() => this.client.AcquireLock(key), key); - } - - public IDisposable AcquireLock(string key, TimeSpan timeOut) - { - return this.TryCatch(() => this.client.AcquireLock(key, timeOut), key); - } - - - public DateTime GetServerTime() - { - return this.TryCatch(() => this.client.GetServerTime(), string.Empty); - } - - - } + public class CacheClientDB + { + + public delegate T MyAction(CSRedisClient client); + + private readonly RedisConnOptions _RedisOptions; + public CacheClientDB(IOptionsMonitor redisConnOptions) + { + this._RedisOptions = redisConnOptions.CurrentValue; + } + //public CSRedisClient GetClient() + //{ + // return client; + //} + //private CSRedisClient client=null; + + // 为了以后全链路做准备 + + private T TryCatch(MyAction action) + { + //Stopwatch sw = Stopwatch.StartNew(); + ////Exception ex = null; + ////bool isError = false; + var client2 = new CSRedisClient($"{_RedisOptions.Host}:{_RedisOptions.Prot},password={_RedisOptions.Password},defaultDatabase ={ _RedisOptions.DB }"); + T result; + try + { + result = action(client2); + } + catch (Exception exinfo) + { + object p = null; + result = (T)p; + //isError = true; + Console.WriteLine(exinfo); + + } + finally + { + client2.Dispose(); + } + + return result; + } + + + public bool Exit(string key) + { + return this.TryCatch((u) => u.Exists(key)); + } + + public long Remove(string key) + { + return this.TryCatch((u) => u.Del(key)); + } + + public T Get(string key) + { + return this.TryCatch((u) => u.Get(key)); + } + public bool Set(string key, T data, TimeSpan time) + { + return this.TryCatch((u) => u.Set(key, data, time)); + } + + public bool Set(string key, T data) + { + return this.TryCatch((u) => u.Set(key, data)); + } + } } diff --git a/Yi.Framework.Net6/Yi.Framework.Core/Library/Microsoft.Bcl.AsyncInterfaces.dll b/Yi.Framework.Net6/Yi.Framework.Core/Library/Microsoft.Bcl.AsyncInterfaces.dll deleted file mode 100644 index c695bdd5965b0b687fdee8984d5d36e1a33fb642..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14920 zcmeG@2UJtd()T6-DN;jG5Qr27lyF0D(yK_3st7_z0z^WBDKr5gC}KwiMX`W@*cB1w zDT;_-Z&<*Jh+Pz<2sZrph892dd*3_nf9JjP&bxRgJF~m9v$L~1JCo=Yk_%xW2*QE) z`*#Sc2A}9-FMxjzGC;Mo#tCWYsQA^%)$pvVlLKPt96~&s70o8c5h!FPlf@-O(gJ_+Ep z2QLK43d)!vxlsZtzu?IL5YRuBKww@GOVOt2zp>9@6eWR267cmw3-%Cndz1;ll_1C+ z6*6K-3|T!03IOO|eh8zY3%ZB_++C>*cx)78hg#WJS=s(jDhG0Q8DocV15g{5Q#w1IWBmyx2Q~xPbw zstEm*0#!J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EN-%Nh9eskSeCJ8>g7!d|T_%DZFG?r1jeURXl+iq9U(2a*=y zrv$j2-pbr^%d&K0*&^-N`SFI57X}EngtXRP4Q7ToRnb8*C))Hlo|Ra#`Wi7S|HH0; zL?!*F1x%b)kPG|Lj=AcmrE4+9pE_TkTPGW{Ze`{D2I-XGQufT%avSx;Vzs5u;E$A~ zk?n5iZyRqxE48WR?Y3-)NgHH zJ2@rI*{+{{KKtsI%0od7QySziDlb}|y5YuN&v^GXQ!c%flMu+O7+`7dwR t8cFtts2;A?iKvHlH+NLcamA$(MQ4dJWj5{5^A&TA?q{yu`k1#9`ae+xo%{d* diff --git a/Yi.Framework.Net6/Yi.Framework.Core/Library/ServiceStack.Common.dll b/Yi.Framework.Net6/Yi.Framework.Core/Library/ServiceStack.Common.dll deleted file mode 100644 index f10b87b43853c83f27dd617a9bfc76bf56150c2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1039872 zcmb@v4V+X}{l|az&g`ApnO$J^VV37zz}>y<%<{AX3y6S*r~O_bmN{<9k1-5S2%&3Uw9*MKL=PS`cz zl=Bv68<%B*MVa|a8yC#K@WSBY#(+X&dH8l1iT?B=1S5v4>L$=ZQo&XITOMe-#@$O&8TDu8%DUH00ui zmtKtP^Ipp5i+Ro4ZPgHD-jGZ-vjD)@hKzW)_ziRm{!K)64aqFLAb=umrOgu8>j&u_ zQ4mbTcaVSnqiwEJ?u4h5JCFV>>XZrnzyI`i{b7z1Yqf5lVdYZ3h%ey=!{N2Ar{k2x zl5sZ}fvd_?pJ>nyp~{Oi)z6Gq)Yb-v;xZVCpDod#4o=(dJ+Wxoiw3p0c-;&66)1-0 zR;Ns|S?9DI=EP`epJ8EV4qOytB0CDYF_T6-)e(_2Dzl#^950z24ZkX{BItnI6s^b} z?m1rWgOC&6@BIe~*)iZgEKW5?i~&E|6N{w1NZx=}q+!yoa*mpA(jMgo;}9z3!xFD` zl^!Fm_pXBEnwoUf<@{x4I#J60TaEnqjWf3-%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