Commit 5971a295 authored by libin's avatar libin

佣金明细

parent b236dba5
......@@ -33,25 +33,34 @@ FROM
</select>
<select id="selectSellerWalterByUserIdAndWating" resultType="com.github.wxiaoqi.security.admin.vo.SellingWalletVo">
<!-- SELECT
*
FROM
(
SELECT
ausw.*,
IFNULL( ausw.commission, 0 ) - IFNULL( auswt.commission, 0 ) AS `commissionnm`,
auswt.status AS sellerStatus,
IFNULL(auswt.status,0) AS `isShow`
FROM
( SELECT * FROM `app_user_selling_water` WHERE STATUS = 0 AND `user_id`=#{userId} <if test="wating!=null">
AND `waiting`=#{wating} &lt;!&ndash;AND `status`=0&ndash;&gt;
</if>) AS `ausw`
LEFT JOIN ( SELECT * FROM `app_user_selling_water` WHERE STATUS = 1 AND `user_id`=#{userId} <if
test="wating!=null">
AND `waiting`=#{wating} &lt;!&ndash;AND `status`=0&ndash;&gt;
</if>) AS `auswt` ON auswt.order_no = ausw.order_no
) AS `auswres`
ORDER BY crt_time DESC-->
<!--
SELECT
e.*,
f.order_no AS `f_order`,
f.outcommission,
( IFNULL( e.incommission, 0 ) - IFNULL( f.outcommission, 0 ) ) AS `final_commission` ,
f.sellerStatus,
f.cancelTime
FROM
(
SELECT
a.*,
b.incommission
FROM
( SELECT * FROM `app_user_selling_water` WHERE STATUS = 0 and user_id=313 ) AS `a`
INNER JOIN ( SELECT order_no, IFNULL( SUM( commission ), 0 ) AS `incommission` FROM `app_user_selling_water` WHERE `status` = 0 and user_id=313 GROUP BY `order_no` ) AS `b` ON a.order_no = b.order_no
) AS `e`
LEFT JOIN (
SELECT
c.order_no,
d.outcommission,
1 AS `sellerStatus`,
c.crt_time AS `cancelTime`
FROM
( SELECT * FROM `app_user_selling_water` WHERE STATUS = 1 and user_id=313 ) AS `c`
INNER JOIN ( SELECT order_no,IFNULL( SUM( commission ), 0 ) AS `outcommission` FROM `app_user_selling_water` WHERE `status` = 1 and user_id=313 GROUP BY `order_no` ) AS `d` ON c.order_no = d.order_no
) AS `f` ON e.order_no = f.order_no
-->
SELECT w.*,o.commission as commission ,o.type AS `sellerStatus` FROM (
......
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