质检任务优化
This commit is contained in:
@@ -230,9 +230,8 @@ public class TimeTaskService : ITimeTaskService, IDynamicApiController, ITransie
|
||||
var entitys = await _repository.AsQueryable().Where(p=>p.FullName==fullName).ToListAsync();
|
||||
foreach (var entity in entitys)
|
||||
{
|
||||
var isOk = await _repository.AsUpdateable(entity).CallEntityMethod(m => m.Delete()).UpdateColumns(it => new { it.DeleteMark, it.DeleteTime, it.DeleteUserId }).ExecuteCommandHasChangeAsync();
|
||||
if (!isOk)
|
||||
throw Oops.Oh(ErrorCode.COM1002);
|
||||
await _repository.AsSugarClient().Deleteable(entity).ExecuteCommandAsync();
|
||||
|
||||
// 从调度器里取消
|
||||
SpareTime.Cancel(entity.Id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user