fix 字段名称,消费金额,实体注解

This commit is contained in:
2024-01-11 14:26:52 +08:00
parent 7aa907a049
commit 1e98d9816a
3 changed files with 4 additions and 6 deletions

View File

@@ -1,6 +1,4 @@
using Dlhis.Entity.Canteen.Enums; using Dlhis.Entity.Canteen.Enums;
using SqlSugar.DbConvert;
using SqlSugar;
namespace Dlhis.Basic.MealUser.Response; namespace Dlhis.Basic.MealUser.Response;
@@ -9,7 +7,7 @@ public class MealUserResponse
/// <summary> /// <summary>
/// 档案号 /// 档案号
/// </summary> /// </summary>
public string UserId { get; set; } public string UserNo { get; set; }
/// <summary> /// <summary>

View File

@@ -193,7 +193,7 @@ public class OrderService : IOrderService
} }
var effect = await _dbContext.Updateable<CanteenUserEntity>() 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) .SetColumns(x => x.Version == x.Version + 1)
.Where(x => x.UserNo == order.UserNo && x.Version == canteenUser.Version)//必须与查询时的version一致 .Where(x => x.UserNo == order.UserNo && x.Version == canteenUser.Version)//必须与查询时的version一致
.ExecuteCommandAsync(); .ExecuteCommandAsync();

View File

@@ -12,7 +12,7 @@ public class DepartmentEntity : SugarBaseEntity
/// <summary> /// <summary>
/// 部门号 /// 部门号
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "部门号")] [SugarColumn(ColumnDescription = "部门号", IsNullable = false)]
public string No { get; set; } public string No { get; set; }
/// <summary> /// <summary>
@@ -24,6 +24,6 @@ public class DepartmentEntity : SugarBaseEntity
/// <summary> /// <summary>
/// 部门名称 /// 部门名称
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "部门名称")] [SugarColumn(ColumnDescription = "部门名称" , IsNullable = false)]
public string Name { get; set; } public string Name { get; set; }
} }