| | |
| | | using FlexJobApi.Core; |
| | | using FlexJobApi.Core.Models; |
| | | using Furion.DynamicApiController; |
| | | using MediatR; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | //using FlexJobApi.Core; |
| | | //using FlexJobApi.Core.Models; |
| | | //using Furion.DynamicApiController; |
| | | //using MediatR; |
| | | //using Microsoft.AspNetCore.Mvc; |
| | | //using System; |
| | | //using System.Collections.Generic; |
| | | //using System.Linq; |
| | | //using System.Text; |
| | | //using System.Threading.Tasks; |
| | | |
| | | namespace FlexJobApi.User.Application |
| | | { |
| | | /// <summary> |
| | | /// 菜单 |
| | | /// </summary> |
| | | [Route("api/user/[controller]")] |
| | | public class MenuAppService(IMediator mediator) : IDynamicApiController |
| | | { |
| | | private readonly IMediator mediator = mediator; |
| | | //namespace FlexJobApi.User.Application |
| | | //{ |
| | | // /// <summary> |
| | | // /// 菜单 |
| | | // /// </summary> |
| | | // [Route("api/user/[controller]")] |
| | | // public class MenuAppService(IMediator mediator) : IDynamicApiController |
| | | // { |
| | | // private readonly IMediator mediator = mediator; |
| | | |
| | | /// <summary> |
| | | /// 查询菜单/页面/模态框列表 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | public async Task<MenuListCallback> ListQuery(MenuListQuery query) |
| | | { |
| | | return await mediator.Send(query); |
| | | } |
| | | // #region 查询 |
| | | |
| | | /// <summary> |
| | | /// 查询按钮/字段列表 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | public async Task<MenuSubListCallback> SubListQuery(MenuSubListQuery query) |
| | | { |
| | | return await mediator.Send(query); |
| | | } |
| | | // /// <summary> |
| | | // /// 查询菜单列表 |
| | | // /// </summary> |
| | | // /// <param name="query"></param> |
| | | // /// <returns></returns> |
| | | // public Task<List<GetMenusQueryResultItem>> GetMenus(GetMenusQuery query) |
| | | // { |
| | | // return mediator.Send(query); |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 保存菜单 |
| | | /// </summary> |
| | | /// <param name="command"></param> |
| | | /// <returns></returns> |
| | | public async Task<Guid> Save(MenuSaveCommand command) |
| | | { |
| | | return await mediator.Send(command); |
| | | } |
| | | } |
| | | } |
| | | // /// <summary> |
| | | // /// 查询菜单详情 |
| | | // /// </summary> |
| | | // /// <param name="query"></param> |
| | | // /// <returns></returns> |
| | | // public Task<GetMenuQueryResult> GetMenu(GetMenuQuery query) |
| | | // { |
| | | // return mediator.Send(query); |
| | | // } |
| | | |
| | | // #endregion |
| | | |
| | | // #region 写入 |
| | | |
| | | // /// <summary> |
| | | // /// 保存菜单 |
| | | // /// </summary> |
| | | // /// <param name="command"></param> |
| | | // /// <returns></returns> |
| | | // public Task<Guid> SaveMenu(SaveMenuCommand command) |
| | | // { |
| | | // return mediator.Send(command); |
| | | // } |
| | | |
| | | // /// <summary> |
| | | // /// 保存菜单按钮 |
| | | // /// </summary> |
| | | // /// <param name="command"></param> |
| | | // /// <returns></returns> |
| | | // public Task<Guid> SaveMenuButton(SaveMenuButtonCommand command) |
| | | // { |
| | | // return mediator.Send(command); |
| | | // } |
| | | |
| | | // /// <summary> |
| | | // /// 保存菜单字段 |
| | | // /// </summary> |
| | | // /// <param name="command"></param> |
| | | // /// <returns></returns> |
| | | // public Task<Guid> SaveMenuField(SaveMenuFieldCommand command) |
| | | // { |
| | | // return mediator.Send(command); |
| | | // } |
| | | |
| | | // /// <summary> |
| | | // /// 设置菜单切换信息 |
| | | // /// </summary> |
| | | // /// <param name="command"></param> |
| | | // /// <returns></returns> |
| | | // public Task<int> SetMenuSwitch(SetMenuSwitchCommand command) |
| | | // { |
| | | // return mediator.Send(command); |
| | | // } |
| | | |
| | | // /// <summary> |
| | | // /// 删除菜单 |
| | | // /// </summary> |
| | | // /// <param name="command"></param> |
| | | // /// <returns></returns> |
| | | // public Task<int> DeleteMenu(DeleteMenuCommand command) |
| | | // { |
| | | // return mediator.Send(command); |
| | | // } |
| | | |
| | | // #endregion |
| | | // } |
| | | //} |