37 lines
1.8 KiB
XML
37 lines
1.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.das.modules.node.mapper.SysCommunicationLinkMapper">
|
|
|
|
<resultMap type="com.das.modules.node.domain.vo.SysCommunicationLinkVo" id="SysCommunicationLinkMap">
|
|
<result property="id" column="id" jdbcType="BIGINT"/>
|
|
<result property="linkName" column="link_name" jdbcType="VARCHAR"/>
|
|
<result property="protocol" column="protocol" jdbcType="INTEGER"/>
|
|
<result property="params" column="params" jdbcType="VARCHAR"/>
|
|
<result property="nodeId" column="node_id" jdbcType="BIGINT"/>
|
|
<result property="nodeName" column="nodeName" jdbcType="VARCHAR"/>
|
|
<result property="revision" column="revision" jdbcType="INTEGER"/>
|
|
</resultMap>
|
|
|
|
<select id="querySysCommunicationLinkList" resultMap="SysCommunicationLinkMap">
|
|
select sc.*, sn.node_name as nodeName from sys_communicationlink sc left join sys_node sn on sc.node_id = sn.id
|
|
<where>
|
|
<if test="info.nodeId != null and info.nodeId != ''">
|
|
and sc.node_id = #{info.nodeId}
|
|
</if>
|
|
<if test="info.linkName != null and info.linkName != ''">
|
|
and sc.link_name like concat('%',#{info.linkName},'%')
|
|
</if>
|
|
</where>
|
|
order by sc.link_name
|
|
</select>
|
|
|
|
<select id="querySysCommunicationLinkCount" resultType="java.lang.Long">
|
|
select count(1) from sys_communicationlink sc where sc.node_id = #{nodeId}
|
|
</select>
|
|
|
|
<select id="querySysCommunicationLink" resultType="com.das.modules.node.domain.vo.SysCommunicationLinkVo">
|
|
select sc.id,sc.link_name,sc.protocol,sc.params from sys_communicationlink sc where sc.node_id = #{nodeId}
|
|
</select>
|
|
|
|
</mapper>
|