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

30 lines
1.3 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="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>