修改排序bug
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2024-08-26 16:24:46 +08:00
parent 0acb7ca987
commit f52b09e5e8
3 changed files with 7 additions and 5 deletions

View File

@ -14,7 +14,7 @@ namespace IRaCIS.Core.API
{
services.AddHttpContextAccessor();
services.AddScoped<JSONTimeZoneConverter>();
services.AddScoped<CustomStringConverter>();
services.AddScoped<ObjectStorePathConvert>();
services.AddScoped<IOSSService,OSSService>();
builder.AddNewtonsoftJson(options =>

View File

@ -9,15 +9,13 @@ using System.Text.RegularExpressions;
namespace IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson
{
public class CustomStringConverter : JsonConverter<string>
public class ObjectStorePathConvert : JsonConverter<string>
{
//private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IOSSService _oSSService;
// 构造函数
public CustomStringConverter(/*IHttpContextAccessor httpContextAccessor*/ IOSSService oSSService)
public ObjectStorePathConvert( IOSSService oSSService)
{
//_httpContextAccessor = httpContextAccessor;
_oSSService = oSSService;
}

View File

@ -140,6 +140,10 @@ namespace IRaCIS.Core.Infrastructure.Extention
{
propName = sortField;
}
else
{
propName= pageInput.SortField;
}
source = string.IsNullOrWhiteSpace(propName) ? source : (pageInput.Asc ? source.OrderBy(propName) : source.OrderBy(propName + " desc"));