<?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.zhongzheng.modules.activity.mapper.ActivityAdvertisingMapper">

    <resultMap type="com.zhongzheng.modules.activity.domain.ActivityAdvertising" id="ActivityAdvertisingResult">
        <result property="id" column="id"/>
        <result property="adverUrl" column="adver_url"/>
        <result property="jumpUrl" column="jump_url"/>
        <result property="sourceUrl" column="source_url"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="startTime" column="start_time"/>
        <result property="endTime" column="end_time"/>
        <result property="remarks" column="remarks"/>
        <result property="reStatus" column="re_status"/>
        <result property="status" column="status"/>
        <result property="advName" column="adv_name"/>
    </resultMap>
    <resultMap type="com.zhongzheng.modules.activity.vo.ActivityAdvertisingVo" id="ActivityAdvertisingResultVo">
        <result property="id" column="id"/>
        <result property="adverUrl" column="adver_url"/>
        <result property="jumpUrl" column="jump_url"/>
        <result property="sourceUrl" column="source_url"/>
        <result property="startTime" column="start_time"/>
        <result property="endTime" column="end_time"/>
        <result property="remarks" column="remarks"/>
        <result property="reStatus" column="re_status"/>
        <result property="status" column="status"/>
        <result property="advName" column="adv_name"/>
    </resultMap>


    <select id="queryIssueList" parameterType="com.zhongzheng.modules.activity.bo.ActivityAdvertisingQueryBo" resultMap="ActivityAdvertisingResultVo">
        select * from activity_advertising WHERE 1=1 AND status =3
        <if test="startTime != null and startTime != ''">
            AND #{startTime} BETWEEN start_time AND end_time
        </if>
    </select>
</mapper>