Commit a2e07a73 authored by 黄奎's avatar 黄奎

Merge branch 'HK' of http://gitlab.oytour.com/Kui2/mall.oytour.com

# Conflicts:
#	Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
parents 96bf32d8 edb2014f
......@@ -347,16 +347,20 @@ ORDER BY t.orderNum desc ";
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT DISTINCT A.*,IFNULL(orderTab.OrderNum,0) AS OrderNum
FROM RB_Reserve_ServicePersonal AS A
INNER JOIN
(
SELECT * FROM rb_reserve_servicepersonalproduct WHERE ServiceType=3 AND `Status`=0
UNION
SELECT * FROM rb_reserve_servicepersonalproduct WHERE ServiceType=2 AND `Status`=0 AND ProductId={0}
UNION
SELECT * FROM rb_reserve_servicepersonalproduct WHERE ServiceType=1 AND `Status`=0 AND ProductId IN({1})
) AS B ON A.ID=B.ServiceId
SELECT DISTINCT A.*,IFNULL(orderTab.OrderNum,0) AS OrderNum
FROM(
SELECT A.*
FROM RB_Reserve_ServicePersonal AS A
WHERE A.Status=0 AND A.ServiceType=3
UNION ALL
SELECT A.*
FROM RB_Reserve_ServicePersonal AS A INNER JOIN rb_reserve_servicepersonalproduct AS C ON A.ServiceType=C.ServiceType AND C.`Status`=0 AND C.ProductId={0}
WHERE A.Status=0 AND A.ServiceType=2
UNION ALL
SELECT A.*
FROM RB_Reserve_ServicePersonal AS A INNER JOIN rb_reserve_servicepersonalproduct AS D ON A.ServiceType=D.ServiceType AND D.`Status`=0 AND D.ProductId IN({1})
WHERE A.Status=0 AND A.ServiceType=1
) AS A
LEFT JOIN
(
SELECT detailB.ServicepersonalId,COUNT(1) AS OrderNum
......@@ -364,7 +368,7 @@ LEFT JOIN
WHERE 1=1 AND orderA.OrderStatus NOT IN(7)
GROUP BY detailB.ServicepersonalId
) AS orderTab ON A.ID=orderTab.OrderNum
WHERE A.Status=0 AND A.StoreId={2}
WHERE A.Status=0 AND A.storeId={2}
", productId, categoryIds, storeId);
if (servicePersionId > 0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment