fix 字段名称,消费金额,实体注解
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using Dlhis.Entity.Canteen.Enums;
|
||||
using SqlSugar.DbConvert;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Basic.MealUser.Response;
|
||||
|
||||
@@ -9,7 +7,7 @@ public class MealUserResponse
|
||||
/// <summary>
|
||||
/// 档案号
|
||||
/// </summary>
|
||||
public string UserId { get; set; }
|
||||
public string UserNo { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -193,7 +193,7 @@ public class OrderService : IOrderService
|
||||
}
|
||||
|
||||
var effect = await _dbContext.Updateable<CanteenUserEntity>()
|
||||
.SetColumns(x => x.Balance == canteenUser.Balance + order.Amount)
|
||||
.SetColumns(x => x.Balance == canteenUser.Balance)
|
||||
.SetColumns(x => x.Version == x.Version + 1)
|
||||
.Where(x => x.UserNo == order.UserNo && x.Version == canteenUser.Version)//必须与查询时的version一致
|
||||
.ExecuteCommandAsync();
|
||||
|
||||
@@ -12,7 +12,7 @@ public class DepartmentEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// 部门号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "部门号")]
|
||||
[SugarColumn(ColumnDescription = "部门号", IsNullable = false)]
|
||||
public string No { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -24,6 +24,6 @@ public class DepartmentEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// 部门名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "部门名称")]
|
||||
[SugarColumn(ColumnDescription = "部门名称" , IsNullable = false)]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user