| | |
| | | <mapper namespace="com.sandu.ximon.dao.mapper.InterphoneHostMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.InterphoneHost"> |
| | | <id property="hostId" column="host_id" jdbcType="INTEGER"/> |
| | | <result property="hostMac" column="host_mac" jdbcType="VARCHAR"/> |
| | | <result property="hostIp" column="host_ip" jdbcType="VARCHAR"/> |
| | | <result property="url" column="url" jdbcType="VARCHAR"/> |
| | | <result property="hostAddress" column="host_address" jdbcType="VARCHAR"/> |
| | | <result property="createtime" column="createtime" jdbcType="TIMESTAMP"/> |
| | | <result property="updatetime" column="updatetime" jdbcType="TIMESTAMP"/> |
| | | <result property="sipAddress" column="sip_address" jdbcType="VARCHAR"/> |
| | | <result property="sipPort" column="sip_port" jdbcType="VARCHAR"/> |
| | | <result property="sipName" column="sip_name" jdbcType="VARCHAR"/> |
| | | <result property="sipAuth" column="sip_auth" jdbcType="VARCHAR"/> |
| | | <result property="sipPassword" column="sip_password" jdbcType="VARCHAR"/> |
| | | <result property="proxyAddress" column="proxy_address" jdbcType="VARCHAR"/> |
| | | <result property="proxyPort" column="proxy_port" jdbcType="VARCHAR"/> |
| | | <result property="proxyUser" column="proxy_user" jdbcType="VARCHAR"/> |
| | | <result property="proxyPassword" column="proxy_password" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <id property="hostId" column="host_id" jdbcType="INTEGER"/> |
| | | <result property="hostMac" column="host_mac" jdbcType="VARCHAR"/> |
| | | <result property="hostIp" column="host_ip" jdbcType="VARCHAR"/> |
| | | <result property="url" column="url" jdbcType="VARCHAR"/> |
| | | <result property="hostAddress" column="host_address" jdbcType="VARCHAR"/> |
| | | <result property="sipAddress" column="sip_address" jdbcType="VARCHAR"/> |
| | | <result property="sipPort" column="sip_port" jdbcType="VARCHAR"/> |
| | | <result property="sipName" column="sip_name" jdbcType="VARCHAR"/> |
| | | <result property="sipAuth" column="sip_auth" jdbcType="VARCHAR"/> |
| | | <result property="sipPassword" column="sip_password" jdbcType="VARCHAR"/> |
| | | <result property="proxyAddress" column="proxy_address" jdbcType="VARCHAR"/> |
| | | <result property="proxyPort" column="proxy_port" jdbcType="VARCHAR"/> |
| | | <result property="proxyUser" column="proxy_user" jdbcType="VARCHAR"/> |
| | | <result property="proxyPassword" column="proxy_password" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | host_id,host_mac,host_ip, |
| | | url,host_address,createtime, |
| | | updatetime,sip_address,sip_port, |
| | | url,host_address, |
| | | sip_address,sip_port, |
| | | sip_name,sip_auth,sip_password, |
| | | proxy_address,proxy_port,proxy_user, |
| | | proxy_password,create_time,update_time |
| | | </sql> |
| | | <select id="getInterphoneHostList" resultType="com.sandu.ximon.dao.bo.InterphoneHostBo"> |
| | | SELECT |
| | | t1.*, t2.pole_id, |
| | | t3.pole_name |
| | | FROM |
| | | interphone_host t1 |
| | | LEFT JOIN pole_binding t2 ON t1.host_mac = t2.device_code |
| | | AND t2.device_type = 9 |
| | | LEFT JOIN pole t3 ON t3.id = t2.pole_id |
| | | |
| | | <where> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND(t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t3.pole_id LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.host_mac LIKE CONCAT(CONCAT('%', #{keyword}), '%')) |
| | | </if> |
| | | <if test="clientId != null"> |
| | | AND (t3.user_id = #{clientId} OR t3.client_id = #{clientId}) |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | </mapper> |