Althars123 3 жил өмнө
parent
commit
80781028f1

+ 3 - 0
twzd-service/src/main/java/com/miaxis/extension/vo/ExtensionIncomeVo.java

@@ -33,4 +33,7 @@ public class ExtensionIncomeVo {
     @ApiModelProperty(value = "已结算推广积分")
     private Integer achievementSettled;
 
+    @ApiModelProperty(value = "推广人数")
+    private Integer extensionCount;
+
 }

+ 2 - 1
twzd-service/src/main/resources/mapper/user/UserInfoMapper.xml

@@ -71,7 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where openid = (select parent_openid from wx_spread_relation where openid = #{fromUserName})
     </select>
     <select id="getDownLevelPoints"  resultType="com.miaxis.extension.vo.ExtensionIncomeVo">
-        select openid,IFNULL(nick_name,'未知') as nick_name,IFNULL(head_image,'未知') as head_image,achievement,achievement_settled from user_info
+        select openid,IFNULL(nick_name,'未知') as nick_name,IFNULL(head_image,'未知') as head_image,achievement,achievement_settled,
+        (select count(1) from wx_spread_relation where parent_openid =t1.openid) as extension_count from user_info t1
         where openid in (select openid from wx_spread_relation where parent_openid = #{openid})
     </select>