SysApproveRecordMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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.bowintek.smartsearch.mapper.SysApproveRecordMapper">
  4. <resultMap id="BaseResultMap" type="com.bowintek.smartsearch.model.SysApproveRecord">
  5. <id column="ApproveRecordID" jdbcType="VARCHAR" property="approveRecordID" />
  6. <result column="TableName" jdbcType="VARCHAR" property="tableName" />
  7. <result column="KeyID" jdbcType="VARCHAR" property="keyID" />
  8. <result column="StatusDictionaryCode" jdbcType="VARCHAR" property="statusDictionaryCode" />
  9. <result column="StatusID" jdbcType="INTEGER" property="statusID" />
  10. <result column="ActionID" jdbcType="INTEGER" property="actionID" />
  11. <result column="Comment" jdbcType="VARCHAR" property="comment" />
  12. <result column="ApproveUserID" jdbcType="VARCHAR" property="approveUserID" />
  13. <result column="ApproveTime" jdbcType="TIMESTAMP" property="approveTime" />
  14. </resultMap>
  15. <sql id="Example_Where_Clause">
  16. <where>
  17. <foreach collection="oredCriteria" item="criteria" separator="or">
  18. <if test="criteria.valid">
  19. <trim prefix="(" prefixOverrides="and" suffix=")">
  20. <foreach collection="criteria.criteria" item="criterion">
  21. <choose>
  22. <when test="criterion.noValue">
  23. and ${criterion.condition}
  24. </when>
  25. <when test="criterion.singleValue">
  26. and ${criterion.condition} #{criterion.value}
  27. </when>
  28. <when test="criterion.betweenValue">
  29. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  30. </when>
  31. <when test="criterion.listValue">
  32. and ${criterion.condition}
  33. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  34. #{listItem}
  35. </foreach>
  36. </when>
  37. </choose>
  38. </foreach>
  39. </trim>
  40. </if>
  41. </foreach>
  42. </where>
  43. </sql>
  44. <sql id="Update_By_Example_Where_Clause">
  45. <where>
  46. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  47. <if test="criteria.valid">
  48. <trim prefix="(" prefixOverrides="and" suffix=")">
  49. <foreach collection="criteria.criteria" item="criterion">
  50. <choose>
  51. <when test="criterion.noValue">
  52. and ${criterion.condition}
  53. </when>
  54. <when test="criterion.singleValue">
  55. and ${criterion.condition} #{criterion.value}
  56. </when>
  57. <when test="criterion.betweenValue">
  58. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  59. </when>
  60. <when test="criterion.listValue">
  61. and ${criterion.condition}
  62. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  63. #{listItem}
  64. </foreach>
  65. </when>
  66. </choose>
  67. </foreach>
  68. </trim>
  69. </if>
  70. </foreach>
  71. </where>
  72. </sql>
  73. <sql id="Base_Column_List">
  74. ApproveRecordID, TableName, KeyID, StatusDictionaryCode, StatusID, ActionID, Comment,
  75. ApproveUserID, ApproveTime
  76. </sql>
  77. <select id="selectByExample" parameterType="com.bowintek.smartsearch.model.SysApproveRecordExample" resultMap="BaseResultMap">
  78. select
  79. <if test="distinct">
  80. distinct
  81. </if>
  82. <include refid="Base_Column_List" />
  83. from sys_approve_record
  84. <if test="_parameter != null">
  85. <include refid="Example_Where_Clause" />
  86. </if>
  87. <if test="orderByClause != null">
  88. order by ${orderByClause}
  89. </if>
  90. </select>
  91. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  92. select
  93. <include refid="Base_Column_List" />
  94. from sys_approve_record
  95. where ApproveRecordID = #{approveRecordID,jdbcType=VARCHAR}
  96. </select>
  97. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  98. delete from sys_approve_record
  99. where ApproveRecordID = #{approveRecordID,jdbcType=VARCHAR}
  100. </delete>
  101. <delete id="deleteByExample" parameterType="com.bowintek.smartsearch.model.SysApproveRecordExample">
  102. delete from sys_approve_record
  103. <if test="_parameter != null">
  104. <include refid="Example_Where_Clause" />
  105. </if>
  106. </delete>
  107. <insert id="insert" parameterType="com.bowintek.smartsearch.model.SysApproveRecord">
  108. insert into sys_approve_record (ApproveRecordID, TableName, KeyID,
  109. StatusDictionaryCode, StatusID, ActionID,
  110. Comment, ApproveUserID, ApproveTime
  111. )
  112. values (#{approveRecordID,jdbcType=VARCHAR}, #{tableName,jdbcType=VARCHAR}, #{keyID,jdbcType=VARCHAR},
  113. #{statusDictionaryCode,jdbcType=VARCHAR}, #{statusID,jdbcType=INTEGER}, #{actionID,jdbcType=INTEGER},
  114. #{comment,jdbcType=VARCHAR}, #{approveUserID,jdbcType=VARCHAR}, #{approveTime,jdbcType=TIMESTAMP}
  115. )
  116. </insert>
  117. <insert id="insertSelective" parameterType="com.bowintek.smartsearch.model.SysApproveRecord">
  118. insert into sys_approve_record
  119. <trim prefix="(" suffix=")" suffixOverrides=",">
  120. <if test="approveRecordID != null">
  121. ApproveRecordID,
  122. </if>
  123. <if test="tableName != null">
  124. TableName,
  125. </if>
  126. <if test="keyID != null">
  127. KeyID,
  128. </if>
  129. <if test="statusDictionaryCode != null">
  130. StatusDictionaryCode,
  131. </if>
  132. <if test="statusID != null">
  133. StatusID,
  134. </if>
  135. <if test="actionID != null">
  136. ActionID,
  137. </if>
  138. <if test="comment != null">
  139. Comment,
  140. </if>
  141. <if test="approveUserID != null">
  142. ApproveUserID,
  143. </if>
  144. <if test="approveTime != null">
  145. ApproveTime,
  146. </if>
  147. </trim>
  148. <trim prefix="values (" suffix=")" suffixOverrides=",">
  149. <if test="approveRecordID != null">
  150. #{approveRecordID,jdbcType=VARCHAR},
  151. </if>
  152. <if test="tableName != null">
  153. #{tableName,jdbcType=VARCHAR},
  154. </if>
  155. <if test="keyID != null">
  156. #{keyID,jdbcType=VARCHAR},
  157. </if>
  158. <if test="statusDictionaryCode != null">
  159. #{statusDictionaryCode,jdbcType=VARCHAR},
  160. </if>
  161. <if test="statusID != null">
  162. #{statusID,jdbcType=INTEGER},
  163. </if>
  164. <if test="actionID != null">
  165. #{actionID,jdbcType=INTEGER},
  166. </if>
  167. <if test="comment != null">
  168. #{comment,jdbcType=VARCHAR},
  169. </if>
  170. <if test="approveUserID != null">
  171. #{approveUserID,jdbcType=VARCHAR},
  172. </if>
  173. <if test="approveTime != null">
  174. #{approveTime,jdbcType=TIMESTAMP},
  175. </if>
  176. </trim>
  177. </insert>
  178. <select id="countByExample" parameterType="com.bowintek.smartsearch.model.SysApproveRecordExample" resultType="java.lang.Long">
  179. select count(*) from sys_approve_record
  180. <if test="_parameter != null">
  181. <include refid="Example_Where_Clause" />
  182. </if>
  183. </select>
  184. <update id="updateByExampleSelective" parameterType="map">
  185. update sys_approve_record
  186. <set>
  187. <if test="row.approveRecordID != null">
  188. ApproveRecordID = #{row.approveRecordID,jdbcType=VARCHAR},
  189. </if>
  190. <if test="row.tableName != null">
  191. TableName = #{row.tableName,jdbcType=VARCHAR},
  192. </if>
  193. <if test="row.keyID != null">
  194. KeyID = #{row.keyID,jdbcType=VARCHAR},
  195. </if>
  196. <if test="row.statusDictionaryCode != null">
  197. StatusDictionaryCode = #{row.statusDictionaryCode,jdbcType=VARCHAR},
  198. </if>
  199. <if test="row.statusID != null">
  200. StatusID = #{row.statusID,jdbcType=INTEGER},
  201. </if>
  202. <if test="row.actionID != null">
  203. ActionID = #{row.actionID,jdbcType=INTEGER},
  204. </if>
  205. <if test="row.comment != null">
  206. Comment = #{row.comment,jdbcType=VARCHAR},
  207. </if>
  208. <if test="row.approveUserID != null">
  209. ApproveUserID = #{row.approveUserID,jdbcType=VARCHAR},
  210. </if>
  211. <if test="row.approveTime != null">
  212. ApproveTime = #{row.approveTime,jdbcType=TIMESTAMP},
  213. </if>
  214. </set>
  215. <if test="example != null">
  216. <include refid="Update_By_Example_Where_Clause" />
  217. </if>
  218. </update>
  219. <update id="updateByExample" parameterType="map">
  220. update sys_approve_record
  221. set ApproveRecordID = #{row.approveRecordID,jdbcType=VARCHAR},
  222. TableName = #{row.tableName,jdbcType=VARCHAR},
  223. KeyID = #{row.keyID,jdbcType=VARCHAR},
  224. StatusDictionaryCode = #{row.statusDictionaryCode,jdbcType=VARCHAR},
  225. StatusID = #{row.statusID,jdbcType=INTEGER},
  226. ActionID = #{row.actionID,jdbcType=INTEGER},
  227. Comment = #{row.comment,jdbcType=VARCHAR},
  228. ApproveUserID = #{row.approveUserID,jdbcType=VARCHAR},
  229. ApproveTime = #{row.approveTime,jdbcType=TIMESTAMP}
  230. <if test="example != null">
  231. <include refid="Update_By_Example_Where_Clause" />
  232. </if>
  233. </update>
  234. <update id="updateByPrimaryKeySelective" parameterType="com.bowintek.smartsearch.model.SysApproveRecord">
  235. update sys_approve_record
  236. <set>
  237. <if test="tableName != null">
  238. TableName = #{tableName,jdbcType=VARCHAR},
  239. </if>
  240. <if test="keyID != null">
  241. KeyID = #{keyID,jdbcType=VARCHAR},
  242. </if>
  243. <if test="statusDictionaryCode != null">
  244. StatusDictionaryCode = #{statusDictionaryCode,jdbcType=VARCHAR},
  245. </if>
  246. <if test="statusID != null">
  247. StatusID = #{statusID,jdbcType=INTEGER},
  248. </if>
  249. <if test="actionID != null">
  250. ActionID = #{actionID,jdbcType=INTEGER},
  251. </if>
  252. <if test="comment != null">
  253. Comment = #{comment,jdbcType=VARCHAR},
  254. </if>
  255. <if test="approveUserID != null">
  256. ApproveUserID = #{approveUserID,jdbcType=VARCHAR},
  257. </if>
  258. <if test="approveTime != null">
  259. ApproveTime = #{approveTime,jdbcType=TIMESTAMP},
  260. </if>
  261. </set>
  262. where ApproveRecordID = #{approveRecordID,jdbcType=VARCHAR}
  263. </update>
  264. <update id="updateByPrimaryKey" parameterType="com.bowintek.smartsearch.model.SysApproveRecord">
  265. update sys_approve_record
  266. set TableName = #{tableName,jdbcType=VARCHAR},
  267. KeyID = #{keyID,jdbcType=VARCHAR},
  268. StatusDictionaryCode = #{statusDictionaryCode,jdbcType=VARCHAR},
  269. StatusID = #{statusID,jdbcType=INTEGER},
  270. ActionID = #{actionID,jdbcType=INTEGER},
  271. Comment = #{comment,jdbcType=VARCHAR},
  272. ApproveUserID = #{approveUserID,jdbcType=VARCHAR},
  273. ApproveTime = #{approveTime,jdbcType=TIMESTAMP}
  274. where ApproveRecordID = #{approveRecordID,jdbcType=VARCHAR}
  275. </update>
  276. </mapper>