PreSpecialSendMessageMapper.xml 13 KB

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