|
@@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getPcDownLevelPoints" resultType="com.miaxis.extension.vo.ExtensionIncomeVo">
|
|
<select id="getPcDownLevelPoints" resultType="com.miaxis.extension.vo.ExtensionIncomeVo">
|
|
- select openid,IFNULL(nick_name,'未知') as nick_name,IFNULL(head_image,'未知') as head_image,achievement+achievement_settled as achievement_total,achievement,achievement_settled,
|
|
|
|
|
|
+ select id,openid,IFNULL(nick_name,'未知') as nick_name,IFNULL(head_image,'未知') as head_image,achievement+achievement_settled as achievement_total,achievement,achievement_settled,
|
|
(select count(1) from wx_spread_relation where parent_openid =t1.openid) as extension_count ,
|
|
(select count(1) from wx_spread_relation where parent_openid =t1.openid) as extension_count ,
|
|
( SELECT count( 1 ) FROM wx_spread_relation WHERE parent_openid = t1.openid ) AS extension_count ,
|
|
( SELECT count( 1 ) FROM wx_spread_relation WHERE parent_openid = t1.openid ) AS extension_count ,
|
|
IFNULL(( SELECT sum(payer_total) FROM wx_order WHERE openid = t1.openid and trade_state = 'SUCCESS' ),0) as cost_count
|
|
IFNULL(( SELECT sum(payer_total) FROM wx_order WHERE openid = t1.openid and trade_state = 'SUCCESS' ),0) as cost_count
|