|
@@ -78,7 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<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 count(1) from wx_spread_relation where parent_openid =t1.openid) as extension_count from user_info t1
|
|
|
+ (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
|
|
|
+ from user_info t1
|
|
|
where openid in (select openid from wx_spread_relation where parent_openid = #{openid})
|
|
|
<if test="sortByParmName != null and sortByParmName != ''"> order by ${sortByParmName} desc</if>
|
|
|
</select>
|