fix 补充小于等于零不可操作
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -69,6 +69,6 @@ public enum BalanceRecordSourceEnumType
|
||||
/// <summary>
|
||||
/// 余额写入
|
||||
/// </summary>
|
||||
[Description("余额写入")]
|
||||
[Description("余额迁移")]
|
||||
BalanceMigration,
|
||||
}
|
||||
Reference in New Issue
Block a user