summaryrefslogtreecommitdiff
path: root/src/main/resources/mapper/EndpointDao.xml
diff options
context:
space:
mode:
authortanghao <default@DESKTOP-7FEGRP2>2019-11-29 18:25:03 +0800
committertanghao <default@DESKTOP-7FEGRP2>2019-11-29 18:25:03 +0800
commit7f613afb92b399df0b3e808c59a744bc4ea304a5 (patch)
treefc9f46ad6f9e4e7040233e3cecfcd55cdfbc56c2 /src/main/resources/mapper/EndpointDao.xml
parent7d43f2c999e55c003fb1598a4621aaf9bcd05e67 (diff)
feat:confagent初始搭建版本HEADmaster
confagent初版
Diffstat (limited to 'src/main/resources/mapper/EndpointDao.xml')
-rw-r--r--src/main/resources/mapper/EndpointDao.xml39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/main/resources/mapper/EndpointDao.xml b/src/main/resources/mapper/EndpointDao.xml
new file mode 100644
index 0000000..fcd868f
--- /dev/null
+++ b/src/main/resources/mapper/EndpointDao.xml
@@ -0,0 +1,39 @@
+<?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.nis.dao.EndpointDao">
+ <resultMap type="com.nis.entity.Endpoint" id="endpoint">
+ <result property="id" column="id"/>
+ <result property="moduleId" column="module_id"/>
+ <result property="assetId" column="asset_id"/>
+ <result property="host" column="host"/>
+ <result property="port" column="port"/>
+ <result property="param" column="param"/>
+ <result property="path" column="path"/>
+
+ <association columnPrefix="m_" property="module" javaType="com.nis.entity.Module">
+ <id column="module_id" property="id"/>
+ <result column="name" property="name"/>
+ <result column="remark" property="remark"/>
+ <result column="project_id" property="projectId"/>
+ <result column="port" property="port"/>
+ <result column="param" property="param"/>
+ <result column="path" property="path"/>
+ </association>
+ </resultMap>
+
+ <select id="selectExporterInfos" resultMap="endpoint">
+ select e.*,
+ m.id AS m_module_id,
+ m.project_id AS m_project_id,
+ m.name AS m_name,
+ m.port AS m_port,
+ m.param AS m_param,
+ m.path AS m_path,
+ m.remark AS m_remark
+ from
+ endpoint e left join asset a on e.asset_id=a.id
+ left join module m on e.module_id = m.id
+ where a.idc_id=#{idcId}
+ </select>
+
+</mapper> \ No newline at end of file