朱俊杰
3 years ago
3 changed files with 29 additions and 37 deletions
@ -1,37 +0,0 @@ |
|||||
<?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.genersoft.iot.vmp.storager.dao.DeviceChannelMapper"> |
|
||||
|
|
||||
<!-- 通用查询映射结果 --> |
|
||||
<resultMap id="treeNodeResultMap" type="com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTreeNode"> |
|
||||
<id column="id" property="id"/> |
|
||||
<result column="parentId" property="parentId"/> |
|
||||
<result column="status" property="status"/> |
|
||||
<result column="title" property="title"/> |
|
||||
<result column="value" property="value"/> |
|
||||
<result column="key" property="key"/> |
|
||||
<result column="deviceId" property="deviceId"/> |
|
||||
<result column="channelId" property="channelId"/> |
|
||||
<result column="longitude" property="lng"/> |
|
||||
<result column="latitude" property="lat"/> |
|
||||
</resultMap> |
|
||||
|
|
||||
|
|
||||
<select id="tree" resultMap="treeNodeResultMap"> |
|
||||
SELECT |
|
||||
channelId, |
|
||||
channelId as id, |
|
||||
deviceId, |
|
||||
parentId, |
|
||||
status, |
|
||||
name as title, |
|
||||
channelId as "value", |
|
||||
channelId as "key", |
|
||||
channelId, |
|
||||
longitude, |
|
||||
latitude |
|
||||
from device_channel |
|
||||
where deviceId = #{deviceId} |
|
||||
</select> |
|
||||
|
|
||||
</mapper> |
|
Loading…
Reference in new issue