|  |  |  | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | private String unitKey; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | private Integer maxValue; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | private Integer minValue; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | vo.setName(sensor.getName()); | 
|---|
|  |  |  | vo.setCode(sensor.getCode()); | 
|---|
|  |  |  | vo.setUnit(sensor.getUnit()); | 
|---|
|  |  |  | vo.setMaxValue(sensor.getMaxValue()); | 
|---|
|  |  |  | vo.setMinValue(sensor.getMinValue()); | 
|---|
|  |  |  | vo.getUnitKey(); | 
|---|
|  |  |  | return vo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String unitKey; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private Integer maxValue; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private Integer minValue; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | <result property="code" column="scode"></result> | 
|---|
|  |  |  | <result property="unitKey" column="dataKey"></result> | 
|---|
|  |  |  | <result property="unit" column="dataValue"></result> | 
|---|
|  |  |  | <result property="maxValue" column="max_value"></result> | 
|---|
|  |  |  | <result property="minValue" column="min_value"></result> | 
|---|
|  |  |  | </collection> | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="queryVersionsAndSensorUnitByIds" resultMap="VersionSensorUnitMap"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | v.`id`,v.`name`,v.`desc`,v.`create_time`,v.`update_time`,s.`id` AS sid,s.`code` as scode,s.`name` AS sname ,u.dataKey,u.dataValue | 
|---|
|  |  |  | v.`id`,v.`name`,v.`desc`,v.`create_time`,v.`update_time`,s.`id` AS sid,s.`code` as scode,s.`name` AS sname ,u.dataKey,u.dataValue,vsu.`max_value` ,vsu.`min_value` | 
|---|
|  |  |  | FROM | 
|---|
|  |  |  | `version` v | 
|---|
|  |  |  | JOIN | 
|---|