test usercode

This commit is contained in:
2024-06-04 14:26:56 +08:00
parent 0a7fc847f0
commit 95f55732cc

View File

@@ -90,7 +90,10 @@ public class HangfireController : ControllerBase
others.ForEach(x => x.Status = BalanceRecordStatusEnumType.Obsolute);
await _dbContext.UpdateAsync(others);
var sum = await _dbContext.Queryable<BalanceRecordEntity>().Where(x => x.Status == BalanceRecordStatusEnumType.Valid).SumAsync(x => x.Amount);
var sum = await _dbContext.Queryable<BalanceRecordEntity>().Where(x => x.UserCode == f.UserCode)
.Where(x => x.Status == BalanceRecordStatusEnumType.Valid)
.SumAsync(x => x.Amount);
var mealInfo = await _dbContext.Queryable<GainfoMealEntity>().Where(x => x.UserCode == f.UserCode).SingleAsync();
await _dbContext.Updateable<GainfoMealEntity>()
.SetColumns(x => x.Balance == sum)