<?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.zksy.base.warning.mapper.WarningDisposalMapper">

    <select id="selectDisposalList" resultType="java.util.Map">
        SELECT
            d.*,
            CASE d.disposal_type
                WHEN 'UPGRADE' THEN '预警升级'
                WHEN 'DOWNGRADE' THEN '预警降级'
                WHEN 'RESOLVE' THEN '解除预警'
                WHEN 'RETURN' THEN '退回重办'
                WHEN 'SUPERVISION' THEN '预警督办'
                WHEN 'INSTRUCTION' THEN '领导批示'
                ELSE d.disposal_type
            END AS disposalTypeName
        FROM warning_disposal d
        WHERE d.warning_id = #{warningId}
        ORDER BY d.create_time DESC
    </select>

</mapper>
