<?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.chinacreator.video.mapper.QueryFiveVipsDao" >
    <resultMap id="BaseResultMap" type="com.chinacreator.video.bean.ActivityBean" >
        <result column="id" property="id" jdbcType="VARCHAR" />
        <result column="userid" property="userid" jdbcType="VARCHAR" />
        <result column="cpid" property="cpid" jdbcType="VARCHAR" />
        <result column="spid" property="spid" jdbcType="VARCHAR" />
        <result column="orderchannel" property="orderchannel" jdbcType="VARCHAR" />
        <result column="cancelchannel" property="cancelchannel" jdbcType="VARCHAR" />
        <result column="orderstatus" property="orderstatus" jdbcType="VARCHAR" />
        <result column="vipstatus" property="vipstatus" jdbcType="VARCHAR" />
         <result column="ordertime" property="ordertime" jdbcType="DATE" />
         <result column="vipconstatus" property="vipconstatus" jdbcType="VARCHAR" />
         <result column="vipcontime" property="vipcontime" jdbcType="DATE" />
         <result column="viptime" property="viptime" jdbcType="DATE" />
        <result column="activeType" property="activeType" jdbcType="VARCHAR" />
        <result column="endtime" property="endtime" jdbcType="DATE" />
        <result column="canceltime" property="canceltime" jdbcType="DATE" />
        <result column="activetype" property="activeType" jdbcType="VARCHAR" />
        <result column="ischarge" property="ischarge" jdbcType="VARCHAR" />
        <result column="province" property="province" jdbcType="VARCHAR" />
        <result column="fhcpid" property="fhcpid" jdbcType="VARCHAR" />
        <result column="fhspid" property="fhspid" jdbcType="VARCHAR" />
        <result column="vipconflag" property="vipconflag" jdbcType="VARCHAR" />
    </resultMap>
    
    <sql id="Base_Column_List" >
        	province,to_char(viptime,'yyyymmddhh24miss') viptime,vipconstatus,to_char(vipcontime,'yyyymmddhh24miss') vipcontime,id,ischarge,userid,cpid,spid,to_char(canceltime,'yyyymmddhh24miss') canceltime,orderchannel,cancelchannel,orderstatus,vipstatus,to_char(ordertime,'yyyymmddhh24miss') ordertime,activetype,to_char(endtime,'yyyymmddhh24miss') endtime,vipconflag
    </sql>

    <select id="getActivityInfo" parameterType="string"  resultMap="BaseResultMap" >
       SELECT 
       <include refid="Base_Column_List" />
            from TD_BUSSINESS_HANDLE a where a.userid=#{userid} and cpid=#{cpid} and spid=#{spid} and activetype=#{activitytype}  and fhcpid is null and fhspid is null
    </select>

</mapper>