Helius
2021-09-07 1e4cab335b1cb68ad3438e522ea410c2d2e753ed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="UTF-8" ?>
<!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.dao.MemberPaymentMethodDao">
     
    <select id="selectByMemberId" resultType="com.xcong.excoin.modules.member.entity.MemberPaymentMethodEntity">
        SELECT a.* FROM member_payment_method a WHERE a.member_id = #{memberId}
    </select>
 
    <select id="selectDefualtMethod" resultType="com.xcong.excoin.modules.member.entity.MemberPaymentMethodEntity">
        select * from member_payment_method
        <where>
            <if test="memberId != null">
                and member_id=#{memberId}
            </if>
            <if test="isDefault != null and isDefault != ''">
                and is_defualt = #{isDefault}
            </if>
            <if test="type != null">
                and payment_type = #{type}
            </if>
        </where>
    </select>
</mapper>