fix:1029的一些bug
This commit is contained in:
parent
52c16b3738
commit
d32c80ef1e
@ -35,7 +35,12 @@ public class TrackContentRepository : BasicRepository<TrackContentEntity>, ITrac
|
|||||||
IsAllowManuallyUpdate = a.IsAllowManuallyUpdate,
|
IsAllowManuallyUpdate = a.IsAllowManuallyUpdate,
|
||||||
IsAllowManuallyCreate = a.IsAllowManuallyCreate
|
IsAllowManuallyCreate = a.IsAllowManuallyCreate
|
||||||
})
|
})
|
||||||
.Mapper(x => { x.TrackFlagIds = x.TrackFlagId?.Split(',').Select(int.Parse).ToList(); })
|
.Mapper(x =>
|
||||||
|
{
|
||||||
|
x.TrackFlagIds = x.TrackFlagId.IsNullOrEmpty()
|
||||||
|
? []
|
||||||
|
: x.TrackFlagId!.Split(',').Select(int.Parse).ToList();
|
||||||
|
})
|
||||||
.FirstAsync();
|
.FirstAsync();
|
||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
@ -54,8 +59,9 @@ public class TrackContentRepository : BasicRepository<TrackContentEntity>, ITrac
|
|||||||
.WhereIF(!input.AppKey.IsNullOrWhiteSpace(), (a, b, e, f) => a.AppKey == input.AppKey)
|
.WhereIF(!input.AppKey.IsNullOrWhiteSpace(), (a, b, e, f) => a.AppKey == input.AppKey)
|
||||||
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(),
|
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(),
|
||||||
(a, b, e, f) => a.Code.Contains(input.Keywords!) || a.Content.Contains(input.Keywords!)
|
(a, b, e, f) => a.Code.Contains(input.Keywords!) || a.Content.Contains(input.Keywords!)
|
||||||
|| a.EnContent.Contains(input.Keywords!))
|
|| a.EnContent.Contains(input.Keywords!))
|
||||||
.WhereIF(input.TrackStatusId.HasValue && input.TrackStatusId > 0, (a, b, e, f) => a.TrackStatusId == input.TrackStatusId)
|
.WhereIF(input.TrackStatusId.HasValue && input.TrackStatusId > 0,
|
||||||
|
(a, b, e, f) => a.TrackStatusId == input.TrackStatusId)
|
||||||
.OrderByIF(input.SelectIds.IsNullOrEmpty(), (a, b, e, f) => a.CreateTime, OrderByType.Desc)
|
.OrderByIF(input.SelectIds.IsNullOrEmpty(), (a, b, e, f) => a.CreateTime, OrderByType.Desc)
|
||||||
.OrderByIF(!input.SelectIds.IsNullOrEmpty(),
|
.OrderByIF(!input.SelectIds.IsNullOrEmpty(),
|
||||||
(a, b, e, f) => SqlFunc.IIF(input.SelectIds!.Contains(a.Id), SqlFunc.DateAdd(SqlFunc.GetDate(), 1),
|
(a, b, e, f) => SqlFunc.IIF(input.SelectIds!.Contains(a.Id), SqlFunc.DateAdd(SqlFunc.GetDate(), 1),
|
||||||
@ -63,6 +69,7 @@ public class TrackContentRepository : BasicRepository<TrackContentEntity>, ITrac
|
|||||||
.Select((a, b, e, f) => new GetTrackContentListVO
|
.Select((a, b, e, f) => new GetTrackContentListVO
|
||||||
{
|
{
|
||||||
Id = a.Id,
|
Id = a.Id,
|
||||||
|
App = a.AppKey,
|
||||||
Code = a.Code,
|
Code = a.Code,
|
||||||
Content = a.Content,
|
Content = a.Content,
|
||||||
EnContent = a.EnContent,
|
EnContent = a.EnContent,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user