| | |
| | | <mapper namespace="com.sandu.ximon.dao.mapper.LightPoleHeelingEquipmentMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.LightPoleHeelingEquipment"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="mac" column="mac" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="mac" column="mac" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,mac,create_time |
| | | </sql> |
| | | <select id="LightPoleHeelingEquipmentList" resultType="com.sandu.ximon.dao.bo.LightPoleHeelingEquipmentBo"> |
| | | SELECT |
| | | t1.*, t2.pole_id, |
| | | t3.pole_name |
| | | FROM |
| | | light_pole_heeling_equipment t1 |
| | | LEFT JOIN pole_binding t2 ON t1.mac = t2.device_code |
| | | AND t2.device_type = 8 |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | <where> |
| | | <if test="clientId != null"> |
| | | AND (t3.user_id = #{userId} OR t3.client_id = #{userId}) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |