feat: 列表接口分页排序与验证
This commit is contained in:
@@ -48,8 +48,8 @@ public sealed class PaymentsController : BaseApiController
|
||||
/// </summary>
|
||||
[HttpGet]
|
||||
[PermissionAuthorize("payment:read")]
|
||||
[ProducesResponseType(typeof(ApiResponse<IReadOnlyList<PaymentDto>>), StatusCodes.Status200OK)]
|
||||
public async Task<ApiResponse<IReadOnlyList<PaymentDto>>> List(
|
||||
[ProducesResponseType(typeof(ApiResponse<PagedResult<PaymentDto>>), StatusCodes.Status200OK)]
|
||||
public async Task<ApiResponse<PagedResult<PaymentDto>>> List(
|
||||
[FromQuery] long? orderId,
|
||||
[FromQuery] PaymentStatus? status,
|
||||
[FromQuery] int page = 1,
|
||||
@@ -68,7 +68,7 @@ public sealed class PaymentsController : BaseApiController
|
||||
SortDescending = sortDesc
|
||||
}, cancellationToken);
|
||||
|
||||
return ApiResponse<IReadOnlyList<PaymentDto>>.Ok(result);
|
||||
return ApiResponse<PagedResult<PaymentDto>>.Ok(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user