<?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.restful.dao.SmsNumberDao">
    <update id="addVcodeTimes">
        update TL_VERIFICATION_CODE set times=4 where  ROWNO = ?
    </update>

    <update id="diabled" parameterType="string">
        update TL_VERIFICATION_CODE set status='1'  where  ROWNO = #{rowno}
    </update>


    <select id="checkVcode" resultType="com.chinacreator.video.restful.bean.SmsCheckBean" parameterType="string">
        select ROWNO,CPID,USERID,VERCODE,MAKETIME,SENDSTATUS,REMARK,CHANNEL,STATUS,TIMES FROM (select ROWNO,CPID,USERID,VERCODE,MAKETIME,SENDSTATUS,REMARK,CHANNEL,STATUS,TIMES FROM TL_VERIFICATION_CODE where  USERID= #{phone}  and channel is null and cpid = #{cpid}  and sysdate &lt;=(to_date(MAKETIME,'yyyy-mm-dd hh24:mi:ss')+5*(1/(24*60))) and status='0' order by MAKETIME desc ) where  rownum=1

    </select>
</mapper>