yangys
2024-11-13 04d53749b21921c9bceebe120d170c2ee6e533af
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?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.qianwen.mdc.collect.mapper.iotdb.ProcessParamMapper">
 
    <resultMap id="BaseResultMap" type="com.qianwen.mdc.collect.entity.iotdb.ProcessParam">
      
        <result column="n" jdbcType="VARCHAR" property="n"/>
           <result column="v" jdbcType="VARCHAR" property="v"/>
           
           <result column="workstation_id" jdbcType="BIGINT" property="workstationId"/> <!-- -->
    </resultMap>
 
    <!-- n,v,workstation_id -->
    <select id="lastParamByWorstationId" resultType="com.qianwen.mdc.collect.entity.iotdb.ProcessParam">
            select  n as n,v as v,workstation_id as workstationId from root.f2.process_param_${workstationId}_* order by time desc limit 1 align by device
    </select>
 
</mapper>