<?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.xiaojukeji.know.streaming.km.persistence.mysql.KafkaUserDAO">
  <resultMap id="ClusterPhyMap"           type="com.xiaojukeji.know.streaming.km.common.bean.po.KafkaUserPO">
    <id column="id"                       property="id" />
    <result column="create_time"          property="createTime" />
    <result column="update_time"          property="updateTime" />

    <result column="cluster_phy_id"       property="clusterPhyId" />
    <result column="name"                 property="name" />
    <result column="token"                property="token" />
  </resultMap>

  <insert id="replace" parameterType="com.xiaojukeji.know.streaming.km.common.bean.po.KafkaUserPO">
    REPLACE ks_km_kafka_acl
        (cluster_phy_id, `name`, token, update_time)
        VALUES
        (#{clusterPhyId}, #{name}, #{token}, #{updateTime})
  </insert>
</mapper>