| | |
| | | |
| | | <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.AirEquipment"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="belongTo" column="belong_to" jdbcType="VARCHAR"/> |
| | | <result property="equipmentState" column="equipment_state" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="userId" column="user_id" jdbcType="BIGINT"/> |
| | | <result property="lightPoleId" column="light_pole_id" jdbcType="VARCHAR"/> |
| | | <result property="mac" column="mac" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | |
| | | create_time,user_id,light_pole_id, |
| | | mac |
| | | </sql> |
| | | |
| | | <select id="listAirEquipment" resultType="com.sandu.ximon.dao.bo.AirEquipmentBo"> |
| | | SELECT |
| | | t1.*, t2.pole_id, |
| | | t3.pole_name |
| | | FROM |
| | | air_equipment t1 |
| | | LEFT JOIN pole_binding t2 ON t1.mac = t2.device_code |
| | | AND t2.device_type = 4 |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | ORDER BY |
| | | t1.id DESC |
| | | </select> |
| | | <select id="listAirEquipmentByKeyword" resultType="com.sandu.ximon.dao.bo.AirEquipmentBo"> |
| | | SELECT |
| | | t1.*, t2.pole_id, |
| | | t3.pole_name |
| | | FROM |
| | | air_equipment t1 |
| | | LEFT JOIN pole_binding t2 ON t1.mac = t2.device_code |
| | | AND t2.device_type = 4 |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | WHERE |
| | | t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | ORDER BY |
| | | t1.id DESC |
| | | |
| | | </select> |
| | | </mapper> |