<?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.huiju.estateagents.mapper.SysSmsTemplateMapper">

    <select id="getSysSmsTemplateByBizType" resultType="com.huiju.estateagents.entity.SysSmsTemplate">
        SELECT
            t.*
        FROM
            sys_sms_template t
        INNER JOIN sys_sms_event s ON t.template_code = s.template_code
        WHERE
            s.business_type = #{businessType}
        AND s.`status` = 1
    </select>
</mapper>
