<?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.springblade.modules.warn.mapper.OutsideWarnTimeMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="entityResultMap" type="org.springblade.modules.warn.entity.OutsideWarnTimeEntity">
        <result column="business_id" property="warnId"/>
        <result column="ext_time" property="extTime"/>
    </resultMap>

    <!--SELECT_ZHSL_USER-->
    <select id="selectList" resultMap="entityResultMap">
            SELECT
            min( CASE WHEN SEND_TYPE = '1' THEN send_time END ) ext_time,
            business_id
            FROM
            SELECT_ZHSL_USER.st_message_send where BUSINESS_ID=#{dto.warnId}
            GROUP BY
            business_id
    </select>

</mapper>
