|
@@ -288,7 +288,7 @@
|
|
|
<select id="findShopAccountOverviewDept" resultType="map">
|
|
<select id="findShopAccountOverviewDept" resultType="map">
|
|
|
SELECT
|
|
SELECT
|
|
|
COALESCE(settled.to_be_settled, 0) AS toBeSettled,
|
|
COALESCE(settled.to_be_settled, 0) AS toBeSettled,
|
|
|
- COALESCE(settled.to_be_settled, 0) AS available,
|
|
|
|
|
|
|
+ COALESCE(settled.received, 0) AS available,
|
|
|
COALESCE(settled.received, 0) AS received
|
|
COALESCE(settled.received, 0) AS received
|
|
|
FROM
|
|
FROM
|
|
|
nm_site a
|
|
nm_site a
|
|
@@ -300,7 +300,7 @@
|
|
|
MAX(b.create_time) AS update_time
|
|
MAX(b.create_time) AS update_time
|
|
|
FROM
|
|
FROM
|
|
|
nm_order o
|
|
nm_order o
|
|
|
- LEFT JOIN nm_profit_sharing_info b ON o.id = b.order_id AND o.org_code = b.org_code
|
|
|
|
|
|
|
+ LEFT JOIN nm_profit_sharing_info b ON o.id = b.order_id
|
|
|
WHERE
|
|
WHERE
|
|
|
o.profit_sharing_status IN (0, 1, 2) AND o.pay_status = 1
|
|
o.profit_sharing_status IN (0, 1, 2) AND o.pay_status = 1
|
|
|
GROUP BY
|
|
GROUP BY
|