| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | | <mapper namespace="com.xcong.excoin.modules.member.mapper.MemberMapper">
|
| | |
|
| | | <select id="seeReceiveInfo" resultType="com.xcong.excoin.modules.member.entity.ActivityReceiveRecord">
|
| | | SELECT
|
| | | a.id id,
|
| | | a.member_id,
|
| | | a.receive_time,
|
| | | a.receive_coin_amount,
|
| | | b.phone phone,
|
| | | b.invite_id inviteId,
|
| | | b.email email,
|
| | | concat(c.first_name,c.second_name) realName
|
| | | FROM
|
| | | activity_receive_record a
|
| | | LEFT JOIN member b on a.member_id = b.id
|
| | | left JOIN member_authentication c on a.member_id = c.member_id
|
| | | where
|
| | | a.receive_state = 1
|
| | | and a.member_id = (select member_id from activity_receive_record where id = #{record.id})
|
| | | </select>
|
| | |
|
| | | <select id="memberActivityReceive" resultType="com.xcong.excoin.modules.member.vo.MemberActivityReceiveVo">
|
| | | SELECT
|
| | | a.id id,
|
| | | a.member_id memberId,
|
| | | SUM(a.receive_coin_amount) receivedTotal,
|
| | | (100-SUM(a.receive_coin_amount)) receiveTotal,
|
| | | b.phone phone,
|
| | | b.account_type accountType,
|
| | | b.invite_id inviteId,
|
| | | b.email email,
|
| | | concat(c.first_name,c.second_name) realName
|
| | | FROM
|
| | | activity_receive_record a
|
| | | LEFT JOIN member b on a.member_id = b.id
|
| | | left JOIN member_authentication c on a.member_id = c.member_id
|
| | | <where>
|
| | | a.receive_state = 1
|
| | | <if test="record != null" >
|
| | | <if test="record.account!=null and record.account!=''">
|
| | | and (b.phone = #{record.account} or b.email = #{record.account} or b.invite_id=#{record.account})
|
| | | </if>
|
| | | </if>
|
| | | </where>
|
| | | group by a.member_id ORDER BY receivedTotal DESC;
|
| | | </select>
|
| | |
|
| | | <select id="selectMemberInfoByQueryKey" resultType="com.xcong.excoin.modules.member.entity.MemberEntity">
|
| | | select * from member where phone=#{queryKey} or invite_id=#{queryKey} or email=#{queryKey}
|
| | | </select>
|