winform+dev的前后台分离标准项目
lg
2024-09-02 59abbe4785268a10ec9390b8373cce3939c1d24b
WebApi/Gs.User/Service/MenuActionController.cs
@@ -10,13 +10,19 @@
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>
@@ -25,6 +31,8 @@
        [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;
@@ -234,9 +242,9 @@
                {
                    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)