增加Topic同步任务&Bug修复

This commit is contained in:
zengqiao
2021-01-16 16:26:38 +08:00
parent 3c091a88d4
commit d5680ffd5d
88 changed files with 2230 additions and 404 deletions

View File

@@ -45,4 +45,9 @@
<select id="listAfterTime" parameterType="java.util.Date" resultMap="AuthorityMap">
SELECT * FROM authority WHERE modify_time >= #{afterTime}
</select>
<delete id="deleteByTopic" parameterType="java.util.Map">
DELETE FROM authority WHERE cluster_id = #{clusterId} AND topic_name = #{topicName}
</delete>
</mapper>

View File

@@ -19,4 +19,38 @@
<select id="getByConfigTypeAndName" parameterType="java.util.Map" resultMap="GatewayConfigMap">
SELECT * FROM gateway_config WHERE `type`=#{configType} AND `name`=#{configName}
</select>
<select id="list" resultMap="GatewayConfigMap">
SELECT * FROM gateway_config
</select>
<insert id="insert" parameterType="com.xiaojukeji.kafka.manager.common.entity.pojo.gateway.GatewayConfigDO">
<![CDATA[
INSERT INTO gateway_config
(`type`, name, value, version)
VALUES
(#{type}, #{name}, #{value}, #{version})
]]>
</insert>
<delete id="deleteById" parameterType="java.lang.Long">
<![CDATA[
DELETE FROM gateway_config WHERE id=#{id}
]]>
</delete>
<update id="updateById" parameterType="com.xiaojukeji.kafka.manager.common.entity.pojo.gateway.GatewayConfigDO">
<![CDATA[
UPDATE gateway_config SET
`type`=#{type},
`name`=#{name},
`value`=#{value},
`version`=#{version}
WHERE id=#{id}
]]>
</update>
<select id="getById" parameterType="java.lang.Long" resultMap="GatewayConfigMap">
SELECT * FROM gateway_config WHERE id=#{id}
</select>
</mapper>

View File

@@ -1,28 +0,0 @@
<?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="DeprecatedKafkaAclDao">
<resultMap id="DeprecatedKafkaAclMap" type="com.xiaojukeji.kafka.manager.common.entity.pojo.gateway.DeprecatedKafkaAclDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="cluster_id" jdbcType="BIGINT" property="clusterId" />
<result column="topic_name" jdbcType="VARCHAR" property="topicName" />
<result column="access" jdbcType="INTEGER" property="access" />
<result column="operation" jdbcType="INTEGER" property="operation" />
<result column="gm_create" jdbcType="TIMESTAMP" property="gmCreate" />
<result column="gm_modify" jdbcType="TIMESTAMP" property="gmModify" />
</resultMap>
<insert id="insert"
parameterType="com.xiaojukeji.kafka.manager.common.entity.pojo.gateway.DeprecatedKafkaAclDO"
useGeneratedKeys="true"
keyProperty="id">
INSERT INTO kafka_acl
(cluster_id, topic_name, user_name, access, operation, gm_create, gm_modify)
VALUES
(#{clusterId}, #{topicName}, #{userName}, #{access}, #{operation}, #{gmCreate}, #{gmModify})
</insert>
<select id="listAll" resultMap="DeprecatedKafkaAclMap">
SELECT * FROM kafka_acl ORDER BY gm_create ASC
</select>
</mapper>

View File

@@ -1,29 +0,0 @@
<?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="DeprecatedKafkaUserDao">
<resultMap id="DeprecatedKafkaUserDOMap" type="com.xiaojukeji.kafka.manager.common.entity.pojo.gateway.DeprecatedKafkaUserDO">
<id property="id" column="id"/>
<result property="name" column="name"/>
<result property="password" column="password"/>
<result property="userType" column="user_type"/>
<result property="operation" column="operation"/>
<result property="gmtCreate" column="gm_create"/>
<result property="gmtModify" column="gm_modify"/>
</resultMap>
<insert id="insert"
parameterType="com.xiaojukeji.kafka.manager.common.entity.pojo.gateway.DeprecatedKafkaUserDO"
useGeneratedKeys="true"
keyProperty="id">
INSERT INTO kafka_user
(`name`, password, user_type, operation, gm_create, gm_modify)
VALUES
(#{name}, #{password}, #{userType}, #{operation}, #{gmtCreate}, #{gmtModify})
</insert>
<select id="listAll" resultMap="DeprecatedKafkaUserDOMap">
SELECT * FROM kafka_user
</select>
</mapper>