GroupSendResultMapper.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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.longarticle.dao.mapper.longarticle.GroupSendResultMapper">
  4. <resultMap id="BaseResultMap" type="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResult">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="account_name" jdbcType="VARCHAR" property="accountName" />
  7. <result column="gh_id" jdbcType="VARCHAR" property="ghId" />
  8. <result column="publish_date" jdbcType="VARCHAR" property="publishDate" />
  9. <result column="user_group_id" jdbcType="INTEGER" property="userGroupId" />
  10. <result column="content_id" jdbcType="VARCHAR" property="contentId" />
  11. <result column="push_id" jdbcType="VARCHAR" property="pushId" />
  12. <result column="status" jdbcType="INTEGER" property="status" />
  13. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  14. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  15. </resultMap>
  16. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResult">
  17. <result column="url" jdbcType="LONGVARCHAR" property="url" />
  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, account_name, gh_id, publish_date, user_group_id, content_id, push_id, `status`,
  79. create_time, update_time
  80. </sql>
  81. <sql id="Blob_Column_List">
  82. url
  83. </sql>
  84. <select id="selectByExampleWithBLOBs" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResultExample" resultMap="ResultMapWithBLOBs">
  85. select
  86. <if test="distinct">
  87. distinct
  88. </if>
  89. <include refid="Base_Column_List" />
  90. ,
  91. <include refid="Blob_Column_List" />
  92. from long_articles_group_send_result
  93. <if test="_parameter != null">
  94. <include refid="Example_Where_Clause" />
  95. </if>
  96. <if test="orderByClause != null">
  97. order by ${orderByClause}
  98. </if>
  99. <if test="page != null">
  100. limit #{page.offset} , #{page.pageSize}
  101. </if>
  102. </select>
  103. <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResultExample" resultMap="BaseResultMap">
  104. select
  105. <if test="distinct">
  106. distinct
  107. </if>
  108. <include refid="Base_Column_List" />
  109. from long_articles_group_send_result
  110. <if test="_parameter != null">
  111. <include refid="Example_Where_Clause" />
  112. </if>
  113. <if test="orderByClause != null">
  114. order by ${orderByClause}
  115. </if>
  116. <if test="page != null">
  117. limit #{page.offset} , #{page.pageSize}
  118. </if>
  119. </select>
  120. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
  121. select
  122. <include refid="Base_Column_List" />
  123. ,
  124. <include refid="Blob_Column_List" />
  125. from long_articles_group_send_result
  126. where id = #{id,jdbcType=BIGINT}
  127. </select>
  128. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  129. delete from long_articles_group_send_result
  130. where id = #{id,jdbcType=BIGINT}
  131. </delete>
  132. <delete id="deleteByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResultExample">
  133. delete from long_articles_group_send_result
  134. <if test="_parameter != null">
  135. <include refid="Example_Where_Clause" />
  136. </if>
  137. </delete>
  138. <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResult">
  139. insert into long_articles_group_send_result (id, account_name, gh_id,
  140. publish_date, user_group_id, content_id,
  141. push_id, `status`, create_time,
  142. update_time, url)
  143. values (#{id,jdbcType=BIGINT}, #{accountName,jdbcType=VARCHAR}, #{ghId,jdbcType=VARCHAR},
  144. #{publishDate,jdbcType=VARCHAR}, #{userGroupId,jdbcType=INTEGER}, #{contentId,jdbcType=VARCHAR},
  145. #{pushId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  146. #{updateTime,jdbcType=TIMESTAMP}, #{url,jdbcType=LONGVARCHAR})
  147. </insert>
  148. <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResult">
  149. insert into long_articles_group_send_result
  150. <trim prefix="(" suffix=")" suffixOverrides=",">
  151. <if test="id != null">
  152. id,
  153. </if>
  154. <if test="accountName != null">
  155. account_name,
  156. </if>
  157. <if test="ghId != null">
  158. gh_id,
  159. </if>
  160. <if test="publishDate != null">
  161. publish_date,
  162. </if>
  163. <if test="userGroupId != null">
  164. user_group_id,
  165. </if>
  166. <if test="contentId != null">
  167. content_id,
  168. </if>
  169. <if test="pushId != null">
  170. push_id,
  171. </if>
  172. <if test="status != null">
  173. `status`,
  174. </if>
  175. <if test="createTime != null">
  176. create_time,
  177. </if>
  178. <if test="updateTime != null">
  179. update_time,
  180. </if>
  181. <if test="url != null">
  182. url,
  183. </if>
  184. </trim>
  185. <trim prefix="values (" suffix=")" suffixOverrides=",">
  186. <if test="id != null">
  187. #{id,jdbcType=BIGINT},
  188. </if>
  189. <if test="accountName != null">
  190. #{accountName,jdbcType=VARCHAR},
  191. </if>
  192. <if test="ghId != null">
  193. #{ghId,jdbcType=VARCHAR},
  194. </if>
  195. <if test="publishDate != null">
  196. #{publishDate,jdbcType=VARCHAR},
  197. </if>
  198. <if test="userGroupId != null">
  199. #{userGroupId,jdbcType=INTEGER},
  200. </if>
  201. <if test="contentId != null">
  202. #{contentId,jdbcType=VARCHAR},
  203. </if>
  204. <if test="pushId != null">
  205. #{pushId,jdbcType=VARCHAR},
  206. </if>
  207. <if test="status != null">
  208. #{status,jdbcType=INTEGER},
  209. </if>
  210. <if test="createTime != null">
  211. #{createTime,jdbcType=TIMESTAMP},
  212. </if>
  213. <if test="updateTime != null">
  214. #{updateTime,jdbcType=TIMESTAMP},
  215. </if>
  216. <if test="url != null">
  217. #{url,jdbcType=LONGVARCHAR},
  218. </if>
  219. </trim>
  220. </insert>
  221. <select id="countByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResultExample" resultType="java.lang.Long">
  222. select count(*) from long_articles_group_send_result
  223. <if test="_parameter != null">
  224. <include refid="Example_Where_Clause" />
  225. </if>
  226. </select>
  227. <update id="updateByExampleSelective" parameterType="map">
  228. update long_articles_group_send_result
  229. <set>
  230. <if test="record.id != null">
  231. id = #{record.id,jdbcType=BIGINT},
  232. </if>
  233. <if test="record.accountName != null">
  234. account_name = #{record.accountName,jdbcType=VARCHAR},
  235. </if>
  236. <if test="record.ghId != null">
  237. gh_id = #{record.ghId,jdbcType=VARCHAR},
  238. </if>
  239. <if test="record.publishDate != null">
  240. publish_date = #{record.publishDate,jdbcType=VARCHAR},
  241. </if>
  242. <if test="record.userGroupId != null">
  243. user_group_id = #{record.userGroupId,jdbcType=INTEGER},
  244. </if>
  245. <if test="record.contentId != null">
  246. content_id = #{record.contentId,jdbcType=VARCHAR},
  247. </if>
  248. <if test="record.pushId != null">
  249. push_id = #{record.pushId,jdbcType=VARCHAR},
  250. </if>
  251. <if test="record.status != null">
  252. `status` = #{record.status,jdbcType=INTEGER},
  253. </if>
  254. <if test="record.createTime != null">
  255. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  256. </if>
  257. <if test="record.updateTime != null">
  258. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  259. </if>
  260. <if test="record.url != null">
  261. url = #{record.url,jdbcType=LONGVARCHAR},
  262. </if>
  263. </set>
  264. <if test="_parameter != null">
  265. <include refid="Update_By_Example_Where_Clause" />
  266. </if>
  267. </update>
  268. <update id="updateByExampleWithBLOBs" parameterType="map">
  269. update long_articles_group_send_result
  270. set id = #{record.id,jdbcType=BIGINT},
  271. account_name = #{record.accountName,jdbcType=VARCHAR},
  272. gh_id = #{record.ghId,jdbcType=VARCHAR},
  273. publish_date = #{record.publishDate,jdbcType=VARCHAR},
  274. user_group_id = #{record.userGroupId,jdbcType=INTEGER},
  275. content_id = #{record.contentId,jdbcType=VARCHAR},
  276. push_id = #{record.pushId,jdbcType=VARCHAR},
  277. `status` = #{record.status,jdbcType=INTEGER},
  278. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  279. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  280. url = #{record.url,jdbcType=LONGVARCHAR}
  281. <if test="_parameter != null">
  282. <include refid="Update_By_Example_Where_Clause" />
  283. </if>
  284. </update>
  285. <update id="updateByExample" parameterType="map">
  286. update long_articles_group_send_result
  287. set id = #{record.id,jdbcType=BIGINT},
  288. account_name = #{record.accountName,jdbcType=VARCHAR},
  289. gh_id = #{record.ghId,jdbcType=VARCHAR},
  290. publish_date = #{record.publishDate,jdbcType=VARCHAR},
  291. user_group_id = #{record.userGroupId,jdbcType=INTEGER},
  292. content_id = #{record.contentId,jdbcType=VARCHAR},
  293. push_id = #{record.pushId,jdbcType=VARCHAR},
  294. `status` = #{record.status,jdbcType=INTEGER},
  295. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  296. update_time = #{record.updateTime,jdbcType=TIMESTAMP}
  297. <if test="_parameter != null">
  298. <include refid="Update_By_Example_Where_Clause" />
  299. </if>
  300. </update>
  301. <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResult">
  302. update long_articles_group_send_result
  303. <set>
  304. <if test="accountName != null">
  305. account_name = #{accountName,jdbcType=VARCHAR},
  306. </if>
  307. <if test="ghId != null">
  308. gh_id = #{ghId,jdbcType=VARCHAR},
  309. </if>
  310. <if test="publishDate != null">
  311. publish_date = #{publishDate,jdbcType=VARCHAR},
  312. </if>
  313. <if test="userGroupId != null">
  314. user_group_id = #{userGroupId,jdbcType=INTEGER},
  315. </if>
  316. <if test="contentId != null">
  317. content_id = #{contentId,jdbcType=VARCHAR},
  318. </if>
  319. <if test="pushId != null">
  320. push_id = #{pushId,jdbcType=VARCHAR},
  321. </if>
  322. <if test="status != null">
  323. `status` = #{status,jdbcType=INTEGER},
  324. </if>
  325. <if test="createTime != null">
  326. create_time = #{createTime,jdbcType=TIMESTAMP},
  327. </if>
  328. <if test="updateTime != null">
  329. update_time = #{updateTime,jdbcType=TIMESTAMP},
  330. </if>
  331. <if test="url != null">
  332. url = #{url,jdbcType=LONGVARCHAR},
  333. </if>
  334. </set>
  335. where id = #{id,jdbcType=BIGINT}
  336. </update>
  337. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResult">
  338. update long_articles_group_send_result
  339. set account_name = #{accountName,jdbcType=VARCHAR},
  340. gh_id = #{ghId,jdbcType=VARCHAR},
  341. publish_date = #{publishDate,jdbcType=VARCHAR},
  342. user_group_id = #{userGroupId,jdbcType=INTEGER},
  343. content_id = #{contentId,jdbcType=VARCHAR},
  344. push_id = #{pushId,jdbcType=VARCHAR},
  345. `status` = #{status,jdbcType=INTEGER},
  346. create_time = #{createTime,jdbcType=TIMESTAMP},
  347. update_time = #{updateTime,jdbcType=TIMESTAMP},
  348. url = #{url,jdbcType=LONGVARCHAR}
  349. where id = #{id,jdbcType=BIGINT}
  350. </update>
  351. <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.GroupSendResult">
  352. update long_articles_group_send_result
  353. set account_name = #{accountName,jdbcType=VARCHAR},
  354. gh_id = #{ghId,jdbcType=VARCHAR},
  355. publish_date = #{publishDate,jdbcType=VARCHAR},
  356. user_group_id = #{userGroupId,jdbcType=INTEGER},
  357. content_id = #{contentId,jdbcType=VARCHAR},
  358. push_id = #{pushId,jdbcType=VARCHAR},
  359. `status` = #{status,jdbcType=INTEGER},
  360. create_time = #{createTime,jdbcType=TIMESTAMP},
  361. update_time = #{updateTime,jdbcType=TIMESTAMP}
  362. where id = #{id,jdbcType=BIGINT}
  363. </update>
  364. </mapper>