You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

PlatformConfigMapper.xml 3.1 kB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper
  4. namespace="com.imitate.common.k8s.mapper.PlatformConfigMapper">
  5. <resultMap id="BaseResultMap"
  6. type="com.imitate.common.k8s.pojo.PlatformConfig">
  7. <id column="id" property="id" jdbcType="BIGINT" />
  8. <result column="platform" property="platform"
  9. jdbcType="VARCHAR" />
  10. <result column="containers" property="containers"
  11. jdbcType="VARCHAR" />
  12. <result column="create_time" property="createTime"
  13. jdbcType="TIMESTAMP" />
  14. <result column="update_time" property="updateTime"
  15. jdbcType="TIMESTAMP" />
  16. <result column="script" property="script"
  17. jdbcType="LONGVARCHAR" />
  18. <result column="file_name_suffix" property="fileNameSuffix"
  19. jdbcType="VARCHAR" />
  20. </resultMap>
  21. <sql id="Base_Column_List">
  22. id, platform, containers, script, file_name_suffix, create_time, update_time
  23. </sql>
  24. <insert id="insertSelective"
  25. parameterType="com.imitate.common.k8s.pojo.PlatformConfig">
  26. insert into platform_config
  27. <trim prefix="(" suffix=")" suffixOverrides=",">
  28. <if test="id != null">
  29. id,
  30. </if>
  31. <if test="platform != null">
  32. platform,
  33. </if>
  34. <if test="containers != null">
  35. containers,
  36. </if>
  37. <if test="createTime != null">
  38. create_time,
  39. </if>
  40. <if test="updateTime != null">
  41. update_time,
  42. </if>
  43. <if test="script != null">
  44. script,
  45. </if>
  46. <if test="fileNameSuffix != null">
  47. file_name_suffix,
  48. </if>
  49. </trim>
  50. <trim prefix="values (" suffix=")" suffixOverrides=",">
  51. <if test="id != null">
  52. #{id,jdbcType=BIGINT},
  53. </if>
  54. <if test="platform != null">
  55. #{platform,jdbcType=VARCHAR},
  56. </if>
  57. <if test="containers != null">
  58. #{containers,jdbcType=VARCHAR},
  59. </if>
  60. <if test="createTime != null">
  61. #{createTime,jdbcType=TIMESTAMP},
  62. </if>
  63. <if test="updateTime != null">
  64. #{updateTime,jdbcType=TIMESTAMP},
  65. </if>
  66. <if test="script != null">
  67. #{script,jdbcType=LONGVARCHAR},
  68. </if>
  69. <if test="fileNameSuffix != null">
  70. #{fileNameSuffix,jdbcType=VARCHAR},
  71. </if>
  72. </trim>
  73. </insert>
  74. <update id="updateByPrimaryKeySelective"
  75. parameterType="com.imitate.common.k8s.pojo.PlatformConfig">
  76. update platform_config
  77. <set>
  78. <if test="platform != null">
  79. platform = #{platform,jdbcType=VARCHAR},
  80. </if>
  81. <if test="containers != null">
  82. containers = #{containers,jdbcType=VARCHAR},
  83. </if>
  84. <if test="createTime != null">
  85. create_time = #{createTime,jdbcType=TIMESTAMP},
  86. </if>
  87. <if test="updateTime != null">
  88. update_time = #{updateTime,jdbcType=TIMESTAMP},
  89. </if>
  90. <if test="script != null">
  91. script = #{script,jdbcType=LONGVARCHAR},
  92. </if>
  93. <if test="fileNameSuffix != null">
  94. file_name_suffix = #{fileNameSuffix,jdbcType=VARCHAR},
  95. </if>
  96. </set>
  97. where id = #{id,jdbcType=BIGINT}
  98. </update>
  99. <select id="selectAllConfig" resultMap="BaseResultMap">
  100. select
  101. <include refid="Base_Column_List" />
  102. from platform_config
  103. </select>
  104. </mapper>

No Description