update: 【分页查询轨迹模板内容】增加模糊关键字查询
This commit is contained in:
parent
d6e58a38fd
commit
ffd6d0e689
@ -21,4 +21,9 @@ public class GetPageTrackTemplateListInput : PageInfoInput
|
||||
/// 模板code
|
||||
/// </summary>
|
||||
public string? TemplateCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关键字
|
||||
/// </summary>
|
||||
public string? KeyWord { get; set; }
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
namespace SJZY.Track.Domain.Dtos.TrackTemplate;
|
||||
|
||||
public class GetPageTrackTemplateListInputVo :PageInfoInput
|
||||
public class GetPageTrackTemplateListInputVo : PageInfoInput
|
||||
{
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// 子系统id
|
||||
/// </summary>
|
||||
public int SubSystemId { get; set; }
|
||||
@ -21,4 +21,9 @@ public class GetPageTrackTemplateListInputVo :PageInfoInput
|
||||
/// 模板code
|
||||
/// </summary>
|
||||
public string? TemplateCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关键字
|
||||
/// </summary>
|
||||
public string? KeyWord { get; set; }
|
||||
}
|
||||
|
||||
@ -250,6 +250,11 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
||||
.LeftJoin<TrackStatusEntity>((a, b, c) => b.TrackStatusId == c.Id)
|
||||
.LeftJoin<TrackNodeEntity>((a, b, c, d) => c.Node == d.Id)
|
||||
.Where(a => templateIds.Contains(a.TrackTemplateId))
|
||||
.WhereIF(!input.KeyWord.IsNullOrWhiteSpace(), (a, b, c, d) =>
|
||||
b.Code.Contains(input.KeyWord!)
|
||||
|| b.EnContent.Contains(input.KeyWord!)
|
||||
|| b.Content.Contains(input.KeyWord!)
|
||||
)
|
||||
.Select((a, b, c, d) => new TemplateContentDtoVo
|
||||
{
|
||||
TemplateId = a.TrackTemplateId,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user