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