diff --git a/Src/Dlhis.ScheduledTask/CommonJobs/MealSupplementHandlerJob.cs b/Src/Dlhis.ScheduledTask/CommonJobs/MealSupplementHandlerJob.cs index 682066d7..ccc6e9e1 100644 --- a/Src/Dlhis.ScheduledTask/CommonJobs/MealSupplementHandlerJob.cs +++ b/Src/Dlhis.ScheduledTask/CommonJobs/MealSupplementHandlerJob.cs @@ -114,13 +114,13 @@ public class MealSupplementHandlerJob } catch (Exception ex) { + await _dbContext.Client.Ado.RollbackTranAsync(); + await _dbContext.Updateable() .SetColumns(x => x.Status == MealSupplementStatusEnumtype.Error) .SetColumns(x => x.Result == ex.Message) .Where(x => x.UniqueId == mealSupplement.UniqueId) .ExecuteCommandAsync(); - - await _dbContext.Client.Ado.RollbackTranAsync(); } }