|
@@ -935,6 +935,10 @@ namespace GxPress.Repository.Implement
|
|
|
if (request.RenewalCount > 0)
|
|
|
query.Where(nameof(User.RenewalCount), request.RenewalCount);
|
|
|
result.Total = await _repository.CountAsync(query);
|
|
|
+ if (!string.IsNullOrEmpty(request.Sort))
|
|
|
+ query.OrderByDesc(nameof(User.AccumulativePrice));
|
|
|
+ else
|
|
|
+ query.OrderByDesc(nameof(User.CreatedDate));
|
|
|
var items = await _repository.GetAllAsync(query.ForPage(request.Page, request.PerPage));
|
|
|
result.Items = items.Select(n => _mapper.Map<UserDetail>(n));
|
|
|
return result;
|