Commit d33fab28 authored by libin's avatar libin

Merge branch 'master-wallet-bug-fix' into dev

parents 6c8dfd64 c057585b
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
SELECT SELECT
aur.user_id, aur.user_id,
aur.bind_time as `leagueTime`, aur.bind_time as `leagueTime`,
ausww.income IFNULL(ausww.income,0) AS `income`
FROM FROM
`app_user_relation` AS `aur` `app_user_relation` AS `aur`
LEFT JOIN (SELECT DISTINCT LEFT JOIN (SELECT DISTINCT
`source_id` AS userId, `source_id` AS userId,
IFNULL( IFNULL(
( (
( SELECT SUM( commission ) FROM `app_user_selling_water` WHERE source_id = ausw.source_id AND `status` = 0 ) - ( SELECT SUM( commission ) FROM `app_user_selling_water` WHERE source_id = ausw.source_id AND `status` = 1 ) ( SELECT IFNULL(SUM( commission ),0) FROM `app_user_selling_water` WHERE source_id = ausw.source_id AND `status` = 0 ) - ( SELECT IFNULL(SUM( commission ),0) FROM `app_user_selling_water` WHERE source_id = ausw.source_id AND `status` = 1 )
), ),
0 0
) AS `income` ) AS `income`
...@@ -33,7 +33,7 @@ FROM ...@@ -33,7 +33,7 @@ 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 <!-- SELECT
* *
FROM FROM
( (
...@@ -64,7 +64,8 @@ FROM ...@@ -64,7 +64,8 @@ FROM
AND `status`=1 and commission>0 AND `status`=1 and commission>0
) as t ) as t
GROUP BY t.order_no GROUP BY t.order_no
) o LEFT JOIN ( SELECT DISTINCT order_no,user_id,source_id,order_type,img,price,title,waiting,`crt_time` FROM app_user_selling_water ) w ) o LEFT JOIN ( SELECT DISTINCT order_no,user_id,source_id,order_type,img,price,title,waiting,`crt_time` FROM
app_user_selling_water ) w
ON o.order_no=w.order_no ON o.order_no=w.order_no
where 1=1 where 1=1
<if test="wating!=null"> <if test="wating!=null">
......
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