<?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="org.dromara.zjk.mapper.ZjkSmsInfoMapper">

    <resultMap id="BaseResultMap" type="org.dromara.zjk.domain.ZjkSmsInfo">
        <id property="id" column="ID" jdbcType="OTHER"/>
        <result property="sendStatus" column="send_status" jdbcType="OTHER"/>
        <result property="templateId" column="template_id" jdbcType="VARCHAR"/>
        <result property="smsContent" column="sms_content" jdbcType="VARCHAR"/>
        <result property="sendNum" column="send_num" jdbcType="OTHER"/>
        <result property="statusId" column="status_id" jdbcType="VARCHAR"/>
        <result property="returnMsg" column="return_msg" jdbcType="VARCHAR"/>
        <result property="returnCode" column="return_code" jdbcType="VARCHAR"/>
        <result property="batchNum" column="batch_num" jdbcType="OTHER"/>
        <result property="batchType" column="batch_type" jdbcType="OTHER"/>
        <result property="receiveUserId" column="receive_user_id" jdbcType="OTHER"/>
        <result property="createDept" column="create_dept" jdbcType="VARCHAR"/>
        <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/>
        <result property="createBy" column="CREATE_BY" jdbcType="OTHER"/>
        <result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
        <result property="updateBy" column="UPDATE_BY" jdbcType="OTHER"/>
        <result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
        <result property="paramJson" column="param_json" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        ID,send_status,template_id,
        sms_content,send_num,status_id,
        return_msg,return_code,batch_num,
        batch_type,receive_user_id,create_dept,
        tenant_id,CREATE_BY,CREATE_TIME,
        UPDATE_BY,UPDATE_TIME,param_json
    </sql>
    <select id="selectSmsByBatchAndTel" resultType="org.dromara.zjk.domain.ZjkSmsInfo">
        select *
        from zjk_sms_info
        where batch_num = #{batchNum}
          and receive_phone = #{tel}
    </select>
</mapper>
