Helius
2020-07-06 154b9de7c856f36a1236fa8b7ef68d065fbcdac2
src/main/resources/mapper/modules/MemberQuickBuySaleMapper.xml
@@ -3,18 +3,51 @@
<mapper namespace="com.xcong.excoin.modules.member.mapper.MemberQuickBuySaleMapper">
    <select id="findmemberQuickBuySaleListInPage" resultType="com.xcong.excoin.modules.member.entity.MemberQuickBuySaleEntity">
    <select id="findmemberQuickBuySaleListInPage" resultType="com.xcong.excoin.modules.member.vo.MemberQuickBuySaleVo">
        select * from member_quick_buy_sale s left join member m on m.id = s.member_id
        <where>
        s.order_type = 'B' 
            <if test="record != null" >
                <if test="record.createTime!=null">
                    and s.create_time >=#{record.createTime}
                <if test="record.account!=null and record.account!=''">
                    and (m.phone = #{record.account} or m.email = #{record.account} or m.invite_id=#{record.account})
                </if>
                <if test="record.memberId!=null">
                    and (m.phone = #{record.memberId} or m.email = #{record.memberId} or m.invite_id=#{record.memberId})
                <if test="record.orderStatus!=null and record.orderStatus!= 0" >
                    and s.order_status = #{record.orderStatus}
                </if>
                <if test="record.orderStatus!=null" >
            </if>
        </where>
        order by s.create_time desc
    </select>
    <select id="findmemberQuickSaleListInPage" resultType="com.xcong.excoin.modules.member.vo.MemberQuickSaleVo">
        SELECT
         s.id,
         s.create_time createTime,
         a.phone,
         a.email,
         s.member_id memberId,
         s.unit_price unitPrice,
         s.amount_cny amountCny,
         s.amount_usdt amountUsdt,
         s.order_status orderStatus,
         m.name,
         m.account,
         a.invite_id inviteId,
         m.payment_qrcode paymentQrcode,
         m.bank,
         m.payment_type paymentType,
         s.order_no orderNo
      FROM
         member_quick_buy_sale s
      LEFT JOIN member_payment_method m ON m.id = s.member_id
      LEFT JOIN member a ON a.id = s.member_id
        <where>
        s.order_type = 'S'
            <if test="record != null" >
                <if test="record.account!=null and record.account!=''">
                    and (a.phone = #{record.account} or a.email = #{record.account} or a.invite_id=#{record.account})
                </if>
                <if test="record.orderStatus!=null and record.orderStatus!= 0" >
                    and s.order_status = #{record.orderStatus}
                </if>
            </if>