<?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.huimv.env.admin.mapper.HeartInfoMapper">

    <select id="listHeart" resultType="com.huimv.env.admin.entity.dto.HeartDto">
        SELECT max(create_time) createTime,terminal_code terminalCode from heart_info GROUP BY terminal_code
    </select>

    <select id="listHeartGateway" resultType="com.huimv.env.admin.entity.dto.HeartDto">
        SELECT max(create_time) createTime,gatway_code terminalCode from heart_info GROUP BY gatway_code
    </select>
</mapper>
