From 95f55732cce47554e4641bddc74a2fd079824c3f Mon Sep 17 00:00:00 2001 From: liguoyang Date: Tue, 4 Jun 2024 14:26:56 +0800 Subject: [PATCH] test usercode --- .../TaskAssignment/Controllers/HangfireController.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Src/Dlhis.ScheduledTask/TaskAssignment/Controllers/HangfireController.cs b/Src/Dlhis.ScheduledTask/TaskAssignment/Controllers/HangfireController.cs index c621f698..6669c72c 100644 --- a/Src/Dlhis.ScheduledTask/TaskAssignment/Controllers/HangfireController.cs +++ b/Src/Dlhis.ScheduledTask/TaskAssignment/Controllers/HangfireController.cs @@ -90,7 +90,10 @@ public class HangfireController : ControllerBase others.ForEach(x => x.Status = BalanceRecordStatusEnumType.Obsolute); await _dbContext.UpdateAsync(others); - var sum = await _dbContext.Queryable().Where(x => x.Status == BalanceRecordStatusEnumType.Valid).SumAsync(x => x.Amount); + var sum = await _dbContext.Queryable().Where(x => x.UserCode == f.UserCode) + .Where(x => x.Status == BalanceRecordStatusEnumType.Valid) + .SumAsync(x => x.Amount); + var mealInfo = await _dbContext.Queryable().Where(x => x.UserCode == f.UserCode).SingleAsync(); await _dbContext.Updateable() .SetColumns(x => x.Balance == sum)