|
- <?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.imitate.common.sys.mapper.ClusterConfigMapper">
- <resultMap id="BaseResultMap" type="com.imitate.common.sys.pojo.ClusterConfig">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="local" jdbcType="BIT" property="local" />
- <result column="main_switch" jdbcType="VARCHAR" property="mainSwitch" />
- <result column="weight" jdbcType="DOUBLE" property="weight" />
- <result column="auto_scale" jdbcType="BIT" property="autoScale" />
- <result column="master_url" jdbcType="VARCHAR" property="masterUrl" />
- <result column="ca_cert_data" jdbcType="VARCHAR" property="caCertData" />
- <result column="client_cer_data" jdbcType="VARCHAR" property="clientCerData" />
- <result column="client_key_data" jdbcType="VARCHAR" property="clientKeyData" />
- <result column="username" jdbcType="VARCHAR" property="username" />
- <result column="password" jdbcType="VARCHAR" property="password" />
- <result column="kubeconfig" jdbcType="VARCHAR" property="kubeconfig" />
- <result column="local_web_socket" jdbcType="VARCHAR" property="localWebSocket" />
- <result column="local_ssh_nodes" jdbcType="VARCHAR" property="localSshNodes" />
- <result column="local_show_server" jdbcType="VARCHAR" property="localShowServer" />
- <result column="local_vnc_show_server" jdbcType="VARCHAR" property="localVncShowServer" />
- <result column="local_git_url" jdbcType="VARCHAR" property="localGitUrl" />
- <result column="remote_web_socket" jdbcType="VARCHAR" property="remoteWebSocket" />
- <result column="remote_ssh_nodes" jdbcType="VARCHAR" property="remoteSshNodes" />
- <result column="remote_show_server" jdbcType="VARCHAR" property="remoteShowServer" />
- <result column="remote_vnc_show_server" jdbcType="VARCHAR" property="remoteVncShowServer" />
- <result column="remote_git_url" jdbcType="VARCHAR" property="remoteGitUrl" />
- <result column="white_images" jdbcType="VARCHAR" property="whiteImages" />
- <result column="black_images" jdbcType="VARCHAR" property="blackImages" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- </resultMap>
- <sql id="Base_Column_List">
- id, name, local, main_switch, weight, auto_scale, master_url, ca_cert_data, client_cer_data, client_key_data, username, password,
- kubeconfig, local_web_socket, local_ssh_nodes, local_show_server, local_vnc_show_server,
- local_git_url, remote_web_socket, remote_ssh_nodes, remote_show_server, remote_vnc_show_server,
- remote_git_url, white_images, black_images, create_time, update_time
- </sql>
-
-
- <insert id="insert" parameterType="com.imitate.common.sys.pojo.ClusterConfig">
- insert into cluster_config (id, name, local, main_switch,
- weight, auto_scale, master_url, ca_cert_data, client_cer_data, client_key_data,
- username, password, kubeconfig,
- local_web_socket, local_ssh_nodes, local_show_server,
- local_vnc_show_server, local_git_url, remote_web_socket,
- remote_ssh_nodes, remote_show_server, remote_vnc_show_server,
- remote_git_url, white_images, black_images,
- create_time, update_time)
- values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{local,jdbcType=BIT}, #{mainSwitch,jdbcType=VARCHAR},
- #{weight,jdbcType=DOUBLE}, #{autoScale,jdbcType=BIT}, #{masterUrl,jdbcType=VARCHAR},
- #{caCertData,jdbcType=VARCHAR}, #{clientCerData,jdbcType=VARCHAR}, #{clientKeyData,jdbcType=VARCHAR},
- #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{kubeconfig,jdbcType=VARCHAR},
- #{localWebSocket,jdbcType=VARCHAR}, #{localSshNodes,jdbcType=VARCHAR}, #{localShowServer,jdbcType=VARCHAR},
- #{localVncShowServer,jdbcType=VARCHAR}, #{localGitUrl,jdbcType=VARCHAR}, #{remoteWebSocket,jdbcType=VARCHAR},
- #{remoteSshNodes,jdbcType=VARCHAR}, #{remoteShowServer,jdbcType=VARCHAR}, #{remoteVncShowServer,jdbcType=VARCHAR},
- #{remoteGitUrl,jdbcType=VARCHAR}, #{whiteImages,jdbcType=VARCHAR}, #{blackImages,jdbcType=VARCHAR},
- #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.imitate.common.sys.pojo.ClusterConfig">
- insert into cluster_config
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="name != null">
- name,
- </if>
- <if test="local != null">
- local,
- </if>
- <if test="mainSwitch != null">
- main_switch,
- </if>
- <if test="weight != null">
- weight,
- </if>
- <if test="autoScale != null">
- auto_scale,
- </if>
- <if test="masterUrl != null">
- master_url,
- </if>
- <if test="caCertData != null">
- ca_cert_data,
- </if>
- <if test="clientCerData != null">
- client_cer_data,
- </if>
- <if test="clientKeyData != null">
- client_key_data,
- </if>
- <if test="username != null">
- username,
- </if>
- <if test="password != null">
- password,
- </if>
- <if test="kubeconfig != null">
- kubeconfig,
- </if>
- <if test="localWebSocket != null">
- local_web_socket,
- </if>
- <if test="localSshNodes != null">
- local_ssh_nodes,
- </if>
- <if test="localShowServer != null">
- local_show_server,
- </if>
- <if test="localVncShowServer != null">
- local_vnc_show_server,
- </if>
- <if test="localGitUrl != null">
- local_git_url,
- </if>
- <if test="remoteWebSocket != null">
- remote_web_socket,
- </if>
- <if test="remoteSshNodes != null">
- remote_ssh_nodes,
- </if>
- <if test="remoteShowServer != null">
- remote_show_server,
- </if>
- <if test="remoteVncShowServer != null">
- remote_vnc_show_server,
- </if>
- <if test="remoteGitUrl != null">
- remote_git_url,
- </if>
- <if test="whiteImages != null">
- white_images,
- </if>
- <if test="blackImages != null">
- black_images,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="local != null">
- #{local,jdbcType=BIT},
- </if>
- <if test="mainSwitch != null">
- #{mainSwitch,jdbcType=VARCHAR},
- </if>
- <if test="weight != null">
- #{weight,jdbcType=DOUBLE},
- </if>
- <if test="autoScale != null">
- #{autoScale,jdbcType=BIT},
- </if>
- <if test="masterUrl != null">
- #{masterUrl,jdbcType=VARCHAR},
- </if>
- <if test="caCertData != null">
- #{caCertData,jdbcType=VARCHAR},
- </if>
- <if test="clientCerData != null">
- #{clientCerData,jdbcType=VARCHAR},
- </if>
- <if test="clientKeyData != null">
- #{clientKeyData,jdbcType=VARCHAR},
- </if>
- <if test="username != null">
- #{username,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- #{password,jdbcType=VARCHAR},
- </if>
- <if test="kubeconfig != null">
- #{kubeconfig,jdbcType=VARCHAR},
- </if>
- <if test="localWebSocket != null">
- #{localWebSocket,jdbcType=VARCHAR},
- </if>
- <if test="localSshNodes != null">
- #{localSshNodes,jdbcType=VARCHAR},
- </if>
- <if test="localShowServer != null">
- #{localShowServer,jdbcType=VARCHAR},
- </if>
- <if test="localVncShowServer != null">
- #{localVncShowServer,jdbcType=VARCHAR},
- </if>
- <if test="localGitUrl != null">
- #{localGitUrl,jdbcType=VARCHAR},
- </if>
- <if test="remoteWebSocket != null">
- #{remoteWebSocket,jdbcType=VARCHAR},
- </if>
- <if test="remoteSshNodes != null">
- #{remoteSshNodes,jdbcType=VARCHAR},
- </if>
- <if test="remoteShowServer != null">
- #{remoteShowServer,jdbcType=VARCHAR},
- </if>
- <if test="remoteVncShowServer != null">
- #{remoteVncShowServer,jdbcType=VARCHAR},
- </if>
- <if test="remoteGitUrl != null">
- #{remoteGitUrl,jdbcType=VARCHAR},
- </if>
- <if test="whiteImages != null">
- #{whiteImages,jdbcType=VARCHAR},
- </if>
- <if test="blackImages != null">
- #{blackImages,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.imitate.common.sys.pojo.ClusterConfig">
- update cluster_config
- <set>
- <if test="name != null">
- name = #{name,jdbcType=VARCHAR},
- </if>
- <if test="local != null">
- local = #{local,jdbcType=BIT},
- </if>
- <if test="mainSwitch != null">
- main_switch = #{mainSwitch,jdbcType=VARCHAR},
- </if>
- <if test="weight != null">
- weight = #{weight,jdbcType=DOUBLE},
- </if>
- <if test="autoScale != null">
- auto_scale = #{autoScale,jdbcType=BIT},
- </if>
- <if test="masterUrl != null">
- master_url = #{masterUrl,jdbcType=VARCHAR},
- </if>
- <if test="caCertData != null">
- ca_cert_data = #{caCertData,jdbcType=VARCHAR},
- </if>
- <if test="clientCerData != null">
- client_cer_data = #{clientCerData,jdbcType=VARCHAR},
- </if>
- <if test="clientKeyData != null">
- client_key_data = #{clientKeyData,jdbcType=VARCHAR},
- </if>
- <if test="username != null">
- username = #{username,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- password = #{password,jdbcType=VARCHAR},
- </if>
- <if test="kubeconfig != null">
- kubeconfig = #{kubeconfig,jdbcType=VARCHAR},
- </if>
- <if test="localWebSocket != null">
- local_web_socket = #{localWebSocket,jdbcType=VARCHAR},
- </if>
- <if test="localSshNodes != null">
- local_ssh_nodes = #{localSshNodes,jdbcType=VARCHAR},
- </if>
- <if test="localShowServer != null">
- local_show_server = #{localShowServer,jdbcType=VARCHAR},
- </if>
- <if test="localVncShowServer != null">
- local_vnc_show_server = #{localVncShowServer,jdbcType=VARCHAR},
- </if>
- <if test="localGitUrl != null">
- local_git_url = #{localGitUrl,jdbcType=VARCHAR},
- </if>
- <if test="remoteWebSocket != null">
- remote_web_socket = #{remoteWebSocket,jdbcType=VARCHAR},
- </if>
- <if test="remoteSshNodes != null">
- remote_ssh_nodes = #{remoteSshNodes,jdbcType=VARCHAR},
- </if>
- <if test="remoteShowServer != null">
- remote_show_server = #{remoteShowServer,jdbcType=VARCHAR},
- </if>
- <if test="remoteVncShowServer != null">
- remote_vnc_show_server = #{remoteVncShowServer,jdbcType=VARCHAR},
- </if>
- <if test="remoteGitUrl != null">
- remote_git_url = #{remoteGitUrl,jdbcType=VARCHAR},
- </if>
- <if test="whiteImages != null">
- white_images = #{whiteImages,jdbcType=VARCHAR},
- </if>
- <if test="blackImages != null">
- black_images = #{blackImages,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.imitate.common.sys.pojo.ClusterConfig">
- update cluster_config
- set name = #{name,jdbcType=VARCHAR},
- local = #{local,jdbcType=BIT},
- main_switch = #{mainSwitch,jdbcType=VARCHAR},
- weight = #{weight,jdbcType=DOUBLE},
- auto_scale = #{autoScale,jdbcType=BIT},
- master_url = #{masterUrl,jdbcType=VARCHAR},
- ca_cer_data = #{caCertData,jdbcType=VARCHAR},
- client_cer_data = #{clientCerData,jdbcType=VARCHAR},
- client_key_data = #{clientKeyData,jdbcType=VARCHAR},
- username = #{username,jdbcType=VARCHAR},
- password = #{password,jdbcType=VARCHAR},
- kubeconfig = #{kubeconfig,jdbcType=VARCHAR},
- local_web_socket = #{localWebSocket,jdbcType=VARCHAR},
- local_ssh_nodes = #{localSshNodes,jdbcType=VARCHAR},
- local_show_server = #{localShowServer,jdbcType=VARCHAR},
- local_vnc_show_server = #{localVncShowServer,jdbcType=VARCHAR},
- local_git_url = #{localGitUrl,jdbcType=VARCHAR},
- remote_web_socket = #{remoteWebSocket,jdbcType=VARCHAR},
- remote_ssh_nodes = #{remoteSshNodes,jdbcType=VARCHAR},
- remote_show_server = #{remoteShowServer,jdbcType=VARCHAR},
- remote_vnc_show_server = #{remoteVncShowServer,jdbcType=VARCHAR},
- remote_git_url = #{remoteGitUrl,jdbcType=VARCHAR},
- white_images = #{whiteImages,jdbcType=VARCHAR},
- black_images = #{blackImages,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- update_time = #{updateTime,jdbcType=TIMESTAMP}
- where id = #{id,jdbcType=BIGINT}
- </update>
-
- <select id="selectAll" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from cluster_config
- </select>
- </mapper>
|