From 52b8b751ac76c87ba6fc8a737e3bedb20c673f6b Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Fri, 23 Dec 2022 15:33:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Myshipping.Application/Myshipping.Application.xml | 2 +- .../Service/BookingOrder/BookingOrderService.cs | 6 ++---- Myshipping.Core/Entity/SysUserDataScope.cs | 2 -- Myshipping.Core/Service/User/SysDataUserMenu.cs | 3 ++- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index 60967dec..0abd8bd9 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -5268,7 +5268,7 @@ - + 调用运踪接口 diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index f155a7ff..a8cf5444 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -141,8 +141,8 @@ namespace Myshipping.Application [HttpGet("/BookingOrder/Page")] public async Task Page([FromQuery] BookingOrderInput input) { - //List userlist = await _right.GetDataScopeList(351064299098181); - List userlist = await DataFilterExtensions.GetDataScopeIdList(); + List userlist = await _right.GetDataScopeList(351064299098181); + //List userlist = await DataFilterExtensions.GetDataScopeIdList(); var entities = await _rep.AsQueryable().Where(x => x.ParentId == 0) .WhereIF(!string.IsNullOrWhiteSpace(input.BSNO), u => u.BSNO.Contains(input.BSNO)) .WhereIF(!string.IsNullOrWhiteSpace(input.BSSTATUS), u => u.BSSTATUS == input.BSSTATUS) @@ -2532,8 +2532,6 @@ namespace Myshipping.Application await _bookingfile.InsertAsync(bookFile); } - - #region 下载订舱、截单EDI /// /// 下载订舱、截单EDI diff --git a/Myshipping.Core/Entity/SysUserDataScope.cs b/Myshipping.Core/Entity/SysUserDataScope.cs index dd1aafbe..2b631c91 100644 --- a/Myshipping.Core/Entity/SysUserDataScope.cs +++ b/Myshipping.Core/Entity/SysUserDataScope.cs @@ -15,8 +15,6 @@ public class SysUserDataScope /// public long SysUserId { get; set; } - - /// /// 机构Id /// diff --git a/Myshipping.Core/Service/User/SysDataUserMenu.cs b/Myshipping.Core/Service/User/SysDataUserMenu.cs index ddad0a9a..01b1595b 100644 --- a/Myshipping.Core/Service/User/SysDataUserMenu.cs +++ b/Myshipping.Core/Service/User/SysDataUserMenu.cs @@ -19,7 +19,8 @@ namespace Myshipping.Core.Service; /// /// 用户数据范围 /// -public class SysDataUserMenuService : ISysDataUserMenu, ITransient +[ApiDescriptionSettings(Name = "SysDataUserMenu", Order = 150)] +public class SysDataUserMenuService : ISysDataUserMenu, IDynamicApiController,ITransient { private readonly SqlSugarRepository _rep; // 用户数据范围表仓储 private readonly ISysCacheService _sysCache;//缓存 From e42c6bcf4004bffab4238f4fb8b1af6e0f5874d2 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Fri, 23 Dec 2022 15:45:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/User/SysDataUserMenu.cs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Myshipping.Core/Service/User/SysDataUserMenu.cs b/Myshipping.Core/Service/User/SysDataUserMenu.cs index 01b1595b..f4d0d95d 100644 --- a/Myshipping.Core/Service/User/SysDataUserMenu.cs +++ b/Myshipping.Core/Service/User/SysDataUserMenu.cs @@ -38,6 +38,32 @@ public class SysDataUserMenuService : ISysDataUserMenu, IDynamicApiController,IT _sysOrgRep= sysOrgRep; } + /// + /// 获取权限 + /// + /// + /// + [HttpGet("/SysDataUserMenu/GetGrantData")] + public async Task GetGrantData(long userid) { + + return await _rep.AsQueryable().Where(x => x.SysUserId == userid).ToListAsync(); + } + /// + /// 获取用户自定义权限 + /// + /// + /// + [HttpGet("/SysDataUserMenu/GetGrantData")] + public async Task GetGrantRightData(long userid) + { + + return await _sysUserDataScopeRep.AsQueryable().Where(x => x.SysUserId == userid).ToListAsync(); + } + + + + + /// /// 授权用户数据 ///