FlowMainPushMapper.xml 16 KB

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