fix 营业点控制(admin),unit返回

This commit is contained in:
2024-03-21 11:31:50 +08:00
parent a5dcab1d07
commit c39f77008d
3 changed files with 25 additions and 5 deletions

View File

@@ -1,4 +1,7 @@
namespace Dlhis.Basic.Dishes.Response;
using Kurisu.AspNetCore.Utils.Extensions;
using Newtonsoft.Json;
namespace Dlhis.Basic.Dishes.Response;
public class DishesDetailResponse
{
@@ -42,7 +45,20 @@ public class DishesDetailResponse
/// <summary>
/// 单位
/// </summary>
public List<string> Units { get; set; }
public List<string> Units
{
get
{
if (CurrentUnits.IsPresent())
{
return CurrentUnits.ToObject<List<string>>();
}
return new () { "个" };
}
}
[JsonIgnore]
public string CurrentUnits { get; set; }
/// <summary>
/// 图片