fix 价格默认获取菜单中的设置

This commit is contained in:
2024-03-21 21:48:05 +08:00
parent a3cfc472c8
commit afdd9e6f14
2 changed files with 3 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ public class DishesDetailResponse
/// <summary>
/// 单价
/// </summary>
public decimal Price { get; set; }
public decimal? Price { get; set; }
/// <summary>
/// 剩余数量
@@ -53,7 +53,7 @@ public class DishesDetailResponse
{
return CurrentUnits.ToObject<List<string>>();
}
return new () { "个" };
return new() { "个" };
}
}

View File

@@ -108,7 +108,7 @@ public class DishesMenuService : IDishesMenuService
CustomCode = dishes.CustomCode,
Description = dishes.Description,
ImageUrl = dishes.ImageUrl,
Price = dishes.Price,
Price = SqlFunc.IIF(x.Price > 0, x.Price, dishes.Price),
Name = dishes.Name,
Number = x.Number,
CurrentUnits = dishes.Units.ToString()