FlowMainMapper.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  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.idea.oa.flow2.mapper.FlowMainMapper">
  4. <resultMap id="BaseResultMap" type="com.idea.oa.flow2.model.FlowMain">
  5. <id column="id" jdbcType="VARCHAR" property="id" />
  6. <result column="apply_theme" jdbcType="VARCHAR" property="applyTheme" />
  7. <result column="form_id" jdbcType="VARCHAR" property="formId" />
  8. <result column="apply_user" jdbcType="VARCHAR" property="applyUser" />
  9. <result column="dept_id" jdbcType="VARCHAR" property="deptId" />
  10. <result column="flow_result" jdbcType="INTEGER" property="flowResult" />
  11. <result column="flow_status" jdbcType="INTEGER" property="flowStatus" />
  12. <result column="cc_list" jdbcType="VARCHAR" property="ccList" />
  13. <result column="flow_name" jdbcType="VARCHAR" property="flowName" />
  14. <result column="flow_type" jdbcType="VARCHAR" property="flowType" />
  15. <result column="flow_post" jdbcType="VARCHAR" property="flowPost" />
  16. <result column="flow_id" jdbcType="VARCHAR" property="flowId" />
  17. <result column="task_id" jdbcType="VARCHAR" property="taskId" />
  18. <result column="return_status" jdbcType="INTEGER" property="returnStatus" />
  19. <result column="last_main_log_id" jdbcType="VARCHAR" property="lastMainLogId" />
  20. <result column="condition_map" jdbcType="VARCHAR" property="conditionMap" />
  21. <result column="status" jdbcType="INTEGER" property="status" />
  22. <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
  23. <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
  24. <result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
  25. <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
  26. <result column="group_id" jdbcType="VARCHAR" property="groupId" />
  27. <result column="remark" jdbcType="VARCHAR" property="remark" />
  28. </resultMap>
  29. <sql id="Example_Where_Clause">
  30. <where>
  31. <foreach collection="oredCriteria" item="criteria" separator="or">
  32. <if test="criteria.valid">
  33. <trim prefix="(" prefixOverrides="and" suffix=")">
  34. <foreach collection="criteria.criteria" item="criterion">
  35. <choose>
  36. <when test="criterion.noValue">
  37. and ${criterion.condition}
  38. </when>
  39. <when test="criterion.singleValue">
  40. and ${criterion.condition} #{criterion.value}
  41. </when>
  42. <when test="criterion.betweenValue">
  43. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  44. </when>
  45. <when test="criterion.listValue">
  46. and ${criterion.condition}
  47. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  48. #{listItem}
  49. </foreach>
  50. </when>
  51. </choose>
  52. </foreach>
  53. </trim>
  54. </if>
  55. </foreach>
  56. </where>
  57. </sql>
  58. <sql id="Update_By_Example_Where_Clause">
  59. <where>
  60. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  61. <if test="criteria.valid">
  62. <trim prefix="(" prefixOverrides="and" suffix=")">
  63. <foreach collection="criteria.criteria" item="criterion">
  64. <choose>
  65. <when test="criterion.noValue">
  66. and ${criterion.condition}
  67. </when>
  68. <when test="criterion.singleValue">
  69. and ${criterion.condition} #{criterion.value}
  70. </when>
  71. <when test="criterion.betweenValue">
  72. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  73. </when>
  74. <when test="criterion.listValue">
  75. and ${criterion.condition}
  76. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  77. #{listItem}
  78. </foreach>
  79. </when>
  80. </choose>
  81. </foreach>
  82. </trim>
  83. </if>
  84. </foreach>
  85. </where>
  86. </sql>
  87. <sql id="Base_Column_List">
  88. id, apply_theme, form_id, apply_user, dept_id, flow_result, flow_status, cc_list,
  89. flow_name, flow_type, flow_post, flow_id, task_id, return_status, last_main_log_id,
  90. condition_map, status, created_by, created_at, updated_by, updated_at, group_id,
  91. remark
  92. </sql>
  93. <select id="selectByExample" parameterType="com.idea.oa.flow2.model.FlowMainExample" resultMap="BaseResultMap">
  94. select
  95. <if test="distinct">
  96. distinct
  97. </if>
  98. <include refid="Base_Column_List" />
  99. from flow_main
  100. <if test="_parameter != null">
  101. <include refid="Example_Where_Clause" />
  102. </if>
  103. <if test="orderByClause != null">
  104. order by ${orderByClause}
  105. </if>
  106. </select>
  107. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  108. select
  109. <include refid="Base_Column_List" />
  110. from flow_main
  111. where id = #{id,jdbcType=VARCHAR}
  112. </select>
  113. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  114. delete from flow_main
  115. where id = #{id,jdbcType=VARCHAR}
  116. </delete>
  117. <delete id="deleteByExample" parameterType="com.idea.oa.flow2.model.FlowMainExample">
  118. delete from flow_main
  119. <if test="_parameter != null">
  120. <include refid="Example_Where_Clause" />
  121. </if>
  122. </delete>
  123. <insert id="insert" parameterType="com.idea.oa.flow2.model.FlowMain">
  124. insert into flow_main (id, apply_theme, form_id,
  125. apply_user, dept_id, flow_result,
  126. flow_status, cc_list, flow_name,
  127. flow_type, flow_post, flow_id,
  128. task_id, return_status, last_main_log_id,
  129. condition_map, status, created_by,
  130. created_at, updated_by, updated_at,
  131. group_id, remark)
  132. values (#{id,jdbcType=VARCHAR}, #{applyTheme,jdbcType=VARCHAR}, #{formId,jdbcType=VARCHAR},
  133. #{applyUser,jdbcType=VARCHAR}, #{deptId,jdbcType=VARCHAR}, #{flowResult,jdbcType=INTEGER},
  134. #{flowStatus,jdbcType=INTEGER}, #{ccList,jdbcType=VARCHAR}, #{flowName,jdbcType=VARCHAR},
  135. #{flowType,jdbcType=VARCHAR}, #{flowPost,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR},
  136. #{taskId,jdbcType=VARCHAR}, #{returnStatus,jdbcType=INTEGER}, #{lastMainLogId,jdbcType=VARCHAR},
  137. #{conditionMap,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createdBy,jdbcType=VARCHAR},
  138. #{createdAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
  139. #{groupId,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
  140. </insert>
  141. <insert id="insertSelective" parameterType="com.idea.oa.flow2.model.FlowMain">
  142. insert into flow_main
  143. <trim prefix="(" suffix=")" suffixOverrides=",">
  144. <if test="id != null">
  145. id,
  146. </if>
  147. <if test="applyTheme != null">
  148. apply_theme,
  149. </if>
  150. <if test="formId != null">
  151. form_id,
  152. </if>
  153. <if test="applyUser != null">
  154. apply_user,
  155. </if>
  156. <if test="deptId != null">
  157. dept_id,
  158. </if>
  159. <if test="flowResult != null">
  160. flow_result,
  161. </if>
  162. <if test="flowStatus != null">
  163. flow_status,
  164. </if>
  165. <if test="ccList != null">
  166. cc_list,
  167. </if>
  168. <if test="flowName != null">
  169. flow_name,
  170. </if>
  171. <if test="flowType != null">
  172. flow_type,
  173. </if>
  174. <if test="flowPost != null">
  175. flow_post,
  176. </if>
  177. <if test="flowId != null">
  178. flow_id,
  179. </if>
  180. <if test="taskId != null">
  181. task_id,
  182. </if>
  183. <if test="returnStatus != null">
  184. return_status,
  185. </if>
  186. <if test="lastMainLogId != null">
  187. last_main_log_id,
  188. </if>
  189. <if test="conditionMap != null">
  190. condition_map,
  191. </if>
  192. <if test="status != null">
  193. status,
  194. </if>
  195. <if test="createdBy != null">
  196. created_by,
  197. </if>
  198. <if test="createdAt != null">
  199. created_at,
  200. </if>
  201. <if test="updatedBy != null">
  202. updated_by,
  203. </if>
  204. <if test="updatedAt != null">
  205. updated_at,
  206. </if>
  207. <if test="groupId != null">
  208. group_id,
  209. </if>
  210. <if test="remark != null">
  211. remark,
  212. </if>
  213. </trim>
  214. <trim prefix="values (" suffix=")" suffixOverrides=",">
  215. <if test="id != null">
  216. #{id,jdbcType=VARCHAR},
  217. </if>
  218. <if test="applyTheme != null">
  219. #{applyTheme,jdbcType=VARCHAR},
  220. </if>
  221. <if test="formId != null">
  222. #{formId,jdbcType=VARCHAR},
  223. </if>
  224. <if test="applyUser != null">
  225. #{applyUser,jdbcType=VARCHAR},
  226. </if>
  227. <if test="deptId != null">
  228. #{deptId,jdbcType=VARCHAR},
  229. </if>
  230. <if test="flowResult != null">
  231. #{flowResult,jdbcType=INTEGER},
  232. </if>
  233. <if test="flowStatus != null">
  234. #{flowStatus,jdbcType=INTEGER},
  235. </if>
  236. <if test="ccList != null">
  237. #{ccList,jdbcType=VARCHAR},
  238. </if>
  239. <if test="flowName != null">
  240. #{flowName,jdbcType=VARCHAR},
  241. </if>
  242. <if test="flowType != null">
  243. #{flowType,jdbcType=VARCHAR},
  244. </if>
  245. <if test="flowPost != null">
  246. #{flowPost,jdbcType=VARCHAR},
  247. </if>
  248. <if test="flowId != null">
  249. #{flowId,jdbcType=VARCHAR},
  250. </if>
  251. <if test="taskId != null">
  252. #{taskId,jdbcType=VARCHAR},
  253. </if>
  254. <if test="returnStatus != null">
  255. #{returnStatus,jdbcType=INTEGER},
  256. </if>
  257. <if test="lastMainLogId != null">
  258. #{lastMainLogId,jdbcType=VARCHAR},
  259. </if>
  260. <if test="conditionMap != null">
  261. #{conditionMap,jdbcType=VARCHAR},
  262. </if>
  263. <if test="status != null">
  264. #{status,jdbcType=INTEGER},
  265. </if>
  266. <if test="createdBy != null">
  267. #{createdBy,jdbcType=VARCHAR},
  268. </if>
  269. <if test="createdAt != null">
  270. #{createdAt,jdbcType=TIMESTAMP},
  271. </if>
  272. <if test="updatedBy != null">
  273. #{updatedBy,jdbcType=VARCHAR},
  274. </if>
  275. <if test="updatedAt != null">
  276. #{updatedAt,jdbcType=TIMESTAMP},
  277. </if>
  278. <if test="groupId != null">
  279. #{groupId,jdbcType=VARCHAR},
  280. </if>
  281. <if test="remark != null">
  282. #{remark,jdbcType=VARCHAR},
  283. </if>
  284. </trim>
  285. </insert>
  286. <select id="countByExample" parameterType="com.idea.oa.flow2.model.FlowMainExample" resultType="java.lang.Long">
  287. select count(*) from flow_main
  288. <if test="_parameter != null">
  289. <include refid="Example_Where_Clause" />
  290. </if>
  291. </select>
  292. <update id="updateByExampleSelective" parameterType="map">
  293. update flow_main
  294. <set>
  295. <if test="record.id != null">
  296. id = #{record.id,jdbcType=VARCHAR},
  297. </if>
  298. <if test="record.applyTheme != null">
  299. apply_theme = #{record.applyTheme,jdbcType=VARCHAR},
  300. </if>
  301. <if test="record.formId != null">
  302. form_id = #{record.formId,jdbcType=VARCHAR},
  303. </if>
  304. <if test="record.applyUser != null">
  305. apply_user = #{record.applyUser,jdbcType=VARCHAR},
  306. </if>
  307. <if test="record.deptId != null">
  308. dept_id = #{record.deptId,jdbcType=VARCHAR},
  309. </if>
  310. <if test="record.flowResult != null">
  311. flow_result = #{record.flowResult,jdbcType=INTEGER},
  312. </if>
  313. <if test="record.flowStatus != null">
  314. flow_status = #{record.flowStatus,jdbcType=INTEGER},
  315. </if>
  316. <if test="record.ccList != null">
  317. cc_list = #{record.ccList,jdbcType=VARCHAR},
  318. </if>
  319. <if test="record.flowName != null">
  320. flow_name = #{record.flowName,jdbcType=VARCHAR},
  321. </if>
  322. <if test="record.flowType != null">
  323. flow_type = #{record.flowType,jdbcType=VARCHAR},
  324. </if>
  325. <if test="record.flowPost != null">
  326. flow_post = #{record.flowPost,jdbcType=VARCHAR},
  327. </if>
  328. <if test="record.flowId != null">
  329. flow_id = #{record.flowId,jdbcType=VARCHAR},
  330. </if>
  331. <if test="record.taskId != null">
  332. task_id = #{record.taskId,jdbcType=VARCHAR},
  333. </if>
  334. <if test="record.returnStatus != null">
  335. return_status = #{record.returnStatus,jdbcType=INTEGER},
  336. </if>
  337. <if test="record.lastMainLogId != null">
  338. last_main_log_id = #{record.lastMainLogId,jdbcType=VARCHAR},
  339. </if>
  340. <if test="record.conditionMap != null">
  341. condition_map = #{record.conditionMap,jdbcType=VARCHAR},
  342. </if>
  343. <if test="record.status != null">
  344. status = #{record.status,jdbcType=INTEGER},
  345. </if>
  346. <if test="record.createdBy != null">
  347. created_by = #{record.createdBy,jdbcType=VARCHAR},
  348. </if>
  349. <if test="record.createdAt != null">
  350. created_at = #{record.createdAt,jdbcType=TIMESTAMP},
  351. </if>
  352. <if test="record.updatedBy != null">
  353. updated_by = #{record.updatedBy,jdbcType=VARCHAR},
  354. </if>
  355. <if test="record.updatedAt != null">
  356. updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
  357. </if>
  358. <if test="record.groupId != null">
  359. group_id = #{record.groupId,jdbcType=VARCHAR},
  360. </if>
  361. <if test="record.remark != null">
  362. remark = #{record.remark,jdbcType=VARCHAR},
  363. </if>
  364. </set>
  365. <if test="_parameter != null">
  366. <include refid="Update_By_Example_Where_Clause" />
  367. </if>
  368. </update>
  369. <update id="updateByExample" parameterType="map">
  370. update flow_main
  371. set id = #{record.id,jdbcType=VARCHAR},
  372. apply_theme = #{record.applyTheme,jdbcType=VARCHAR},
  373. form_id = #{record.formId,jdbcType=VARCHAR},
  374. apply_user = #{record.applyUser,jdbcType=VARCHAR},
  375. dept_id = #{record.deptId,jdbcType=VARCHAR},
  376. flow_result = #{record.flowResult,jdbcType=INTEGER},
  377. flow_status = #{record.flowStatus,jdbcType=INTEGER},
  378. cc_list = #{record.ccList,jdbcType=VARCHAR},
  379. flow_name = #{record.flowName,jdbcType=VARCHAR},
  380. flow_type = #{record.flowType,jdbcType=VARCHAR},
  381. flow_post = #{record.flowPost,jdbcType=VARCHAR},
  382. flow_id = #{record.flowId,jdbcType=VARCHAR},
  383. task_id = #{record.taskId,jdbcType=VARCHAR},
  384. return_status = #{record.returnStatus,jdbcType=INTEGER},
  385. last_main_log_id = #{record.lastMainLogId,jdbcType=VARCHAR},
  386. condition_map = #{record.conditionMap,jdbcType=VARCHAR},
  387. status = #{record.status,jdbcType=INTEGER},
  388. created_by = #{record.createdBy,jdbcType=VARCHAR},
  389. created_at = #{record.createdAt,jdbcType=TIMESTAMP},
  390. updated_by = #{record.updatedBy,jdbcType=VARCHAR},
  391. updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
  392. group_id = #{record.groupId,jdbcType=VARCHAR},
  393. remark = #{record.remark,jdbcType=VARCHAR}
  394. <if test="_parameter != null">
  395. <include refid="Update_By_Example_Where_Clause" />
  396. </if>
  397. </update>
  398. <update id="updateByPrimaryKeySelective" parameterType="com.idea.oa.flow2.model.FlowMain">
  399. update flow_main
  400. <set>
  401. <if test="applyTheme != null">
  402. apply_theme = #{applyTheme,jdbcType=VARCHAR},
  403. </if>
  404. <if test="formId != null">
  405. form_id = #{formId,jdbcType=VARCHAR},
  406. </if>
  407. <if test="applyUser != null">
  408. apply_user = #{applyUser,jdbcType=VARCHAR},
  409. </if>
  410. <if test="deptId != null">
  411. dept_id = #{deptId,jdbcType=VARCHAR},
  412. </if>
  413. <if test="flowResult != null">
  414. flow_result = #{flowResult,jdbcType=INTEGER},
  415. </if>
  416. <if test="flowStatus != null">
  417. flow_status = #{flowStatus,jdbcType=INTEGER},
  418. </if>
  419. <if test="ccList != null">
  420. cc_list = #{ccList,jdbcType=VARCHAR},
  421. </if>
  422. <if test="flowName != null">
  423. flow_name = #{flowName,jdbcType=VARCHAR},
  424. </if>
  425. <if test="flowType != null">
  426. flow_type = #{flowType,jdbcType=VARCHAR},
  427. </if>
  428. <if test="flowPost != null">
  429. flow_post = #{flowPost,jdbcType=VARCHAR},
  430. </if>
  431. <if test="flowId != null">
  432. flow_id = #{flowId,jdbcType=VARCHAR},
  433. </if>
  434. <if test="taskId != null">
  435. task_id = #{taskId,jdbcType=VARCHAR},
  436. </if>
  437. <if test="returnStatus != null">
  438. return_status = #{returnStatus,jdbcType=INTEGER},
  439. </if>
  440. <if test="lastMainLogId != null">
  441. last_main_log_id = #{lastMainLogId,jdbcType=VARCHAR},
  442. </if>
  443. <if test="conditionMap != null">
  444. condition_map = #{conditionMap,jdbcType=VARCHAR},
  445. </if>
  446. <if test="status != null">
  447. status = #{status,jdbcType=INTEGER},
  448. </if>
  449. <if test="createdBy != null">
  450. created_by = #{createdBy,jdbcType=VARCHAR},
  451. </if>
  452. <if test="createdAt != null">
  453. created_at = #{createdAt,jdbcType=TIMESTAMP},
  454. </if>
  455. <if test="updatedBy != null">
  456. updated_by = #{updatedBy,jdbcType=VARCHAR},
  457. </if>
  458. <if test="updatedAt != null">
  459. updated_at = #{updatedAt,jdbcType=TIMESTAMP},
  460. </if>
  461. <if test="groupId != null">
  462. group_id = #{groupId,jdbcType=VARCHAR},
  463. </if>
  464. <if test="remark != null">
  465. remark = #{remark,jdbcType=VARCHAR},
  466. </if>
  467. </set>
  468. where id = #{id,jdbcType=VARCHAR}
  469. </update>
  470. <update id="updateByPrimaryKey" parameterType="com.idea.oa.flow2.model.FlowMain">
  471. update flow_main
  472. set apply_theme = #{applyTheme,jdbcType=VARCHAR},
  473. form_id = #{formId,jdbcType=VARCHAR},
  474. apply_user = #{applyUser,jdbcType=VARCHAR},
  475. dept_id = #{deptId,jdbcType=VARCHAR},
  476. flow_result = #{flowResult,jdbcType=INTEGER},
  477. flow_status = #{flowStatus,jdbcType=INTEGER},
  478. cc_list = #{ccList,jdbcType=VARCHAR},
  479. flow_name = #{flowName,jdbcType=VARCHAR},
  480. flow_type = #{flowType,jdbcType=VARCHAR},
  481. flow_post = #{flowPost,jdbcType=VARCHAR},
  482. flow_id = #{flowId,jdbcType=VARCHAR},
  483. task_id = #{taskId,jdbcType=VARCHAR},
  484. return_status = #{returnStatus,jdbcType=INTEGER},
  485. last_main_log_id = #{lastMainLogId,jdbcType=VARCHAR},
  486. condition_map = #{conditionMap,jdbcType=VARCHAR},
  487. status = #{status,jdbcType=INTEGER},
  488. created_by = #{createdBy,jdbcType=VARCHAR},
  489. created_at = #{createdAt,jdbcType=TIMESTAMP},
  490. updated_by = #{updatedBy,jdbcType=VARCHAR},
  491. updated_at = #{updatedAt,jdbcType=TIMESTAMP},
  492. group_id = #{groupId,jdbcType=VARCHAR},
  493. remark = #{remark,jdbcType=VARCHAR}
  494. where id = #{id,jdbcType=VARCHAR}
  495. </update>
  496. </mapper>