<?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.jsowell.pile.mapper.PileAuthCardMapper">
  <resultMap id="BaseResultMap" type="com.jsowell.pile.domain.PileAuthCard">
    <!--@mbg.generated-->
    <!--@Table pile_auth_card-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="logic_card" jdbcType="VARCHAR" property="logicCard" />
    <result column="physics_card" jdbcType="VARCHAR" property="physicsCard" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="secret_key" jdbcType="VARCHAR" property="secretKey" />
    <result column="member_id" jdbcType="VARCHAR" property="memberId" />
    <result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
    <result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, logic_card, physics_card, `status`, secret_key, member_id, merchant_id, create_time, 
    create_by, update_time, update_by, del_flag
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select 
    <include refid="Base_Column_List" />
    from pile_auth_card
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--@mbg.generated-->
    delete from pile_auth_card
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileAuthCard" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into pile_auth_card (logic_card, physics_card, `status`, 
      secret_key, member_id, merchant_id, 
      create_time, create_by, update_time, 
      update_by, del_flag)
    values (#{logicCard,jdbcType=VARCHAR}, #{physicsCard,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, 
      #{secretKey,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileAuthCard" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into pile_auth_card
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="logicCard != null">
        logic_card,
      </if>
      <if test="physicsCard != null">
        physics_card,
      </if>
      <if test="status != null">
        `status`,
      </if>
      <if test="secretKey != null">
        secret_key,
      </if>
      <if test="memberId != null">
        member_id,
      </if>
      <if test="merchantId != null">
        merchant_id,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createBy != null">
        create_by,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="updateBy != null">
        update_by,
      </if>
      <if test="delFlag != null">
        del_flag,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="logicCard != null">
        #{logicCard,jdbcType=VARCHAR},
      </if>
      <if test="physicsCard != null">
        #{physicsCard,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="secretKey != null">
        #{secretKey,jdbcType=VARCHAR},
      </if>
      <if test="memberId != null">
        #{memberId,jdbcType=VARCHAR},
      </if>
      <if test="merchantId != null">
        #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="delFlag != null">
        #{delFlag,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.PileAuthCard">
    <!--@mbg.generated-->
    update pile_auth_card
    <set>
      <if test="logicCard != null">
        logic_card = #{logicCard,jdbcType=VARCHAR},
      </if>
      <if test="physicsCard != null">
        physics_card = #{physicsCard,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        `status` = #{status,jdbcType=VARCHAR},
      </if>
      <if test="secretKey != null">
        secret_key = #{secretKey,jdbcType=VARCHAR},
      </if>
      <if test="memberId != null">
        member_id = #{memberId,jdbcType=VARCHAR},
      </if>
      <if test="merchantId != null">
        merchant_id = #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createBy != null">
        create_by = #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        update_by = #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="delFlag != null">
        del_flag = #{delFlag,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.PileAuthCard">
    <!--@mbg.generated-->
    update pile_auth_card
    set logic_card = #{logicCard,jdbcType=VARCHAR},
      physics_card = #{physicsCard,jdbcType=VARCHAR},
      `status` = #{status,jdbcType=VARCHAR},
      secret_key = #{secretKey,jdbcType=VARCHAR},
      member_id = #{memberId,jdbcType=VARCHAR},
      merchant_id = #{merchantId,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_by = #{createBy,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=VARCHAR},
      del_flag = #{delFlag,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateBatch" parameterType="java.util.List">
    <!--@mbg.generated-->
    update pile_auth_card
    <trim prefix="set" suffixOverrides=",">
      <trim prefix="logic_card = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.logicCard,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="physics_card = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.physicsCard,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="`status` = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="secret_key = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.secretKey,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="member_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="merchant_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.merchantId,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="create_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="create_by = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="update_time = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="update_by = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="del_flag = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=VARCHAR}
        </foreach>
      </trim>
    </trim>
    where id in
    <foreach close=")" collection="list" item="item" open="(" separator=", ">
      #{item.id,jdbcType=INTEGER}
    </foreach>
  </update>
  <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into pile_auth_card
    (logic_card, physics_card, `status`, secret_key, member_id, merchant_id, create_time, 
      create_by, update_time, update_by, del_flag)
    values
    <foreach collection="list" item="item" separator=",">
      (#{item.logicCard,jdbcType=VARCHAR}, #{item.physicsCard,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, 
        #{item.secretKey,jdbcType=VARCHAR}, #{item.memberId,jdbcType=VARCHAR}, #{item.merchantId,jdbcType=VARCHAR}, 
        #{item.createTime,jdbcType=TIMESTAMP}, #{item.createBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
        #{item.updateBy,jdbcType=VARCHAR}, #{item.delFlag,jdbcType=VARCHAR})
    </foreach>
  </insert>
  <insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileAuthCard" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into pile_auth_card
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      logic_card,
      physics_card,
      `status`,
      secret_key,
      member_id,
      merchant_id,
      create_time,
      create_by,
      update_time,
      update_by,
      del_flag,
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      #{logicCard,jdbcType=VARCHAR},
      #{physicsCard,jdbcType=VARCHAR},
      #{status,jdbcType=VARCHAR},
      #{secretKey,jdbcType=VARCHAR},
      #{memberId,jdbcType=VARCHAR},
      #{merchantId,jdbcType=VARCHAR},
      #{createTime,jdbcType=TIMESTAMP},
      #{createBy,jdbcType=VARCHAR},
      #{updateTime,jdbcType=TIMESTAMP},
      #{updateBy,jdbcType=VARCHAR},
      #{delFlag,jdbcType=VARCHAR},
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      logic_card = #{logicCard,jdbcType=VARCHAR},
      physics_card = #{physicsCard,jdbcType=VARCHAR},
      `status` = #{status,jdbcType=VARCHAR},
      secret_key = #{secretKey,jdbcType=VARCHAR},
      member_id = #{memberId,jdbcType=VARCHAR},
      merchant_id = #{merchantId,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_by = #{createBy,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=VARCHAR},
      del_flag = #{delFlag,jdbcType=VARCHAR},
    </trim>
  </insert>
  <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileAuthCard" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into pile_auth_card
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="logicCard != null">
        logic_card,
      </if>
      <if test="physicsCard != null">
        physics_card,
      </if>
      <if test="status != null">
        `status`,
      </if>
      <if test="secretKey != null">
        secret_key,
      </if>
      <if test="memberId != null">
        member_id,
      </if>
      <if test="merchantId != null">
        merchant_id,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createBy != null">
        create_by,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="updateBy != null">
        update_by,
      </if>
      <if test="delFlag != null">
        del_flag,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="logicCard != null">
        #{logicCard,jdbcType=VARCHAR},
      </if>
      <if test="physicsCard != null">
        #{physicsCard,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="secretKey != null">
        #{secretKey,jdbcType=VARCHAR},
      </if>
      <if test="memberId != null">
        #{memberId,jdbcType=VARCHAR},
      </if>
      <if test="merchantId != null">
        #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="delFlag != null">
        #{delFlag,jdbcType=VARCHAR},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="logicCard != null">
        logic_card = #{logicCard,jdbcType=VARCHAR},
      </if>
      <if test="physicsCard != null">
        physics_card = #{physicsCard,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        `status` = #{status,jdbcType=VARCHAR},
      </if>
      <if test="secretKey != null">
        secret_key = #{secretKey,jdbcType=VARCHAR},
      </if>
      <if test="memberId != null">
        member_id = #{memberId,jdbcType=VARCHAR},
      </if>
      <if test="merchantId != null">
        merchant_id = #{merchantId,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createBy != null">
        create_by = #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        update_by = #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="delFlag != null">
        del_flag = #{delFlag,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>

    <resultMap id="PileAuthCardResult" type="com.jsowell.pile.domain.PileAuthCard">
        <result column="id" property="id" />
        <result column="logic_card" property="logicCard" />
        <result column="physics_card" property="physicsCard" />
        <result column="status" property="status" />
        <result column="secret_key" property="secretKey" />
        <result column="member_id" property="memberId" />
        <result column="create_time" property="createTime" />
        <result column="create_by" property="createBy" />
        <result column="update_time" property="updateTime" />
        <result column="update_by" property="updateBy" />
        <result column="del_flag" property="delFlag" />
    </resultMap>

    <sql id="selectPileAuthCardVo">
        select id, logic_card, physics_card, status, secret_key, member_id, create_time, create_by, update_time, update_by, del_flag from pile_auth_card
    </sql>

    <select id="selectPileAuthCardList" parameterType="com.jsowell.pile.domain.PileAuthCard" resultMap="PileAuthCardResult">
        <include refid="selectPileAuthCardVo" />
        <where>
            <if test="logicCard != null  and logicCard != ''"> and logic_card = #{logicCard}</if>
            <if test="physicsCard != null  and physicsCard != ''"> and physics_card = #{physicsCard}</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
            <if test="secretKey != null  and secretKey != ''"> and secret_key = #{secretKey}</if>
            <if test="memberId != null  and memberId != ''"> and member_id = #{memberId}</if>
        </where>
    </select>

<!--    &lt;select id="selectPileAuthCardById" parameterType="Long" resultMap="PileAuthCardResult"&gt;-->
<!--        &lt;include refid="selectPileAuthCardVo"/&gt;-->
<!--        where id = #{id}-->
<!--    &lt;/select&gt;-->

    <select id="getCardInfoById" parameterType="Long" resultType="com.jsowell.pile.vo.web.PileAuthCardVO">
        select
            t1.id,
            t1.logic_card as logicCard,
            t1.physics_card as physicsCard,
            t1.status,
            t1.secret_key as secretKey,
            t1.merchant_id as merchantId,
            t1.create_time as createTime,
            t1.member_id as memberId,
            t2.mobile_number as phoneNumber,
            t2.nick_name as nickName
        from pile_auth_card t1
            left join member_basic_info t2 on t1.member_id = t2.member_id
        where t1.del_flag = '0'
        and t1.id = #{id}
    </select>


    <insert id="insertPileAuthCard" keyProperty="id" parameterType="com.jsowell.pile.domain.PileAuthCard" useGeneratedKeys="true">
        insert into pile_auth_card
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="logicCard != null">logic_card,</if>
            <if test="physicsCard != null">physics_card,</if>
            <if test="status != null">status,</if>
            <if test="secretKey != null">secret_key,</if>
            <if test="memberId != null">member_id,</if>
            <if test="createTime != null">create_time,</if>
            <if test="createBy != null">create_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="delFlag != null">del_flag,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="logicCard != null">#{logicCard},</if>
            <if test="physicsCard != null">#{physicsCard},</if>
            <if test="status != null">#{status},</if>
            <if test="secretKey != null">#{secretKey},</if>
            <if test="memberId != null">#{memberId},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="delFlag != null">#{delFlag},</if>
        </trim>
    </insert>

    <update id="updatePileAuthCard" parameterType="com.jsowell.pile.domain.PileAuthCard">
        update pile_auth_card
        <trim prefix="SET" suffixOverrides=",">
            <if test="logicCard != null">logic_card = #{logicCard},</if>
            <if test="physicsCard != null">physics_card = #{physicsCard},</if>
            <if test="status != null">status = #{status},</if>
            <if test="memberId != null">member_id = #{memberId},</if>
            <if test="secretKey != null">secret_key = #{secretKey},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deletePileAuthCardById" parameterType="Long">
        delete from pile_auth_card where id = #{id}
    </delete>

    <update id="deactivateCard" parameterType="Long">
        update pile_auth_card
        set status = '9'
        where id = #{id,jdbcType=BIGINT}
    </update>

    <delete id="deletePileAuthCardByIds" parameterType="String">
        delete from pile_auth_card where id in
        <foreach close=")" collection="array" item="id" open="(" separator=",">
            #{id}
        </foreach>
    </delete>

    <select id="selectPileAuthCardInfo" resultMap="PileAuthCardResult">
        select
        <include refid="Base_Column_List" />
        from pile_auth_card
        where del_flag = '0'
        <if test="memberId != null and memberId != ''">
            and member_id = #{memberId,jdbcType=VARCHAR}
        </if>
        <if test="physicsCard != null and physicsCard != ''">
            and physics_card = #{physicsCard,jdbcType=VARCHAR}
        </if>
        <if test="logicCard != null and logicCard != ''">
            and logic_card = #{logicCard,jdbcType=VARCHAR}
        </if>
        limit 1
    </select>

    <update id="unBindingCard">
        update pile_auth_card
            set status = '0', member_id = null
        where id = #{id,jdbcType=BIGINT}
    </update>

    <select id="selectSomeStatusCardInfo" resultMap="PileAuthCardResult">
        select
        <include refid="Base_Column_List" />
        from
            pile_auth_card
        where del_flag = '0'
        <if test="status != null and status != ''">
            and status = #{status,jdbcType=VARCHAR}
        </if>
        <if test="logicCard != null and logicCard != ''">
            and logic_card = #{logicCard,jdbcType=VARCHAR}
        </if>
            limit 1
    </select>

    <select id="getPileAuthCardInfoList" resultType="com.jsowell.pile.vo.web.PileAuthCardVO">
        select
            t1.id,
            t1.logic_card as logicCard,
            t1.physics_card as physicsCard,
            t1.status,
            t1.secret_key as secretKey,
            t1.create_time as createTime,
            t1.member_id as memberId,
            t1.merchant_id as merchantId,
            t2.mobile_number as phoneNumber,
            t2.nick_name as nickName
        from pile_auth_card t1
            left join member_basic_info t2 on t1.member_id = t2.member_id
        where t1.del_flag = '0'
        <if test="logicCard != null  and logicCard != ''"> and t1.logic_card = #{logicCard}</if>
        <if test="physicsCard != null  and physicsCard != ''"> and t1.physics_card = #{physicsCard}</if>
        <if test="status != null  and status != ''"> and t1.status = #{status}</if>
        <if test="phoneNumber != null and phoneNumber != ''"> and t2.mobile_number = #{phoneNumber}</if>
        <if test="memberId != null  and memberId != ''"> and t1.member_id = #{memberId}</if>
        <if test="merchantIdList != null and merchantIdList.size() != 0">
            and t1.merchant_id in
            <foreach close=")" collection="merchantIdList" item="merchantId" open="(" separator=",">
                #{merchantId,jdbcType=VARCHAR}
            </foreach>
        </if>
    </select>

  <select id="getAuthCardListByMemberId" resultType="com.jsowell.pile.vo.uniapp.customer.AuthCardVO">
    SELECT t1.member_id         AS memberId,
           t1.mobile_number     AS phoneNumber,
           t2.logic_card        AS logicCard,
           t2.status            as status,
           t2.create_time       AS createTime
    FROM member_basic_info t1
           JOIN pile_auth_card t2 ON t1.member_id = t2.member_id and t2.del_flag = '0'
    WHERE t1.del_flag = '0'
      AND t1.member_id = #{memberId,jdbcType=VARCHAR};
  </select>
</mapper>