fix:修复查询条件的可空类型使用错误

This commit is contained in:
hardstylewyl 2025-02-26 09:46:27 +08:00
parent 36c2630101
commit b53db5c7bf
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ public class GetPageTrackContentVO : PageInfoInput
/// <summary>
/// 轨迹状态id
/// </summary>
public int TrackStatusId { get; set; }
public int? TrackStatusId { get; set; }
/// <summary>
/// 选中的轨迹内容id

View File

@ -58,7 +58,7 @@ public class TrackContentRepository : BasicRepository<TrackContentEntity>, ITrac
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(),
(a, b, d, e, f) => a.Code.Contains(input.Keywords) || a.Content.Contains(input.Keywords)
|| a.EnContent.Contains(input.Keywords))
.WhereIF(input.TrackStatusId > 0, (a, b, d, e, f) => a.TrackStatusId == input.TrackStatusId)
.WhereIF(input.TrackStatusId.HasValue && input.TrackStatusId > 0, (a, b, d, e, f) => a.TrackStatusId == input.TrackStatusId)
.OrderByIF(input.SelectIds.IsNullOrEmpty(), (a, b, d, e, f) => a.CreateTime, OrderByType.Desc)
.OrderByIF(!input.SelectIds.IsNullOrEmpty(),
(a, b, d, e, f) => SqlFunc.IIF(input.SelectIds.Contains(a.Id), SqlFunc.DateAdd(SqlFunc.GetDate(), 1),