| | |
| | | using System.Threading.Tasks; |
| | | using Gs.User.Modes; |
| | | using Microsoft.Extensions.Primitives; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Http.Connections.Features; |
| | | |
| | | namespace Gs.User.Service |
| | | { |
| | | [ApiGroup(ApiGroupNames.Auth)] |
| | | public class MenuActionController : IRomteService |
| | | { |
| | | |
| | | private readonly IHttpContextAccessor _http; |
| | | public MenuActionController(IHttpContextAccessor httpContextAccessor) |
| | | { |
| | | _http = httpContextAccessor; |
| | | } |
| | | /// <summary> |
| | | /// 读取功能菜单列表,支持分页 |
| | | /// </summary> |
| | |
| | | [RequestMethod(RequestMethods.POST)] |
| | | public ReturnDto<PageList<MenuAction>> GetListPage([FromBody] PageQuery model) |
| | | { |
| | | (string userGuid, string orgGuid) = Gs.Toolbox.UtilityHelper.GetUserGuidAndOrgGuid(_http); |
| | | Gs.Toolbox.LogHelper.Debug(this.ToString(), "userGuid:" + userGuid + ",orgGuid:" + orgGuid); |
| | | int currentPage = model.currentPage; |
| | | int everyPageSize = model.everyPageSize; |
| | | string sortName = string.IsNullOrEmpty(model.sortName) ? "a.idx" : model.sortName; |
| | |
| | | { |
| | | if (sbSql.Length > 0) |
| | | sbSql.Append(" union all"); |
| | | sbSql.Append(" select org.guid,null as upGuid,org.name,org.status,'"+ row["guid"].ToString() + "' as orgGuid from [dbo].[sys_Organization] org where org.guid ='" + row["guid"].ToString() + "'"); |
| | | sbSql.Append(" select org.guid,null as upGuid,org.name,org.status,'" + row["guid"].ToString() + "' as orgGuid from [dbo].[sys_Organization] org where org.guid ='" + row["guid"].ToString() + "'"); |
| | | sbSql.Append(" union all"); |
| | | sbSql.Append(" select ma.guid,isnull(ma.upGuid,'" + row["guid"].ToString() + "') as upGuid,ma.name,ma.status,'"+ row["guid"].ToString() + "' as orgGuid from sys_MenuAction ma"); |
| | | sbSql.Append(" select ma.guid,isnull(ma.upGuid,'" + row["guid"].ToString() + "') as upGuid,ma.name,ma.status,'" + row["guid"].ToString() + "' as orgGuid from sys_MenuAction ma"); |
| | | } |
| | | } |
| | | catch (Exception ex) |