<?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.ruoyi.base.mapper.BaseCouponMapper">
    
    <resultMap type="BaseCoupon" id="BaseCouponResult">
        <result property="id"    column="id"    />
        <result property="couponNum"    column="coupon_num"    />
        <result property="price"    column="price"    />
        <result property="isShow"    column="is_show"    />
        <result property="creator"    column="creator"    />
        <result property="createTime"    column="create_time"    />
        <result property="updater"    column="updater"    />
        <result property="updateTime"    column="update_time"    />
        <result property="delFlag"    column="del_flag"    />
    </resultMap>

    <sql id="selectBaseCouponVo">
        select id, coupon_num, price, is_show, creator, create_time, updater, update_time, del_flag from dl_base_coupon
    </sql>

    <select id="queryListPage" parameterType="BaseCoupon" resultMap="BaseCouponResult">
        <include refid="selectBaseCouponVo"/>
        <where>
                        <if test="entity.isShow != null "> and is_show = #{entity.isShow}</if>
        </where>
    </select>
</mapper>