Commit 5971a295 authored by libin's avatar libin

佣金明细

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