优化Controller注解
This commit is contained in:
commit
cbcc18ac62
@ -17,6 +17,7 @@
|
|||||||
* 支持加载动态权限菜单,多方式轻松权限控制
|
* 支持加载动态权限菜单,多方式轻松权限控制
|
||||||
* 提供了技术栈(Ant Design Vue)版[Ant Design Vue](https://gitee.com/billzh/mc-dull.git)
|
* 提供了技术栈(Ant Design Vue)版[Ant Design Vue](https://gitee.com/billzh/mc-dull.git)
|
||||||
* 七牛云通用云产品优惠券:[点我进入](https://s.qiniu.com/FzEfay)。
|
* 七牛云通用云产品优惠券:[点我进入](https://s.qiniu.com/FzEfay)。
|
||||||
|
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=uotn5vt1&share_source=copy_link)。
|
||||||
* 腾讯云秒杀场:[点我进入](https://curl.qcloud.com/4yEoRquq)。
|
* 腾讯云秒杀场:[点我进入](https://curl.qcloud.com/4yEoRquq)。
|
||||||
* 腾讯云优惠券:[点我领取](https://curl.qcloud.com/5J4nag8D)。
|
* 腾讯云优惠券:[点我领取](https://curl.qcloud.com/5J4nag8D)。
|
||||||
|
|
||||||
|
|||||||
@ -15,10 +15,6 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 文章目录Controller
|
/// 文章目录Controller
|
||||||
///
|
|
||||||
/// @tableName articleCategory
|
|
||||||
/// @author zr
|
|
||||||
/// @date 2022-05-13
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("article/ArticleCategory")]
|
[Route("article/ArticleCategory")]
|
||||||
|
|||||||
@ -20,9 +20,6 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 多语言配置Controller
|
/// 多语言配置Controller
|
||||||
///
|
|
||||||
/// @author zr
|
|
||||||
/// @date 2022-05-06
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("system/CommonLang")]
|
[Route("system/CommonLang")]
|
||||||
|
|||||||
@ -1,30 +1,24 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using SqlSugar;
|
|
||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using Infrastructure.Attribute;
|
using Infrastructure.Attribute;
|
||||||
using Infrastructure.Enums;
|
using Infrastructure.Enums;
|
||||||
|
using Infrastructure.Extensions;
|
||||||
using Infrastructure.Model;
|
using Infrastructure.Model;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
using ZR.Model.Dto;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using SqlSugar;
|
||||||
using ZR.Admin.WebApi.Extensions;
|
using ZR.Admin.WebApi.Extensions;
|
||||||
using ZR.Admin.WebApi.Filters;
|
using ZR.Admin.WebApi.Filters;
|
||||||
using ZR.Common;
|
using ZR.Common;
|
||||||
using ZR.Service.System;
|
using ZR.Model.Dto;
|
||||||
using ZR.Model.System;
|
using ZR.Model.System;
|
||||||
using Infrastructure.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
|
||||||
using ZR.Model.System.Dto;
|
using ZR.Model.System.Dto;
|
||||||
|
using ZR.Service.System;
|
||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers
|
namespace ZR.Admin.WebApi.Controllers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 参数配置Controller
|
/// 参数配置Controller
|
||||||
///
|
|
||||||
/// @author zhaorui
|
|
||||||
/// @date 2021-09-29
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("system/config")]
|
[Route("system/config")]
|
||||||
|
|||||||
@ -3,11 +3,9 @@ using Infrastructure.Attribute;
|
|||||||
using Infrastructure.Enums;
|
using Infrastructure.Enums;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using ZR.Admin.WebApi.Extensions;
|
|
||||||
using ZR.Admin.WebApi.Filters;
|
using ZR.Admin.WebApi.Filters;
|
||||||
using ZR.Common;
|
using ZR.Common;
|
||||||
using ZR.Model.System;
|
using ZR.Model.System;
|
||||||
using ZR.Service;
|
|
||||||
using ZR.Service.System.IService;
|
using ZR.Service.System.IService;
|
||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.System
|
namespace ZR.Admin.WebApi.Controllers.System
|
||||||
|
|||||||
@ -12,7 +12,6 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据字典信息
|
/// 数据字典信息
|
||||||
/// @author zr
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("system/dict/data")]
|
[Route("system/dict/data")]
|
||||||
|
|||||||
@ -1,26 +1,23 @@
|
|||||||
using Microsoft.AspNetCore.Authentication;
|
using Hei.Captcha;
|
||||||
|
using Infrastructure;
|
||||||
|
using Infrastructure.Attribute;
|
||||||
|
using Infrastructure.Model;
|
||||||
|
using IPTools.Core;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using UAParser;
|
||||||
using ZR.Admin.WebApi.Extensions;
|
using ZR.Admin.WebApi.Extensions;
|
||||||
using ZR.Admin.WebApi.Filters;
|
using ZR.Admin.WebApi.Filters;
|
||||||
using ZR.Admin.WebApi.Framework;
|
using ZR.Admin.WebApi.Framework;
|
||||||
using Infrastructure.Model;
|
using ZR.Common;
|
||||||
using Infrastructure;
|
|
||||||
using Infrastructure.Attribute;
|
|
||||||
using ZR.Model.System;
|
using ZR.Model.System;
|
||||||
using ZR.Model.System.Dto;
|
using ZR.Model.System.Dto;
|
||||||
using ZR.Service.System.IService;
|
|
||||||
using Hei.Captcha;
|
|
||||||
using ZR.Common;
|
|
||||||
using ZR.Service.System;
|
using ZR.Service.System;
|
||||||
using Microsoft.Extensions.Options;
|
using ZR.Service.System.IService;
|
||||||
using UAParser;
|
|
||||||
using IPTools.Core;
|
|
||||||
using Infrastructure.Extensions;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
|
||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.System
|
namespace ZR.Admin.WebApi.Controllers.System
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,17 +2,19 @@
|
|||||||
using Infrastructure.Attribute;
|
using Infrastructure.Attribute;
|
||||||
using Infrastructure.Enums;
|
using Infrastructure.Enums;
|
||||||
using Infrastructure.Model;
|
using Infrastructure.Model;
|
||||||
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using ZR.Admin.WebApi.Extensions;
|
using ZR.Admin.WebApi.Extensions;
|
||||||
using ZR.Admin.WebApi.Filters;
|
using ZR.Admin.WebApi.Filters;
|
||||||
using ZR.Model.System.Dto;
|
|
||||||
using ZR.Model.System;
|
using ZR.Model.System;
|
||||||
|
using ZR.Model.System.Dto;
|
||||||
using ZR.Service.System.IService;
|
using ZR.Service.System.IService;
|
||||||
using ZR.Model;
|
|
||||||
using Mapster;
|
|
||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.System
|
namespace ZR.Admin.WebApi.Controllers.System
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 系统菜单
|
||||||
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("/system/menu")]
|
[Route("/system/menu")]
|
||||||
public class SysMenuController : BaseController
|
public class SysMenuController : BaseController
|
||||||
@ -29,7 +31,7 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取菜单列表 √
|
/// 获取菜单列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[ActionPermissionFilter(Permission = "system:menu:list")]
|
[ActionPermissionFilter(Permission = "system:menu:list")]
|
||||||
@ -41,7 +43,7 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据菜单编号获取详细信息 √
|
/// 根据菜单编号获取详细信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="menuId"></param>
|
/// <param name="menuId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
@ -86,7 +88,7 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改菜单 √
|
/// 修改菜单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="menuDto"></param>
|
/// <param name="menuDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
@ -121,7 +123,7 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加菜单 √
|
/// 添加菜单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="MenuDto"></param>
|
/// <param name="MenuDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
@ -147,7 +149,7 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 菜单删除 √
|
/// 菜单删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="menuId"></param>
|
/// <param name="menuId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|||||||
@ -17,6 +17,9 @@ using ZR.Service.System.IService;
|
|||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.System
|
namespace ZR.Admin.WebApi.Controllers.System
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 系统通知
|
||||||
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("system/notice")]
|
[Route("system/notice")]
|
||||||
public class SysNoticeController : BaseController
|
public class SysNoticeController : BaseController
|
||||||
|
|||||||
@ -7,30 +7,27 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using System;
|
using System.Threading.Tasks;
|
||||||
using System.IO;
|
|
||||||
using ZR.Admin.WebApi.Extensions;
|
using ZR.Admin.WebApi.Extensions;
|
||||||
using ZR.Admin.WebApi.Filters;
|
using ZR.Admin.WebApi.Filters;
|
||||||
using ZR.Common;
|
|
||||||
using ZR.Model.System.Dto;
|
|
||||||
using ZR.Model.System;
|
using ZR.Model.System;
|
||||||
|
using ZR.Model.System.Dto;
|
||||||
using ZR.Service.System.IService;
|
using ZR.Service.System.IService;
|
||||||
using Infrastructure.Extensions;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.System
|
namespace ZR.Admin.WebApi.Controllers.System
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 个人中心
|
||||||
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("system/user/profile")]
|
[Route("system/user/profile")]
|
||||||
public class SysProfileController : BaseController
|
public class SysProfileController : BaseController
|
||||||
{
|
{
|
||||||
private NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
|
||||||
private readonly ISysUserService UserService;
|
private readonly ISysUserService UserService;
|
||||||
private readonly ISysRoleService RoleService;
|
private readonly ISysRoleService RoleService;
|
||||||
private readonly ISysUserPostService UserPostService;
|
private readonly ISysUserPostService UserPostService;
|
||||||
private readonly ISysDeptService DeptService;
|
private readonly ISysDeptService DeptService;
|
||||||
private readonly ISysFileService FileService;
|
private readonly ISysFileService FileService;
|
||||||
private OptionsSetting OptionsSetting;
|
|
||||||
private IWebHostEnvironment hostEnvironment;
|
private IWebHostEnvironment hostEnvironment;
|
||||||
|
|
||||||
public SysProfileController(
|
public SysProfileController(
|
||||||
@ -39,7 +36,6 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
ISysUserPostService postService,
|
ISysUserPostService postService,
|
||||||
ISysDeptService deptService,
|
ISysDeptService deptService,
|
||||||
ISysFileService sysFileService,
|
ISysFileService sysFileService,
|
||||||
IOptions<OptionsSetting> options,
|
|
||||||
IWebHostEnvironment hostEnvironment)
|
IWebHostEnvironment hostEnvironment)
|
||||||
{
|
{
|
||||||
UserService = userService;
|
UserService = userService;
|
||||||
@ -47,7 +43,6 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
UserPostService = postService;
|
UserPostService = postService;
|
||||||
DeptService = deptService;
|
DeptService = deptService;
|
||||||
FileService = sysFileService;
|
FileService = sysFileService;
|
||||||
OptionsSetting = options.Value;
|
|
||||||
this.hostEnvironment = hostEnvironment;
|
this.hostEnvironment = hostEnvironment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,8 +19,6 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
[Route("system/role")]
|
[Route("system/role")]
|
||||||
public class SysRoleController : BaseController
|
public class SysRoleController : BaseController
|
||||||
{
|
{
|
||||||
readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
|
|
||||||
|
|
||||||
private readonly ISysRoleService sysRoleService;
|
private readonly ISysRoleService sysRoleService;
|
||||||
|
|
||||||
public SysRoleController(
|
public SysRoleController(
|
||||||
@ -56,7 +54,7 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加角色 √
|
/// 添加角色
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sysRoleDto"></param>
|
/// <param name="sysRoleDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|||||||
@ -2,12 +2,10 @@ using Infrastructure.Attribute;
|
|||||||
using Infrastructure.Enums;
|
using Infrastructure.Enums;
|
||||||
using Infrastructure.Model;
|
using Infrastructure.Model;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using ZR.Admin.WebApi.Extensions;
|
using ZR.Admin.WebApi.Extensions;
|
||||||
using ZR.Admin.WebApi.Filters;
|
using ZR.Admin.WebApi.Filters;
|
||||||
using ZR.Common;
|
using ZR.Common;
|
||||||
@ -17,6 +15,9 @@ using ZR.Service.System.IService;
|
|||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.System
|
namespace ZR.Admin.WebApi.Controllers.System
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户管理
|
||||||
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("system/user")]
|
[Route("system/user")]
|
||||||
public class SysUserController : BaseController
|
public class SysUserController : BaseController
|
||||||
|
|||||||
@ -7,6 +7,9 @@ using ZR.Service.System.IService;
|
|||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.System
|
namespace ZR.Admin.WebApi.Controllers.System
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户角色管理
|
||||||
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("system/userRole")]
|
[Route("system/userRole")]
|
||||||
public class SysUserRoleController : BaseController
|
public class SysUserRoleController : BaseController
|
||||||
|
|||||||
@ -13,6 +13,9 @@ using Infrastructure;
|
|||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.System
|
namespace ZR.Admin.WebApi.Controllers.System
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 任务日志
|
||||||
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("/monitor/jobLog")]
|
[Route("/monitor/jobLog")]
|
||||||
public class TasksLogController : BaseController
|
public class TasksLogController : BaseController
|
||||||
|
|||||||
@ -11,7 +11,9 @@ using System.Runtime.InteropServices;
|
|||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.monitor
|
namespace ZR.Admin.WebApi.Controllers.monitor
|
||||||
{
|
{
|
||||||
//[Verify]
|
/// <summary>
|
||||||
|
/// 系统监控
|
||||||
|
/// </summary>
|
||||||
public class MonitorController : BaseController
|
public class MonitorController : BaseController
|
||||||
{
|
{
|
||||||
private OptionsSetting Options;
|
private OptionsSetting Options;
|
||||||
|
|||||||
@ -12,6 +12,9 @@ using ZR.Service.System.IService;
|
|||||||
|
|
||||||
namespace ZR.Admin.WebApi.Controllers.monitor
|
namespace ZR.Admin.WebApi.Controllers.monitor
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 操作日志记录
|
||||||
|
/// </summary>
|
||||||
[Verify]
|
[Verify]
|
||||||
[Route("/monitor/operlog")]
|
[Route("/monitor/operlog")]
|
||||||
public class SysOperlogController : BaseController
|
public class SysOperlogController : BaseController
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user