FlowMainCcMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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.FlowMainCcMapper">
  4. <resultMap id="BaseResultMap" type="com.idea.oa.flow2.model.FlowMainCc">
  5. <id column="id" jdbcType="VARCHAR" property="id" />
  6. <result column="flow_main_id" jdbcType="VARCHAR" property="flowMainId" />
  7. <result column="cc_user" jdbcType="VARCHAR" property="ccUser" />
  8. <result column="main_log_ids" jdbcType="VARCHAR" property="mainLogIds" />
  9. <result column="status" jdbcType="INTEGER" property="status" />
  10. <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
  11. <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
  12. <result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
  13. <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
  14. <result column="group_id" jdbcType="VARCHAR" property="groupId" />
  15. <result column="remark" jdbcType="VARCHAR" property="remark" />
  16. <result column="is_read" jdbcType="VARCHAR" property="isRead" />
  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. id, flow_main_id, cc_user, main_log_ids, status, created_by, created_at, updated_by,
  78. updated_at, group_id, remark, is_read
  79. </sql>
  80. <select id="selectByExample" parameterType="com.idea.oa.flow2.model.FlowMainCcExample" resultMap="BaseResultMap">
  81. select
  82. <if test="distinct">
  83. distinct
  84. </if>
  85. <include refid="Base_Column_List" />
  86. from flow_main_cc
  87. <if test="_parameter != null">
  88. <include refid="Example_Where_Clause" />
  89. </if>
  90. <if test="orderByClause != null">
  91. order by ${orderByClause}
  92. </if>
  93. </select>
  94. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  95. select
  96. <include refid="Base_Column_List" />
  97. from flow_main_cc
  98. where id = #{id,jdbcType=VARCHAR}
  99. </select>
  100. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  101. delete from flow_main_cc
  102. where id = #{id,jdbcType=VARCHAR}
  103. </delete>
  104. <delete id="deleteByExample" parameterType="com.idea.oa.flow2.model.FlowMainCcExample">
  105. delete from flow_main_cc
  106. <if test="_parameter != null">
  107. <include refid="Example_Where_Clause" />
  108. </if>
  109. </delete>
  110. <insert id="insert" parameterType="com.idea.oa.flow2.model.FlowMainCc">
  111. insert into flow_main_cc (id,flow_main_id, cc_user, main_log_ids,
  112. status, created_by, created_at,
  113. updated_by, updated_at, group_id,
  114. remark, is_read)
  115. values (#{id,jdbcType=VARCHAR},#{flowMainId,jdbcType=VARCHAR}, #{ccUser,jdbcType=VARCHAR}, #{mainLogIds,jdbcType=VARCHAR},
  116. #{status,jdbcType=INTEGER}, #{createdBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
  117. #{updatedBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, #{groupId,jdbcType=VARCHAR},
  118. #{remark,jdbcType=VARCHAR}, #{isRead,jdbcType=VARCHAR})
  119. </insert>
  120. <insert id="insertSelective" parameterType="com.idea.oa.flow2.model.FlowMainCc">
  121. insert into flow_main_cc
  122. <trim prefix="(" suffix=")" suffixOverrides=",">
  123. <if test="id != null">id,</if>
  124. <if test="flowMainId != null">
  125. flow_main_id,
  126. </if>
  127. <if test="ccUser != null">
  128. cc_user,
  129. </if>
  130. <if test="mainLogIds != null">
  131. main_log_ids,
  132. </if>
  133. <if test="status != null">
  134. status,
  135. </if>
  136. <if test="createdBy != null">
  137. created_by,
  138. </if>
  139. <if test="createdAt != null">
  140. created_at,
  141. </if>
  142. <if test="updatedBy != null">
  143. updated_by,
  144. </if>
  145. <if test="updatedAt != null">
  146. updated_at,
  147. </if>
  148. <if test="groupId != null">
  149. group_id,
  150. </if>
  151. <if test="remark != null">
  152. remark,
  153. </if>
  154. <if test="isRead != null">
  155. is_read,
  156. </if>
  157. </trim>
  158. <trim prefix="values (" suffix=")" suffixOverrides=",">
  159. <if test="id != null">#{id,jdbcType=VARCHAR},</if>
  160. <if test="flowMainId != null">
  161. #{flowMainId,jdbcType=VARCHAR},
  162. </if>
  163. <if test="ccUser != null">
  164. #{ccUser,jdbcType=VARCHAR},
  165. </if>
  166. <if test="mainLogIds != null">
  167. #{mainLogIds,jdbcType=VARCHAR},
  168. </if>
  169. <if test="status != null">
  170. #{status,jdbcType=INTEGER},
  171. </if>
  172. <if test="createdBy != null">
  173. #{createdBy,jdbcType=VARCHAR},
  174. </if>
  175. <if test="createdAt != null">
  176. #{createdAt,jdbcType=TIMESTAMP},
  177. </if>
  178. <if test="updatedBy != null">
  179. #{updatedBy,jdbcType=VARCHAR},
  180. </if>
  181. <if test="updatedAt != null">
  182. #{updatedAt,jdbcType=TIMESTAMP},
  183. </if>
  184. <if test="groupId != null">
  185. #{groupId,jdbcType=VARCHAR},
  186. </if>
  187. <if test="remark != null">
  188. #{remark,jdbcType=VARCHAR},
  189. </if>
  190. <if test="isRead != null">
  191. #{isRead,jdbcType=VARCHAR},
  192. </if>
  193. </trim>
  194. </insert>
  195. <select id="countByExample" parameterType="com.idea.oa.flow2.model.FlowMainCcExample" resultType="java.lang.Long">
  196. select count(*) from flow_main_cc
  197. <if test="_parameter != null">
  198. <include refid="Example_Where_Clause" />
  199. </if>
  200. </select>
  201. <update id="updateByExampleSelective" parameterType="map">
  202. update flow_main_cc
  203. <set>
  204. <if test="record.id != null">
  205. id = #{record.id,jdbcType=VARCHAR},
  206. </if>
  207. <if test="record.flowMainId != null">
  208. flow_main_id = #{record.flowMainId,jdbcType=VARCHAR},
  209. </if>
  210. <if test="record.ccUser != null">
  211. cc_user = #{record.ccUser,jdbcType=VARCHAR},
  212. </if>
  213. <if test="record.mainLogIds != null">
  214. main_log_ids = #{record.mainLogIds,jdbcType=VARCHAR},
  215. </if>
  216. <if test="record.status != null">
  217. status = #{record.status,jdbcType=INTEGER},
  218. </if>
  219. <if test="record.createdBy != null">
  220. created_by = #{record.createdBy,jdbcType=VARCHAR},
  221. </if>
  222. <if test="record.createdAt != null">
  223. created_at = #{record.createdAt,jdbcType=TIMESTAMP},
  224. </if>
  225. <if test="record.updatedBy != null">
  226. updated_by = #{record.updatedBy,jdbcType=VARCHAR},
  227. </if>
  228. <if test="record.updatedAt != null">
  229. updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
  230. </if>
  231. <if test="record.groupId != null">
  232. group_id = #{record.groupId,jdbcType=VARCHAR},
  233. </if>
  234. <if test="record.remark != null">
  235. remark = #{record.remark,jdbcType=VARCHAR},
  236. </if>
  237. <if test="record.isRead != null">
  238. is_read = #{record.isRead,jdbcType=VARCHAR},
  239. </if>
  240. </set>
  241. <if test="_parameter != null">
  242. <include refid="Update_By_Example_Where_Clause" />
  243. </if>
  244. </update>
  245. <update id="updateByExample" parameterType="map">
  246. update flow_main_cc
  247. set id = #{record.id,jdbcType=VARCHAR},
  248. flow_main_id = #{record.flowMainId,jdbcType=VARCHAR},
  249. cc_user = #{record.ccUser,jdbcType=VARCHAR},
  250. main_log_ids = #{record.mainLogIds,jdbcType=VARCHAR},
  251. status = #{record.status,jdbcType=INTEGER},
  252. created_by = #{record.createdBy,jdbcType=VARCHAR},
  253. created_at = #{record.createdAt,jdbcType=TIMESTAMP},
  254. updated_by = #{record.updatedBy,jdbcType=VARCHAR},
  255. updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
  256. group_id = #{record.groupId,jdbcType=VARCHAR},
  257. remark = #{record.remark,jdbcType=VARCHAR},
  258. is_read = #{record.isRead,jdbcType=VARCHAR}
  259. <if test="_parameter != null">
  260. <include refid="Update_By_Example_Where_Clause" />
  261. </if>
  262. </update>
  263. <update id="updateByPrimaryKeySelective" parameterType="com.idea.oa.flow2.model.FlowMainCc">
  264. update flow_main_cc
  265. <set>
  266. <if test="flowMainId != null">
  267. flow_main_id = #{flowMainId,jdbcType=VARCHAR},
  268. </if>
  269. <if test="ccUser != null">
  270. cc_user = #{ccUser,jdbcType=VARCHAR},
  271. </if>
  272. <if test="mainLogIds != null">
  273. main_log_ids = #{mainLogIds,jdbcType=VARCHAR},
  274. </if>
  275. <if test="status != null">
  276. status = #{status,jdbcType=INTEGER},
  277. </if>
  278. <if test="createdBy != null">
  279. created_by = #{createdBy,jdbcType=VARCHAR},
  280. </if>
  281. <if test="createdAt != null">
  282. created_at = #{createdAt,jdbcType=TIMESTAMP},
  283. </if>
  284. <if test="updatedBy != null">
  285. updated_by = #{updatedBy,jdbcType=VARCHAR},
  286. </if>
  287. <if test="updatedAt != null">
  288. updated_at = #{updatedAt,jdbcType=TIMESTAMP},
  289. </if>
  290. <if test="groupId != null">
  291. group_id = #{groupId,jdbcType=VARCHAR},
  292. </if>
  293. <if test="remark != null">
  294. remark = #{remark,jdbcType=VARCHAR},
  295. </if>
  296. <if test="isRead != null">
  297. is_read = #{isRead,jdbcType=VARCHAR},
  298. </if>
  299. </set>
  300. where id = #{id,jdbcType=VARCHAR}
  301. </update>
  302. <update id="updateByPrimaryKey" parameterType="com.idea.oa.flow2.model.FlowMainCc">
  303. update flow_main_cc
  304. set flow_main_id = #{flowMainId,jdbcType=VARCHAR},
  305. cc_user = #{ccUser,jdbcType=VARCHAR},
  306. main_log_ids = #{mainLogIds,jdbcType=VARCHAR},
  307. status = #{status,jdbcType=INTEGER},
  308. created_by = #{createdBy,jdbcType=VARCHAR},
  309. created_at = #{createdAt,jdbcType=TIMESTAMP},
  310. updated_by = #{updatedBy,jdbcType=VARCHAR},
  311. updated_at = #{updatedAt,jdbcType=TIMESTAMP},
  312. group_id = #{groupId,jdbcType=VARCHAR},
  313. remark = #{remark,jdbcType=VARCHAR},
  314. is_read = #{isRead,jdbcType=VARCHAR}
  315. where id = #{id,jdbcType=VARCHAR}
  316. </update>
  317. </mapper>