<?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.yeejoin.amos.boot.module.jcs.api.mapper.ControllerLogMapper">

    <select id="selectToday" resultType="java.util.HashMap">
        SELECT
            a.sequence_nbr as sequenceNbr,
            a.state,
            DATE_FORMAT(a.execute_date, '%Y-%m-%d %H:%i:%s') as executeDate,
            b.station,
            b.type
        FROM
            jc_controller_log a
            LEFT JOIN jc_controller b ON a.controller_seq = b.sequence_nbr
        WHERE
            TO_DAYS( a.execute_date ) = TO_DAYS( NOW( ) )
        ORDER BY a.execute_date DESC
    </select>

</mapper>
