Merge pull request '添加选中项' (#14) from S01-轨迹中台 into dev
Reviewed-on: http://192.168.80.50:3000/Dotnet/SJZY.Track.Api/pulls/14
This commit is contained in:
commit
69a0c572f7
@ -15,5 +15,5 @@ public class KeywordsInputVO : PageInfoInput
|
||||
/// <summary>
|
||||
/// 选中项
|
||||
/// </summary>
|
||||
public List<int>? SelectedId { get; set; }
|
||||
public List<int>? SelectedIds { get; set; }
|
||||
}
|
||||
@ -6,4 +6,9 @@ public class GetTrackTemplateContentPageInputVO : PageInfoInput
|
||||
/// 轨迹模板id
|
||||
/// </summary>
|
||||
public List<int> TrackTemplateIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 选中项
|
||||
/// </summary>
|
||||
public List<int>? SelectedIds { get; set; }
|
||||
}
|
||||
@ -85,7 +85,8 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
||||
templateContent.UpdateUserId == updateUser.Id && !updateUser.IsDeleted)
|
||||
.Filter(null, true)
|
||||
.Where(templateContent => input.TrackTemplateIds.Contains(templateContent.TrackTemplateId) && !templateContent.IsDeleted)
|
||||
.OrderByDescending(templateContent => templateContent.CreateTime)
|
||||
.OrderByIF(input.SelectedIds.IsNullOrEmpty(), templateContent => templateContent.CreateTime, OrderByType.Desc)
|
||||
.OrderByIF(!input.SelectedIds.IsNullOrEmpty(), templateContent => SqlFunc.IIF(input.SelectedIds.Contains(templateContent.TrackContentId), SqlFunc.DateAdd(SqlFunc.GetDate(), 1), templateContent.CreateTime), OrderByType.Desc)
|
||||
.Select((templateContent, trackContent, trackStatus, enumValue, trackFlag, createUser, updateUser) =>
|
||||
new GetTrackTemplateContentPageOutputVO
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user