升级工程:webapi统一继承ControllerBase,增加ApiController标签
This commit is contained in:
parent
7591381711
commit
b326d0e83e
|
@ -9,7 +9,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
/// 数据字典分类
|
/// 数据字典分类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class CategoryController : Controller
|
[ApiController]
|
||||||
|
public class CategoryController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取字典表中所有Category数据
|
/// 获取字典表中所有Category数据
|
||||||
|
|
|
@ -12,7 +12,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class DictsController : Controller
|
[ApiController]
|
||||||
|
public class DictsController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
@ -20,7 +21,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public QueryData<BootstrapDict> Get(QueryDictOption value)
|
public QueryData<BootstrapDict> Get([FromQuery]QueryDictOption value)
|
||||||
{
|
{
|
||||||
return value.RetrieveData();
|
return value.RetrieveData();
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class ExceptionsController : Controller
|
[ApiController]
|
||||||
|
public class ExceptionsController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示所有异常
|
/// 显示所有异常
|
||||||
|
@ -21,7 +22,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public QueryData<Object> Get(QueryExceptionOption value)
|
public QueryData<object> Get([FromQuery]QueryExceptionOption value)
|
||||||
{
|
{
|
||||||
return value.RetrieveData();
|
return value.RetrieveData();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class GroupsController : Controller
|
[ApiController]
|
||||||
|
public class GroupsController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
@ -19,7 +20,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public QueryData<object> Get(QueryGroupOption value)
|
public QueryData<object> Get([FromQuery]QueryGroupOption value)
|
||||||
{
|
{
|
||||||
return value.RetrieveData();
|
return value.RetrieveData();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,8 @@ namespace Bootstrap.Admin.Controllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]/[action]")]
|
[Route("api/[controller]/[action]")]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public class InterfaceController : Controller
|
[ApiController]
|
||||||
|
public class InterfaceController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
|
@ -13,7 +13,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class LoginController : Controller
|
[ApiController]
|
||||||
|
public class LoginController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
|
@ -10,7 +10,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class LogsController : Controller
|
[ApiController]
|
||||||
|
public class LogsController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
@ -18,7 +19,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public QueryData<Log> Get(QueryLogOption value)
|
public QueryData<Log> Get([FromQuery]QueryLogOption value)
|
||||||
{
|
{
|
||||||
return value.RetrieveData();
|
return value.RetrieveData();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class MenusController : Controller
|
[ApiController]
|
||||||
|
public class MenusController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获得所有菜单列表调用
|
/// 获得所有菜单列表调用
|
||||||
|
@ -19,7 +20,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public QueryData<object> Get(QueryMenuOption value)
|
public QueryData<object> Get([FromQuery]QueryMenuOption value)
|
||||||
{
|
{
|
||||||
return value.RetrieveData(User.Identity.Name);
|
return value.RetrieveData(User.Identity.Name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class MessagesController : Controller
|
[ApiController]
|
||||||
|
public class MessagesController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据Id返回不同的消息列表
|
/// 根据Id返回不同的消息列表
|
||||||
|
|
|
@ -9,7 +9,8 @@ namespace Bootstrap.Admin.Controllers
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class NewController : Controller
|
[ApiController]
|
||||||
|
public class NewController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 通知管理页面获得所有新用户方法调用
|
/// 通知管理页面获得所有新用户方法调用
|
||||||
|
|
|
@ -9,7 +9,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class NotificationsController : Controller
|
[ApiController]
|
||||||
|
public class NotificationsController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
|
@ -12,7 +12,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class ProfilesController : Controller
|
[ApiController]
|
||||||
|
public class ProfilesController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
|
@ -12,7 +12,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class RolesController : Controller
|
[ApiController]
|
||||||
|
public class RolesController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
@ -20,7 +21,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public QueryData<object> Get(QueryRoleOption value)
|
public QueryData<object> Get([FromQuery]QueryRoleOption value)
|
||||||
{
|
{
|
||||||
return value.RetrieveData();
|
return value.RetrieveData();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class SettingsController : Controller
|
[ApiController]
|
||||||
|
public class SettingsController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
|
@ -8,7 +8,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class TasksController : Controller
|
[ApiController]
|
||||||
|
public class TasksController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
|
@ -13,7 +13,8 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
public class UsersController : Controller
|
[ApiController]
|
||||||
|
public class UsersController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
@ -21,7 +22,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public QueryData<object> Get(QueryUserOption value)
|
public QueryData<object> Get([FromQuery]QueryUserOption value)
|
||||||
{
|
{
|
||||||
return value.RetrieveData();
|
return value.RetrieveData();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue