fix 补充小于等于零不可操作

This commit is contained in:
2024-07-11 10:53:58 +08:00
parent 42ed53cdaa
commit ad422e0c5a
2 changed files with 2 additions and 5 deletions

View File

@@ -75,10 +75,7 @@ public class GainfoMealService : IGainfoMealService
gainfoLeave.ThrowIfNull("需要对已离职人员迁移");
var beforeBalance = await _dbContext.Queryable<GainfoMealEntity>().Where(x => x.UserCode == request.BeforeCode).Select(x => x.Balance).SingleAsync();
if (beforeBalance == 0)
{
return;
}
(beforeBalance <= 0).ThrowIfTrue("不可操作,余额不足");
var now = DateTime.Now;

View File

@@ -69,6 +69,6 @@ public enum BalanceRecordSourceEnumType
/// <summary>
/// 余额写入
/// </summary>
[Description("余额写入")]
[Description("余额迁移")]
BalanceMigration,
}