<?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.CouponChannelMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.qs.mp.admin.domain.CouponChannel">
        <id column="id" property="id" />
        <result column="coupon_id" property="couponId" />
        <result column="channel_id" property="channelId" />
        <result column="created_time" property="createdTime" />
        <result column="updated_time" property="updatedTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, coupon_id, channel_id, created_time, updated_time
    </sql>

    <select id="listCouponChannelByQueryWrapper" resultType="com.qs.mp.channel.domain.Channel">
        select t2.*
        from mp_coupon_channel t1
         left join mp_channel t2 on t1.channel_id = t2.channel_id
        ${ew.customSqlSegment}
    </select>

</mapper>