Files
KnowStreaming/kafka-manager-dao/src/main/resources/mapper/gateway/DeprecatedKafkaAclDao.xml
2020-09-28 15:46:34 +08:00

28 lines
1.5 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="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>