修改排序bug
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
0acb7ca987
commit
f52b09e5e8
|
@ -14,7 +14,7 @@ namespace IRaCIS.Core.API
|
||||||
{
|
{
|
||||||
services.AddHttpContextAccessor();
|
services.AddHttpContextAccessor();
|
||||||
services.AddScoped<JSONTimeZoneConverter>();
|
services.AddScoped<JSONTimeZoneConverter>();
|
||||||
services.AddScoped<CustomStringConverter>();
|
services.AddScoped<ObjectStorePathConvert>();
|
||||||
services.AddScoped<IOSSService,OSSService>();
|
services.AddScoped<IOSSService,OSSService>();
|
||||||
|
|
||||||
builder.AddNewtonsoftJson(options =>
|
builder.AddNewtonsoftJson(options =>
|
||||||
|
|
|
@ -9,15 +9,13 @@ using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson
|
namespace IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson
|
||||||
{
|
{
|
||||||
public class CustomStringConverter : JsonConverter<string>
|
public class ObjectStorePathConvert : JsonConverter<string>
|
||||||
{
|
{
|
||||||
//private readonly IHttpContextAccessor _httpContextAccessor;
|
|
||||||
private readonly IOSSService _oSSService;
|
private readonly IOSSService _oSSService;
|
||||||
|
|
||||||
// 构造函数
|
// 构造函数
|
||||||
public CustomStringConverter(/*IHttpContextAccessor httpContextAccessor*/ IOSSService oSSService)
|
public ObjectStorePathConvert( IOSSService oSSService)
|
||||||
{
|
{
|
||||||
//_httpContextAccessor = httpContextAccessor;
|
|
||||||
_oSSService = oSSService;
|
_oSSService = oSSService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,10 @@ namespace IRaCIS.Core.Infrastructure.Extention
|
||||||
{
|
{
|
||||||
propName = sortField;
|
propName = sortField;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
propName= pageInput.SortField;
|
||||||
|
}
|
||||||
|
|
||||||
source = string.IsNullOrWhiteSpace(propName) ? source : (pageInput.Asc ? source.OrderBy(propName) : source.OrderBy(propName + " desc"));
|
source = string.IsNullOrWhiteSpace(propName) ? source : (pageInput.Asc ? source.OrderBy(propName) : source.OrderBy(propName + " desc"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue