| | |
| | | </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"> |
| | |
| | | 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} |
| | |
| | | </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} |