| | |
| | | <select id="selectMemberByUserId" resultType="com.xzx.gc.entity.UserHeadRelate"> |
| | | select * from xzx_user_head_relate where user_id=#{userId} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectHeadStatisticsData" resultType="com.xzx.gc.user.vo.HeadInfoVo"> |
| | | select |
| | | IFNULL(sum(a.score), 0) score, |
| | | IFNULL(sum(a.amount), 0) amount, |
| | | IFNULL(count(1), 0) cnt |
| | | from xzx_user_head_relate a |
| | | where a.head_user_id=#{userId} |
| | | group by a.head_user_id |
| | | </select> |
| | | |
| | | <select id="selectHeadTeamListInPage" resultType="com.xzx.gc.user.vo.HeadTeamVo"> |
| | | select |
| | | from_base64(b.nick_name) name, |
| | | b.avatar, |
| | | date_format(a.CREATED_TIME, '%Y/%m/%d') bindTime, |
| | | a.score, |
| | | a.amount, |
| | | date_format((select c.CREATED_TIME from xzx_jhy_order c where b.user_id=c.user_id and c.status=3 order by id desc limit 1), '%Y/%m/%d') lastOrderTime |
| | | from xzx_user_head_relate a |
| | | inner join xzx_user_info b on a.user_id=b.user_id |
| | | where a.head_user_id=#{userId} |
| | | order by a.id desc |
| | | </select> |
| | | </mapper> |