diff --git a/CoreCms.Net.Model/CoreCms.Net.Model.xml b/CoreCms.Net.Model/CoreCms.Net.Model.xml
index 07c5f048..180edf4d 100644
--- a/CoreCms.Net.Model/CoreCms.Net.Model.xml
+++ b/CoreCms.Net.Model/CoreCms.Net.Model.xml
@@ -5541,6 +5541,11 @@
核销门店
+
+
+ 销量
+
+
服务购买表
diff --git a/CoreCms.Net.Model/Entities/Service/CoreCmsServicesPartial.cs b/CoreCms.Net.Model/Entities/Service/CoreCmsServicesPartial.cs
index fb8fb9c7..b8173cd5 100644
--- a/CoreCms.Net.Model/Entities/Service/CoreCmsServicesPartial.cs
+++ b/CoreCms.Net.Model/Entities/Service/CoreCmsServicesPartial.cs
@@ -46,5 +46,13 @@ namespace CoreCms.Net.Model.Entities
[Display(Name = "核销门店")]
[SugarColumn(IsIgnore = true)]
public List consumableStores { get; set; }
+
+ ///
+ /// 销量
+ ///
+ [Display(Name = "销量")]
+ [SugarColumn(IsIgnore = true)]
+ public int buyCount { get; set; } = 0;
+
}
}
\ No newline at end of file
diff --git a/CoreCms.Net.Web.WebApi/Controllers/ServiceController.cs b/CoreCms.Net.Web.WebApi/Controllers/ServiceController.cs
index c1ff2666..b9d7f16b 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/ServiceController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/ServiceController.cs
@@ -208,6 +208,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
{
serviceInfo.openStatus = (int)GlobalEnumVars.ServicesOpenStatus.haveExpired;
}
+ //数量(可自行获取状态,默认就是下了多少单计算多少。也方便刷量。)
+ serviceInfo.buyCount = await _userServicesOrderServices.GetCountAsync(p => p.servicesId == entity.id);
jm.status = true;
jm.data = serviceInfo;