From 0723049b7785749898fede88452055a66c49770e Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Wed, 07 Feb 2018 11:50:51 +0800 Subject: [PATCH] 地图相关资源 --- src/main/resources/mapper/DeviceMapper.xml | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/DeviceMapper.xml b/src/main/resources/mapper/DeviceMapper.xml index 27f05e1..0098098 100644 --- a/src/main/resources/mapper/DeviceMapper.xml +++ b/src/main/resources/mapper/DeviceMapper.xml @@ -21,6 +21,7 @@ </association> <association property="deviceVersion" javaType="com.moral.entity.DeviceVersion"> <result column="device_version_id" property="id" jdbcType="INTEGER" /> + <result column="device_version_value" property="version" jdbcType="INTEGER" /> <result column="device_version_name" property="name" jdbcType="VARCHAR" /> </association> <association property="monitorPoint" javaType="com.moral.entity.MonitorPoint"> @@ -133,8 +134,9 @@ AND device_version_id = #{deviceVersionId} </select> <select id="selectByOrgIdAndDevName" resultMap="BaseResultMap"> - SELECT * from device dev + SELECT dev.*,dve.version as device_version_value from device dev left join monitor_point mpt on dev.monitor_point_id = mpt.id + left join device_version dve on dev.device_version_id = dve.id <where> <if test="@com.moral.common.bean.Constants@isNotSpecialOrgId(orgId)"> mpt.organization_id = #{orgId} @@ -145,8 +147,9 @@ </where> </select> <select id="selectByOrgIdAndMpId" resultMap="BaseResultMap"> - SELECT * from device dev + SELECT dev.*,dve.version as device_version_value from device dev left join monitor_point mpt on dev.monitor_point_id = mpt.id + left join device_version dve on dev.device_version_id = dve.id <where> <if test="@com.moral.common.bean.Constants@isNotSpecialOrgId(orgId)"> mpt.organization_id = #{orgId} -- Gitblit v1.8.0