From d5a1d0940627a08d9360c5d6692ef8a9dd6f4c78 Mon Sep 17 00:00:00 2001 From: jianweie code Date: Mon, 18 Nov 2024 22:19:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=AB=AF=E3=80=90=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E3=80=91=EF=BC=9A=E6=9C=8D=E5=8A=A1=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=A2=9E=E5=8A=A0=E9=94=80=E5=94=AE=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E5=AD=97=E6=AE=B5=E6=95=B0=E6=8D=AE=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreCms.Net.Model/CoreCms.Net.Model.xml | 5 +++++ .../Entities/Service/CoreCmsServicesPartial.cs | 8 ++++++++ CoreCms.Net.Web.WebApi/Controllers/ServiceController.cs | 2 ++ 3 files changed, 15 insertions(+) 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;