main
wanggaofeng 1 year ago
parent 35e06362b0
commit 3fa91815c7

@ -40,7 +40,7 @@ namespace HttpClientStudy.WebApp.Controllers
} }
/// <summary> /// <summary>
/// 获取所有账号 /// 查询账号
/// (默认方式参数) /// (默认方式参数)
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
@ -55,7 +55,7 @@ namespace HttpClientStudy.WebApp.Controllers
} }
/// <summary> /// <summary>
/// 获取所有账号 /// 查询账号
/// (路由参数) /// (路由参数)
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
@ -70,7 +70,7 @@ namespace HttpClientStudy.WebApp.Controllers
} }
/// <summary> /// <summary>
/// 获取所有账号 /// 查询账号
/// (查询参数) /// (查询参数)
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
@ -86,18 +86,14 @@ namespace HttpClientStudy.WebApp.Controllers
} }
/// <summary> /// <summary>
/// 获取所有账号 /// 查询账号
/// (服务注入参数) /// (服务注入参数)
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public IActionResult GetAccount([FromServices] Account account) public IActionResult GetAccount([FromServices] Account account)
{ {
var accounts = _accountService.GetAllAccounts(); var result = BaseResultUtil.Success(account);
accounts = accounts.Where(accounts => accounts.Role == role).ToList();
var result = BaseResultUtil.Success(accounts);
return Ok(result); return Ok(result);
} }

Loading…
Cancel
Save