Merge branch 'S01-轨迹中台' of http://192.168.80.50:3000/Dotnet/SJZY.Track.Api into S01-轨迹中台

This commit is contained in:
moyongzhen 2024-03-06 11:15:46 +08:00
commit 54a7f48ce4
2 changed files with 9 additions and 3 deletions

View File

@ -20,7 +20,13 @@ public class GetTrackInput
/// 时区 +8 +8.25 -8.5 -9
/// 不传默认+8
/// </summary>
public float? TimeZone { get; set; } = 8;
private float? _timeZone;
public float? TimeZone
{
get => _timeZone ?? 8;
set => _timeZone = value;
}
/// <summary>
/// 排序方式

View File

@ -55,8 +55,8 @@ public class TrackQueryService : ApplicationService
Status = x.TrackStatus,
Content = x.TrackContent,
Location = x.TrackPlace,
Time = x.TrackTime.AddHours(input.TimeZone!.Value - x.TrackTimeZone),
TimeZone = input.TimeZone!.Value
Time = x.TrackTime.AddHours(input.TimeZone ?? 8 - x.TrackTimeZone),
TimeZone = input.TimeZone ?? 8
}).ToList();
res.Add(item);