fix 映射转换

This commit is contained in:
2025-03-25 11:30:00 +08:00
parent 12340b38e8
commit c6c9a9a1cd
6 changed files with 29 additions and 8 deletions

View File

@@ -59,9 +59,9 @@ public class UsersController : ControllerBase
[Authorize]
[HttpPost("by-ids")]
public async Task<List<UserResponse>> GetUserByIdsAsync(List<int> ids)
public async Task<List<UserResponse>> GetUserByIdsAsync(IdsRequest request)
{
return await _userService.GetUserByIdsAsync(ids);
return await _userService.GetUserByIdsAsync(request.Ids);
}
/// <summary>

View File

@@ -4,3 +4,9 @@ public class IdRequest
{
public int? Id { get; set; }
}
public class IdsRequest
{
public List<int> Ids { get; set; }
}