| | |
| | | <result column="monitor_point_id" jdbcType="INTEGER" property="monitorPointId" /> |
| | | <result column="device_version_id" jdbcType="INTEGER" property="deviceVersionId" /> |
| | | <association property="operateUser" javaType="com.moral.entity.OperateUser"> |
| | | <result column="id" property="id" jdbcType="INTEGER" /> |
| | | <result column="name" property="name" jdbcType="VARCHAR" /> |
| | | <result column="operate_user_id" property="id" jdbcType="INTEGER" /> |
| | | <result column="operate_user_name" property="name" jdbcType="VARCHAR" /> |
| | | </association> |
| | | <association property="deviceVersion" javaType="com.moral.entity.DeviceVersion"> |
| | | <result column="id" property="id" jdbcType="INTEGER" /> |
| | | <result column="version" property="version" jdbcType="INTEGER" /> |
| | | <result column="name" property="name" jdbcType="VARCHAR" /> |
| | | <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="monitorpointDetail" javaType="com.moral.entity.MonitorPoint"> |
| | | <result column="id" property="id" jdbcType="INTEGER" /> |
| | | <result column="name" property="name" jdbcType="VARCHAR" /> |
| | | <association property="monitorPoint" javaType="com.moral.entity.MonitorPoint"> |
| | | <result column="monitor_point_id" property="id" jdbcType="INTEGER" /> |
| | | <result column="monitor_point_name" property="name" jdbcType="VARCHAR" /> |
| | | </association> |
| | | </resultMap> |
| | | <sql id="Example_Where_Clause"> |
| | |
| | | </select> |
| | | <select id="selectWithOrgIdsByMac" parameterType="java.lang.String" resultMap="BaseResultWithOrgIdsMap"> |
| | | select |
| | | id,device_version_id,mac,monitor_point_id |
| | | from device |
| | | where mac = #{mac,jdbcType=VARCHAR} |
| | | dev.*, |
| | | mpt.name as monitor_point_name |
| | | from device dev |
| | | left join monitor_point mpt on dev.monitor_point_id = mpt.id |
| | | where dev.mac = #{mac,jdbcType=VARCHAR} |
| | | </select> |
| | | |
| | | <select id="getDeviceCountByRegion" resultType="java.lang.Integer"> |