fix: 减少where 条件
This commit is contained in:
@@ -222,7 +222,6 @@ public class AssignmentService : IAssignmentService
|
||||
.Select((x, f) => f.AcsValue)
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
var all = await CommonHelper.RetryAsync(async () =>
|
||||
{
|
||||
var internalAll = new List<long>();
|
||||
@@ -244,7 +243,7 @@ public class AssignmentService : IAssignmentService
|
||||
var effect = await _dbContext.Updateable<DeviceTaskEntity>()
|
||||
.SetColumns(x => x.Status == DeviceTaskStatusEnumType.Process)
|
||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||
.Where(x => internalAll.Contains(x.Id) && (x.Status == DeviceTaskStatusEnumType.Wait || x.Status == DeviceTaskStatusEnumType.Process))
|
||||
.Where(x => internalAll.Contains(x.Id))
|
||||
.ExecuteCommandAsync();
|
||||
|
||||
if (effect != internalAll.Count)
|
||||
@@ -254,7 +253,7 @@ public class AssignmentService : IAssignmentService
|
||||
|
||||
return internalAll;
|
||||
|
||||
}, 5);
|
||||
}, 3);
|
||||
|
||||
if (!all.Any())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user