fix 价格默认获取菜单中的设置
This commit is contained in:
@@ -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() { "个" };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user