<?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.lz.modules.app.dao.SmsSendLogDao">

	<!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="com.lz.modules.app.entity.SmsSendLogEntity" id="smsSendLogMap">
        <result property="id" column="id"/>
        <result property="isDelete" column="is_delete"/>
        <result property="content" column="content"/>
        <result property="phones" column="phones"/>
        <result property="remark" column="remark"/>
        <result property="sender" column="sender"/>
        <result property="status" column="status"/>
        <result property="templateId" column="template_id"/>
    </resultMap>

    <select id="getNoCerifyCode" resultType="java.lang.String">
        select count(1) from lz_sms_send_log where status=0 and gmt_create>=DATE_SUB(now(),INTERVAL 60 MINUTE) and phones=#{mobile};
        select lssl.* from lt_sms_send_log lssl,lt_sms_template lst where lssl.template_id=lst.id and lst.name='LT_LOGIN_VERIFICATION';


    </select>


    <!--    <select id="getInfoByStaffId" resultType="com.lz.modules.app.entity.SmsSendLogEntity">-->
<!--        select education,graduated_school,specialty,graduation_time from lz_staff_education where is_delete=0 and staff_id=#{staffId}-->
<!--    </select>-->


</mapper>
