| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yssh.dao.SuYuanMapper"> |
| | | |
| | | <resultMap id="SuYuan2dResult" type="com.yssh.entity.SuYuan2d"> |
| | | <result property="id" column="id" /> |
| | | <result property="x" column="x" /> |
| | |
| | | <result property="value" column="c" /> |
| | | <result property="time" column="time" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <select id="get2d" resultMap="SuYuan2dResult"> |
| | | SELECT id, x, y, c |
| | | FROM ${tableName} |
| | |
| | | order by c desc |
| | | limit 1; |
| | | </select> |
| | | |
| | | <select id="getSuYuanById" resultMap="DistanceSuYuanResult"> |
| | | select id, x, y, format(c, 2) "c", u, v |
| | | from ${tableName} |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="getAlarmsAnalyse" resultMap="SuYuan2dResult"> |
| | | SELECT id, x, y, c |