<?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.qs.mp.admin.mapper.GoodsCardMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.qs.mp.admin.domain.GoodsCard">
        <id column="id" property="id" />
        <result column="goods_id" property="goodsId" />
        <result column="card_no" property="cardNo" />
        <result column="card_pwd" property="cardPwd" />
        <result column="is_use" property="isUse" />
        <result column="is_deleted" property="isDeleted" />
        <result column="created_time" property="createdTime" />
        <result column="updated_time" property="updatedTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, goods_id, card_no, card_pwd, is_use, is_deleted, created_time, updated_time
    </sql>

    <select id="listDeliveryOrderItemCardByWrapper" resultMap="BaseResultMap">
        select t2.*
        from mp_user_deliver_order_item_card t1
         left join mp_goods_card t2 on t1.card_id = t2.id
        ${ew.customSqlSegment}
  </select>
</mapper>