diff --git a/MyApp.ServiceInterface/BackgroundMqServices.cs b/MyApp.ServiceInterface/BackgroundMqServices.cs index e0f67c6..13253e7 100644 --- a/MyApp.ServiceInterface/BackgroundMqServices.cs +++ b/MyApp.ServiceInterface/BackgroundMqServices.cs @@ -76,14 +76,14 @@ public async Task Any(DbWrites request) }, x => x.PostId == startJob.Id); } - if (request.CompleteJobIds?.Count > 0) + if (request.CompleteJobIds is { Count: > 0 }) { await Db.UpdateOnlyAsync(() => new PostJob { CompletedDate = DateTime.UtcNow, }, - x => request.CompleteJobIds.Contains(x.PostId)); + x => request.CompleteJobIds.Contains(x.Id)); var postJobs = await Db.SelectAsync(Db.From() - .Where(x => request.CompleteJobIds.Contains(x.PostId))); + .Where(x => request.CompleteJobIds.Contains(x.Id))); foreach (var postJob in postJobs) {