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,
|
||||
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();
|
||||
return detail;
|
||||
}
|
||||
@ -55,7 +60,8 @@ public class TrackContentRepository : BasicRepository<TrackContentEntity>, ITrac
|
||||
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(),
|
||||
(a, b, e, f) => a.Code.Contains(input.Keywords!) || a.Content.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) => 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
|
||||
{
|
||||
Id = a.Id,
|
||||
App = a.AppKey,
|
||||
Code = a.Code,
|
||||
Content = a.Content,
|
||||
EnContent = a.EnContent,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user