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.

SysConfigMapper.xml 4.5 kB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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 namespace="com.imitate.common.sys.mapper.SysConfigMapper">
  4. <resultMap id="BaseResultMap"
  5. type="com.imitate.common.sys.pojo.SysConfig">
  6. <id column="id" property="id" jdbcType="BIGINT" />
  7. <result column="name" property="name" jdbcType="VARCHAR" />
  8. <result column="val" property="val" jdbcType="VARCHAR" />
  9. <result column="expire_in" property="expireIn"
  10. jdbcType="INTEGER" />
  11. <result column="expire_time" property="expireTime"
  12. jdbcType="TIMESTAMP" />
  13. <result column="create_time" property="createTime"
  14. jdbcType="TIMESTAMP" />
  15. <result column="update_time" property="updateTime"
  16. jdbcType="TIMESTAMP" />
  17. <result column="status" property="status" jdbcType="CHAR" />
  18. </resultMap>
  19. <sql id="Base_Column_List">
  20. id, name, val, expire_in, expire_time, create_time,
  21. update_time, status
  22. </sql>
  23. <insert id="insert"
  24. parameterType="com.imitate.common.sys.pojo.SysConfig">
  25. insert into sys_config (id, name, val,
  26. expire_in,
  27. expire_time, create_time,
  28. update_time, status
  29. values
  30. (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
  31. #{val,jdbcType=VARCHAR},
  32. #{expireIn,jdbcType=INTEGER},
  33. #{expireTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
  34. #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=CHAR})
  35. </insert>
  36. <insert id="insertSelective"
  37. parameterType="com.imitate.common.sys.pojo.SysConfig">
  38. insert into sys_config
  39. <trim prefix="(" suffix=")" suffixOverrides=",">
  40. <if test="id != null">
  41. id,
  42. </if>
  43. <if test="name != null">
  44. name,
  45. </if>
  46. <if test="val != null">
  47. val,
  48. </if>
  49. <if test="expireIn != null">
  50. expire_in,
  51. </if>
  52. <if test="expireTime != null">
  53. expire_time,
  54. </if>
  55. <if test="createTime != null">
  56. create_time,
  57. </if>
  58. <if test="updateTime != null">
  59. update_time,
  60. </if>
  61. <if test="status != null">
  62. status,
  63. </if>
  64. </trim>
  65. <trim prefix="values (" suffix=")" suffixOverrides=",">
  66. <if test="id != null">
  67. #{id,jdbcType=BIGINT},
  68. </if>
  69. <if test="name != null">
  70. #{name,jdbcType=VARCHAR},
  71. </if>
  72. <if test="val != null">
  73. #{val,jdbcType=VARCHAR},
  74. </if>
  75. <if test="expireIn != null">
  76. #{expireIn,jdbcType=INTEGER},
  77. </if>
  78. <if test="expireTime != null">
  79. #{expireTime,jdbcType=TIMESTAMP},
  80. </if>
  81. <if test="createTime != null">
  82. #{createTime,jdbcType=TIMESTAMP},
  83. </if>
  84. <if test="updateTime != null">
  85. #{updateTime,jdbcType=TIMESTAMP},
  86. </if>
  87. <if test="status != null">
  88. #{status,jdbcType=CHAR},
  89. </if>
  90. </trim>
  91. </insert>
  92. <update id="updateByPrimaryKeySelective"
  93. parameterType="com.imitate.common.sys.pojo.SysConfig">
  94. update sys_config
  95. <set>
  96. <if test="name != null">
  97. name = #{name,jdbcType=VARCHAR},
  98. </if>
  99. <if test="val != null">
  100. val = #{val,jdbcType=VARCHAR},
  101. </if>
  102. <if test="expireIn != null">
  103. expire_in = #{expireIn,jdbcType=INTEGER},
  104. </if>
  105. <if test="expireTime != null">
  106. expire_time = #{expireTime,jdbcType=TIMESTAMP},
  107. </if>
  108. <if test="createTime != null">
  109. create_time = #{createTime,jdbcType=TIMESTAMP},
  110. </if>
  111. <if test="updateTime != null">
  112. update_time = #{updateTime,jdbcType=TIMESTAMP},
  113. </if>
  114. <if test="status != null">
  115. status = #{status,jdbcType=CHAR},
  116. </if>
  117. </set>
  118. where id = #{id,jdbcType=BIGINT}
  119. </update>
  120. <update id="updateByPrimaryKey"
  121. parameterType="com.imitate.common.sys.pojo.SysConfig">
  122. update sys_config
  123. set name = #{name,jdbcType=VARCHAR},
  124. val = #{val,jdbcType=VARCHAR},
  125. expire_in =
  126. #{expireIn,jdbcType=INTEGER},
  127. expire_time =
  128. #{expireTime,jdbcType=TIMESTAMP},
  129. create_time =
  130. #{createTime,jdbcType=TIMESTAMP},
  131. update_time =
  132. #{updateTime,jdbcType=TIMESTAMP},
  133. status = #{status,jdbcType=CHAR}
  134. where id = #{id,jdbcType=BIGINT}
  135. </update>
  136. <select id="selectSysConfigForUpdate" resultMap="BaseResultMap"
  137. parameterType="java.lang.String">
  138. select
  139. <include refid="Base_Column_List" />
  140. from sys_config
  141. where name = #{name,jdbcType=VARCHAR}
  142. for update
  143. </select>
  144. <select id="selectSysConfigByName" resultMap="BaseResultMap"
  145. parameterType="java.lang.String">
  146. select
  147. <include refid="Base_Column_List" />
  148. from sys_config
  149. where name = #{name,jdbcType=VARCHAR}
  150. </select>
  151. <select id="selectAllSysConfig" resultMap="BaseResultMap">
  152. select
  153. <include refid="Base_Column_List" />
  154. from sys_config
  155. </select>
  156. </mapper>

No Description