kafka-manager 2.0

This commit is contained in:
zengqiao
2020-09-28 15:46:34 +08:00
parent 28d985aaf1
commit c6e4b60424
1253 changed files with 82183 additions and 37179 deletions

View File

@@ -0,0 +1,53 @@
<?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="TopicConnectionDao">
<resultMap id="TopicConnectionMap" type="com.xiaojukeji.kafka.manager.common.entity.pojo.gateway.TopicConnectionDO">
<id property="id" column="id"/>
<result property="clusterId" column="cluster_id"/>
<result property="topicName" column="topic_name"/>
<result property="type" column="type"/>
<result property="appId" column="app_id"/>
<result property="ip" column="ip"/>
<result property="clientVersion" column="client_version"/>
<result property="createTime" column="create_time"/>
</resultMap>
<insert id="replace" parameterType="com.xiaojukeji.kafka.manager.common.entity.pojo.gateway.TopicConnectionDO">
REPLACE INTO topic_connections (
cluster_id,
topic_name,
`type`,
app_id,
ip,
client_version,
create_time
)
VALUES (
#{clusterId},
#{topicName},
#{type},
#{appId},
#{ip},
#{clientVersion},
#{createTime}
)
</insert>
<select id="getByTopicName" parameterType="java.util.Map" resultMap="TopicConnectionMap">
<![CDATA[
SELECT * FROM topic_connections
WHERE cluster_id = #{clusterId}
AND topic_name = #{topicName}
AND create_time >= #{startTime} AND #{endTime} >= create_time
]]>
</select>
<select id="getByAppId" parameterType="java.util.Map" resultMap="TopicConnectionMap">
<![CDATA[
SELECT * FROM topic_connections
WHERE app_id = #{appId}
AND create_time >= #{startTime} AND #{endTime} >= create_time
]]>
</select>
</mapper>