SysTaskMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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.practice.mapper.SysTaskMapper">
  4. <resultMap id="BaseResultMap" type="com.bowintek.practice.model.SysTask">
  5. <id column="TaskID" jdbcType="VARCHAR" property="taskID" />
  6. <result column="UserID" jdbcType="VARCHAR" property="userID" />
  7. <result column="Title" jdbcType="VARCHAR" property="title" />
  8. <result column="KeyID" jdbcType="VARCHAR" property="keyID" />
  9. <result column="Url" jdbcType="VARCHAR" property="url" />
  10. <result column="RecordStatus" jdbcType="INTEGER" property="recordStatus" />
  11. <result column="CreateBy" jdbcType="VARCHAR" property="createBy" />
  12. <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
  13. <result column="ReturnUrl" jdbcType="VARCHAR" property="returnUrl" />
  14. </resultMap>
  15. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.bowintek.practice.model.SysTask">
  16. <result column="Context" jdbcType="LONGVARCHAR" property="context" />
  17. </resultMap>
  18. <sql id="Example_Where_Clause">
  19. <where>
  20. <foreach collection="oredCriteria" item="criteria" separator="or">
  21. <if test="criteria.valid">
  22. <trim prefix="(" prefixOverrides="and" suffix=")">
  23. <foreach collection="criteria.criteria" item="criterion">
  24. <choose>
  25. <when test="criterion.noValue">
  26. and ${criterion.condition}
  27. </when>
  28. <when test="criterion.singleValue">
  29. and ${criterion.condition} #{criterion.value}
  30. </when>
  31. <when test="criterion.betweenValue">
  32. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  33. </when>
  34. <when test="criterion.listValue">
  35. and ${criterion.condition}
  36. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  37. #{listItem}
  38. </foreach>
  39. </when>
  40. </choose>
  41. </foreach>
  42. </trim>
  43. </if>
  44. </foreach>
  45. </where>
  46. </sql>
  47. <sql id="Update_By_Example_Where_Clause">
  48. <where>
  49. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  50. <if test="criteria.valid">
  51. <trim prefix="(" prefixOverrides="and" suffix=")">
  52. <foreach collection="criteria.criteria" item="criterion">
  53. <choose>
  54. <when test="criterion.noValue">
  55. and ${criterion.condition}
  56. </when>
  57. <when test="criterion.singleValue">
  58. and ${criterion.condition} #{criterion.value}
  59. </when>
  60. <when test="criterion.betweenValue">
  61. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  62. </when>
  63. <when test="criterion.listValue">
  64. and ${criterion.condition}
  65. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  66. #{listItem}
  67. </foreach>
  68. </when>
  69. </choose>
  70. </foreach>
  71. </trim>
  72. </if>
  73. </foreach>
  74. </where>
  75. </sql>
  76. <sql id="Base_Column_List">
  77. TaskID, UserID, Title, KeyID, Url, RecordStatus, CreateBy, CreateTime, ReturnUrl
  78. </sql>
  79. <sql id="Blob_Column_List">
  80. Context
  81. </sql>
  82. <select id="selectByExampleWithBLOBs" parameterType="com.bowintek.practice.model.SysTaskExample" resultMap="ResultMapWithBLOBs">
  83. select
  84. <if test="distinct">
  85. distinct
  86. </if>
  87. <include refid="Base_Column_List" />
  88. ,
  89. <include refid="Blob_Column_List" />
  90. from sys_task
  91. <if test="_parameter != null">
  92. <include refid="Example_Where_Clause" />
  93. </if>
  94. <if test="orderByClause != null">
  95. order by ${orderByClause}
  96. </if>
  97. </select>
  98. <select id="selectByExample" parameterType="com.bowintek.practice.model.SysTaskExample" resultMap="BaseResultMap">
  99. select
  100. <if test="distinct">
  101. distinct
  102. </if>
  103. <include refid="Base_Column_List" />
  104. from sys_task
  105. <if test="_parameter != null">
  106. <include refid="Example_Where_Clause" />
  107. </if>
  108. <if test="orderByClause != null">
  109. order by ${orderByClause}
  110. </if>
  111. </select>
  112. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
  113. select
  114. <include refid="Base_Column_List" />
  115. ,
  116. <include refid="Blob_Column_List" />
  117. from sys_task
  118. where TaskID = #{taskID,jdbcType=VARCHAR}
  119. </select>
  120. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  121. delete from sys_task
  122. where TaskID = #{taskID,jdbcType=VARCHAR}
  123. </delete>
  124. <delete id="deleteByExample" parameterType="com.bowintek.practice.model.SysTaskExample">
  125. delete from sys_task
  126. <if test="_parameter != null">
  127. <include refid="Example_Where_Clause" />
  128. </if>
  129. </delete>
  130. <insert id="insert" parameterType="com.bowintek.practice.model.SysTask">
  131. insert into sys_task (TaskID, UserID, Title,
  132. KeyID, Url, RecordStatus,
  133. CreateBy, CreateTime, ReturnUrl,
  134. Context)
  135. values (#{taskID,jdbcType=VARCHAR}, #{userID,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
  136. #{keyID,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{recordStatus,jdbcType=INTEGER},
  137. #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{returnUrl,jdbcType=VARCHAR},
  138. #{context,jdbcType=LONGVARCHAR})
  139. </insert>
  140. <insert id="insertSelective" parameterType="com.bowintek.practice.model.SysTask">
  141. insert into sys_task
  142. <trim prefix="(" suffix=")" suffixOverrides=",">
  143. <if test="taskID != null">
  144. TaskID,
  145. </if>
  146. <if test="userID != null">
  147. UserID,
  148. </if>
  149. <if test="title != null">
  150. Title,
  151. </if>
  152. <if test="keyID != null">
  153. KeyID,
  154. </if>
  155. <if test="url != null">
  156. Url,
  157. </if>
  158. <if test="recordStatus != null">
  159. RecordStatus,
  160. </if>
  161. <if test="createBy != null">
  162. CreateBy,
  163. </if>
  164. <if test="createTime != null">
  165. CreateTime,
  166. </if>
  167. <if test="returnUrl != null">
  168. ReturnUrl,
  169. </if>
  170. <if test="context != null">
  171. Context,
  172. </if>
  173. </trim>
  174. <trim prefix="values (" suffix=")" suffixOverrides=",">
  175. <if test="taskID != null">
  176. #{taskID,jdbcType=VARCHAR},
  177. </if>
  178. <if test="userID != null">
  179. #{userID,jdbcType=VARCHAR},
  180. </if>
  181. <if test="title != null">
  182. #{title,jdbcType=VARCHAR},
  183. </if>
  184. <if test="keyID != null">
  185. #{keyID,jdbcType=VARCHAR},
  186. </if>
  187. <if test="url != null">
  188. #{url,jdbcType=VARCHAR},
  189. </if>
  190. <if test="recordStatus != null">
  191. #{recordStatus,jdbcType=INTEGER},
  192. </if>
  193. <if test="createBy != null">
  194. #{createBy,jdbcType=VARCHAR},
  195. </if>
  196. <if test="createTime != null">
  197. #{createTime,jdbcType=TIMESTAMP},
  198. </if>
  199. <if test="returnUrl != null">
  200. #{returnUrl,jdbcType=VARCHAR},
  201. </if>
  202. <if test="context != null">
  203. #{context,jdbcType=LONGVARCHAR},
  204. </if>
  205. </trim>
  206. </insert>
  207. <select id="countByExample" parameterType="com.bowintek.practice.model.SysTaskExample" resultType="java.lang.Long">
  208. select count(*) from sys_task
  209. <if test="_parameter != null">
  210. <include refid="Example_Where_Clause" />
  211. </if>
  212. </select>
  213. <update id="updateByExampleSelective" parameterType="map">
  214. update sys_task
  215. <set>
  216. <if test="row.taskID != null">
  217. TaskID = #{row.taskID,jdbcType=VARCHAR},
  218. </if>
  219. <if test="row.userID != null">
  220. UserID = #{row.userID,jdbcType=VARCHAR},
  221. </if>
  222. <if test="row.title != null">
  223. Title = #{row.title,jdbcType=VARCHAR},
  224. </if>
  225. <if test="row.keyID != null">
  226. KeyID = #{row.keyID,jdbcType=VARCHAR},
  227. </if>
  228. <if test="row.url != null">
  229. Url = #{row.url,jdbcType=VARCHAR},
  230. </if>
  231. <if test="row.recordStatus != null">
  232. RecordStatus = #{row.recordStatus,jdbcType=INTEGER},
  233. </if>
  234. <if test="row.createBy != null">
  235. CreateBy = #{row.createBy,jdbcType=VARCHAR},
  236. </if>
  237. <if test="row.createTime != null">
  238. CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
  239. </if>
  240. <if test="row.returnUrl != null">
  241. ReturnUrl = #{row.returnUrl,jdbcType=VARCHAR},
  242. </if>
  243. <if test="row.context != null">
  244. Context = #{row.context,jdbcType=LONGVARCHAR},
  245. </if>
  246. </set>
  247. <if test="example != null">
  248. <include refid="Update_By_Example_Where_Clause" />
  249. </if>
  250. </update>
  251. <update id="updateByExampleWithBLOBs" parameterType="map">
  252. update sys_task
  253. set TaskID = #{row.taskID,jdbcType=VARCHAR},
  254. UserID = #{row.userID,jdbcType=VARCHAR},
  255. Title = #{row.title,jdbcType=VARCHAR},
  256. KeyID = #{row.keyID,jdbcType=VARCHAR},
  257. Url = #{row.url,jdbcType=VARCHAR},
  258. RecordStatus = #{row.recordStatus,jdbcType=INTEGER},
  259. CreateBy = #{row.createBy,jdbcType=VARCHAR},
  260. CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
  261. ReturnUrl = #{row.returnUrl,jdbcType=VARCHAR},
  262. Context = #{row.context,jdbcType=LONGVARCHAR}
  263. <if test="example != null">
  264. <include refid="Update_By_Example_Where_Clause" />
  265. </if>
  266. </update>
  267. <update id="updateByExample" parameterType="map">
  268. update sys_task
  269. set TaskID = #{row.taskID,jdbcType=VARCHAR},
  270. UserID = #{row.userID,jdbcType=VARCHAR},
  271. Title = #{row.title,jdbcType=VARCHAR},
  272. KeyID = #{row.keyID,jdbcType=VARCHAR},
  273. Url = #{row.url,jdbcType=VARCHAR},
  274. RecordStatus = #{row.recordStatus,jdbcType=INTEGER},
  275. CreateBy = #{row.createBy,jdbcType=VARCHAR},
  276. CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
  277. ReturnUrl = #{row.returnUrl,jdbcType=VARCHAR}
  278. <if test="example != null">
  279. <include refid="Update_By_Example_Where_Clause" />
  280. </if>
  281. </update>
  282. <update id="updateByPrimaryKeySelective" parameterType="com.bowintek.practice.model.SysTask">
  283. update sys_task
  284. <set>
  285. <if test="userID != null">
  286. UserID = #{userID,jdbcType=VARCHAR},
  287. </if>
  288. <if test="title != null">
  289. Title = #{title,jdbcType=VARCHAR},
  290. </if>
  291. <if test="keyID != null">
  292. KeyID = #{keyID,jdbcType=VARCHAR},
  293. </if>
  294. <if test="url != null">
  295. Url = #{url,jdbcType=VARCHAR},
  296. </if>
  297. <if test="recordStatus != null">
  298. RecordStatus = #{recordStatus,jdbcType=INTEGER},
  299. </if>
  300. <if test="createBy != null">
  301. CreateBy = #{createBy,jdbcType=VARCHAR},
  302. </if>
  303. <if test="createTime != null">
  304. CreateTime = #{createTime,jdbcType=TIMESTAMP},
  305. </if>
  306. <if test="returnUrl != null">
  307. ReturnUrl = #{returnUrl,jdbcType=VARCHAR},
  308. </if>
  309. <if test="context != null">
  310. Context = #{context,jdbcType=LONGVARCHAR},
  311. </if>
  312. </set>
  313. where TaskID = #{taskID,jdbcType=VARCHAR}
  314. </update>
  315. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.bowintek.practice.model.SysTask">
  316. update sys_task
  317. set UserID = #{userID,jdbcType=VARCHAR},
  318. Title = #{title,jdbcType=VARCHAR},
  319. KeyID = #{keyID,jdbcType=VARCHAR},
  320. Url = #{url,jdbcType=VARCHAR},
  321. RecordStatus = #{recordStatus,jdbcType=INTEGER},
  322. CreateBy = #{createBy,jdbcType=VARCHAR},
  323. CreateTime = #{createTime,jdbcType=TIMESTAMP},
  324. ReturnUrl = #{returnUrl,jdbcType=VARCHAR},
  325. Context = #{context,jdbcType=LONGVARCHAR}
  326. where TaskID = #{taskID,jdbcType=VARCHAR}
  327. </update>
  328. <update id="updateByPrimaryKey" parameterType="com.bowintek.practice.model.SysTask">
  329. update sys_task
  330. set UserID = #{userID,jdbcType=VARCHAR},
  331. Title = #{title,jdbcType=VARCHAR},
  332. KeyID = #{keyID,jdbcType=VARCHAR},
  333. Url = #{url,jdbcType=VARCHAR},
  334. RecordStatus = #{recordStatus,jdbcType=INTEGER},
  335. CreateBy = #{createBy,jdbcType=VARCHAR},
  336. CreateTime = #{createTime,jdbcType=TIMESTAMP},
  337. ReturnUrl = #{returnUrl,jdbcType=VARCHAR}
  338. where TaskID = #{taskID,jdbcType=VARCHAR}
  339. </update>
  340. </mapper>