<?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.xxfc.platform.activity.mapper.CouponMapper">

	<!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="com.xxfc.platform.activity.entity.Coupon" id="couponMap">
        <result property="id" column="id"/>
        <result property="title" column="title"/>
        <result property="icon" column="icon"/>
        <result property="used" column="used"/>
        <result property="channel" column="channel"/>
        <result property="userType" column="user_type"/>
        <result property="type" column="type"/>
        <result property="withSpecial" column="with_special"/>
        <result property="withSn" column="with_sn"/>
        <result property="withAmount" column="with_amount"/>
        <result property="usedAmount" column="used_amount"/>
        <result property="quota" column="quota"/>
        <result property="limitCollar" column="limit_collar"/>
        <result property="takeCount" column="take_count"/>
        <result property="usedCount" column="used_count"/>
        <result property="startTime" column="start_time"/>
        <result property="endTime" column="end_time"/>
        <result property="validType" column="valid_type"/>
        <result property="validStartTime" column="valid_start_time"/>
        <result property="validEndTime" column="valid_end_time"/>
        <result property="validDays" column="valid_days"/>
        <result property="status" column="status"/>
        <result property="url" column="url"/>
        <result property="crtUser" column="crt_user"/>
        <result property="crtName" column="crt_name"/>
        <result property="crtTime" column="crt_time"/>
        <result property="updUser" column="upd_user"/>
        <result property="updName" column="upd_name"/>
        <result property="updTime" column="upd_time"/>
        <result property="isDel" column="is_del"/>
    </resultMap>

    <select id="selectTitles" resultType="com.xxfc.platform.activity.vo.CouponTitleVo">
        select `id`,`title` from `coupon` where `is_del`=0
    </select>
</mapper>