|
- <?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.k8s.mapper.PlatformConfigMapper">
- <resultMap id="BaseResultMap"
- type="com.imitate.common.k8s.pojo.PlatformConfig">
- <id column="id" property="id" jdbcType="BIGINT" />
- <result column="platform" property="platform"
- jdbcType="VARCHAR" />
- <result column="containers" property="containers"
- jdbcType="VARCHAR" />
- <result column="create_time" property="createTime"
- jdbcType="TIMESTAMP" />
- <result column="update_time" property="updateTime"
- jdbcType="TIMESTAMP" />
- <result column="script" property="script"
- jdbcType="LONGVARCHAR" />
- <result column="file_name_suffix" property="fileNameSuffix"
- jdbcType="VARCHAR" />
- </resultMap>
-
- <sql id="Base_Column_List">
- id, platform, containers, script, file_name_suffix, create_time, update_time
- </sql>
-
- <insert id="insertSelective"
- parameterType="com.imitate.common.k8s.pojo.PlatformConfig">
- insert into platform_config
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="platform != null">
- platform,
- </if>
- <if test="containers != null">
- containers,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="script != null">
- script,
- </if>
- <if test="fileNameSuffix != null">
- file_name_suffix,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="platform != null">
- #{platform,jdbcType=VARCHAR},
- </if>
- <if test="containers != null">
- #{containers,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="script != null">
- #{script,jdbcType=LONGVARCHAR},
- </if>
- <if test="fileNameSuffix != null">
- #{fileNameSuffix,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
-
- <update id="updateByPrimaryKeySelective"
- parameterType="com.imitate.common.k8s.pojo.PlatformConfig">
- update platform_config
- <set>
- <if test="platform != null">
- platform = #{platform,jdbcType=VARCHAR},
- </if>
- <if test="containers != null">
- containers = #{containers,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="script != null">
- script = #{script,jdbcType=LONGVARCHAR},
- </if>
- <if test="fileNameSuffix != null">
- file_name_suffix = #{fileNameSuffix,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
-
- <select id="selectAllConfig" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from platform_config
- </select>
-
-
- </mapper>
|