CgiReplyBucketDataMapper.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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.longarticle.recommend.server.repository.mapper.crawler.CgiReplyBucketDataMapper">
  4. <resultMap id="BaseResultMap" type="com.tzld.longarticle.recommend.server.repository.model.CgiReplyBucketData">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="strategy" jdbcType="VARCHAR" property="strategy" />
  7. <result column="sort" jdbcType="INTEGER" property="sort" />
  8. <result column="strategy_dt" jdbcType="VARCHAR" property="strategyDt" />
  9. <result column="gh_id" jdbcType="VARCHAR" property="ghId" />
  10. <result column="msg_type" jdbcType="INTEGER" property="msgType" />
  11. <result column="title" jdbcType="VARCHAR" property="title" />
  12. <result column="cover_url" jdbcType="VARCHAR" property="coverUrl" />
  13. <result column="mini_app_id" jdbcType="VARCHAR" property="miniAppId" />
  14. <result column="mini_page_path" jdbcType="VARCHAR" property="miniPagePath" />
  15. <result column="mini_video_id" jdbcType="BIGINT" property="miniVideoId" />
  16. <result column="page_path_url_id" jdbcType="BIGINT" property="pagePathUrlId" />
  17. <result column="news_publish_content_id" jdbcType="VARCHAR" property="newsPublishContentId" />
  18. <result column="plan_id" jdbcType="VARCHAR" property="planId" />
  19. <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
  20. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  21. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  22. </resultMap>
  23. <sql id="Example_Where_Clause">
  24. <where>
  25. <foreach collection="oredCriteria" item="criteria" separator="or">
  26. <if test="criteria.valid">
  27. <trim prefix="(" prefixOverrides="and" suffix=")">
  28. <foreach collection="criteria.criteria" item="criterion">
  29. <choose>
  30. <when test="criterion.noValue">
  31. and ${criterion.condition}
  32. </when>
  33. <when test="criterion.singleValue">
  34. and ${criterion.condition} #{criterion.value}
  35. </when>
  36. <when test="criterion.betweenValue">
  37. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  38. </when>
  39. <when test="criterion.listValue">
  40. and ${criterion.condition}
  41. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  42. #{listItem}
  43. </foreach>
  44. </when>
  45. </choose>
  46. </foreach>
  47. </trim>
  48. </if>
  49. </foreach>
  50. </where>
  51. </sql>
  52. <sql id="Update_By_Example_Where_Clause">
  53. <where>
  54. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  55. <if test="criteria.valid">
  56. <trim prefix="(" prefixOverrides="and" suffix=")">
  57. <foreach collection="criteria.criteria" item="criterion">
  58. <choose>
  59. <when test="criterion.noValue">
  60. and ${criterion.condition}
  61. </when>
  62. <when test="criterion.singleValue">
  63. and ${criterion.condition} #{criterion.value}
  64. </when>
  65. <when test="criterion.betweenValue">
  66. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  67. </when>
  68. <when test="criterion.listValue">
  69. and ${criterion.condition}
  70. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  71. #{listItem}
  72. </foreach>
  73. </when>
  74. </choose>
  75. </foreach>
  76. </trim>
  77. </if>
  78. </foreach>
  79. </where>
  80. </sql>
  81. <sql id="Base_Column_List">
  82. id, strategy, sort, strategy_dt, gh_id, msg_type, title, cover_url, mini_app_id,
  83. mini_page_path, mini_video_id, page_path_url_id, news_publish_content_id, plan_id,
  84. is_delete, create_time, update_time
  85. </sql>
  86. <select id="selectByExample" parameterType="com.tzld.longarticle.recommend.server.repository.model.CgiReplyBucketDataExample" resultMap="BaseResultMap">
  87. select
  88. <if test="distinct">
  89. distinct
  90. </if>
  91. <include refid="Base_Column_List" />
  92. from cgi_reply_bucket_data
  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. </select>
  100. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  101. select
  102. <include refid="Base_Column_List" />
  103. from cgi_reply_bucket_data
  104. where id = #{id,jdbcType=BIGINT}
  105. </select>
  106. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  107. delete from cgi_reply_bucket_data
  108. where id = #{id,jdbcType=BIGINT}
  109. </delete>
  110. <delete id="deleteByExample" parameterType="com.tzld.longarticle.recommend.server.repository.model.CgiReplyBucketDataExample">
  111. delete from cgi_reply_bucket_data
  112. <if test="_parameter != null">
  113. <include refid="Example_Where_Clause" />
  114. </if>
  115. </delete>
  116. <insert id="insert" parameterType="com.tzld.longarticle.recommend.server.repository.model.CgiReplyBucketData">
  117. <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
  118. SELECT LAST_INSERT_ID()
  119. </selectKey>
  120. insert into cgi_reply_bucket_data (strategy, sort, strategy_dt,
  121. gh_id, msg_type, title,
  122. cover_url, mini_app_id, mini_page_path,
  123. mini_video_id, page_path_url_id, news_publish_content_id,
  124. plan_id, is_delete, create_time,
  125. update_time)
  126. values (#{strategy,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{strategyDt,jdbcType=VARCHAR},
  127. #{ghId,jdbcType=VARCHAR}, #{msgType,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
  128. #{coverUrl,jdbcType=VARCHAR}, #{miniAppId,jdbcType=VARCHAR}, #{miniPagePath,jdbcType=VARCHAR},
  129. #{miniVideoId,jdbcType=BIGINT}, #{pagePathUrlId,jdbcType=BIGINT}, #{newsPublishContentId,jdbcType=VARCHAR},
  130. #{planId,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  131. #{updateTime,jdbcType=TIMESTAMP})
  132. </insert>
  133. <insert id="insertSelective" parameterType="com.tzld.longarticle.recommend.server.repository.model.CgiReplyBucketData">
  134. <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
  135. SELECT LAST_INSERT_ID()
  136. </selectKey>
  137. insert into cgi_reply_bucket_data
  138. <trim prefix="(" suffix=")" suffixOverrides=",">
  139. <if test="strategy != null">
  140. strategy,
  141. </if>
  142. <if test="sort != null">
  143. sort,
  144. </if>
  145. <if test="strategyDt != null">
  146. strategy_dt,
  147. </if>
  148. <if test="ghId != null">
  149. gh_id,
  150. </if>
  151. <if test="msgType != null">
  152. msg_type,
  153. </if>
  154. <if test="title != null">
  155. title,
  156. </if>
  157. <if test="coverUrl != null">
  158. cover_url,
  159. </if>
  160. <if test="miniAppId != null">
  161. mini_app_id,
  162. </if>
  163. <if test="miniPagePath != null">
  164. mini_page_path,
  165. </if>
  166. <if test="miniVideoId != null">
  167. mini_video_id,
  168. </if>
  169. <if test="pagePathUrlId != null">
  170. page_path_url_id,
  171. </if>
  172. <if test="newsPublishContentId != null">
  173. news_publish_content_id,
  174. </if>
  175. <if test="planId != null">
  176. plan_id,
  177. </if>
  178. <if test="isDelete != null">
  179. is_delete,
  180. </if>
  181. <if test="createTime != null">
  182. create_time,
  183. </if>
  184. <if test="updateTime != null">
  185. update_time,
  186. </if>
  187. </trim>
  188. <trim prefix="values (" suffix=")" suffixOverrides=",">
  189. <if test="strategy != null">
  190. #{strategy,jdbcType=VARCHAR},
  191. </if>
  192. <if test="sort != null">
  193. #{sort,jdbcType=INTEGER},
  194. </if>
  195. <if test="strategyDt != null">
  196. #{strategyDt,jdbcType=VARCHAR},
  197. </if>
  198. <if test="ghId != null">
  199. #{ghId,jdbcType=VARCHAR},
  200. </if>
  201. <if test="msgType != null">
  202. #{msgType,jdbcType=INTEGER},
  203. </if>
  204. <if test="title != null">
  205. #{title,jdbcType=VARCHAR},
  206. </if>
  207. <if test="coverUrl != null">
  208. #{coverUrl,jdbcType=VARCHAR},
  209. </if>
  210. <if test="miniAppId != null">
  211. #{miniAppId,jdbcType=VARCHAR},
  212. </if>
  213. <if test="miniPagePath != null">
  214. #{miniPagePath,jdbcType=VARCHAR},
  215. </if>
  216. <if test="miniVideoId != null">
  217. #{miniVideoId,jdbcType=BIGINT},
  218. </if>
  219. <if test="pagePathUrlId != null">
  220. #{pagePathUrlId,jdbcType=BIGINT},
  221. </if>
  222. <if test="newsPublishContentId != null">
  223. #{newsPublishContentId,jdbcType=VARCHAR},
  224. </if>
  225. <if test="planId != null">
  226. #{planId,jdbcType=VARCHAR},
  227. </if>
  228. <if test="isDelete != null">
  229. #{isDelete,jdbcType=INTEGER},
  230. </if>
  231. <if test="createTime != null">
  232. #{createTime,jdbcType=TIMESTAMP},
  233. </if>
  234. <if test="updateTime != null">
  235. #{updateTime,jdbcType=TIMESTAMP},
  236. </if>
  237. </trim>
  238. </insert>
  239. <select id="countByExample" parameterType="com.tzld.longarticle.recommend.server.repository.model.CgiReplyBucketDataExample" resultType="java.lang.Long">
  240. select count(*) from cgi_reply_bucket_data
  241. <if test="_parameter != null">
  242. <include refid="Example_Where_Clause" />
  243. </if>
  244. </select>
  245. <update id="updateByExampleSelective" parameterType="map">
  246. update cgi_reply_bucket_data
  247. <set>
  248. <if test="row.id != null">
  249. id = #{row.id,jdbcType=BIGINT},
  250. </if>
  251. <if test="row.strategy != null">
  252. strategy = #{row.strategy,jdbcType=VARCHAR},
  253. </if>
  254. <if test="row.sort != null">
  255. sort = #{row.sort,jdbcType=INTEGER},
  256. </if>
  257. <if test="row.strategyDt != null">
  258. strategy_dt = #{row.strategyDt,jdbcType=VARCHAR},
  259. </if>
  260. <if test="row.ghId != null">
  261. gh_id = #{row.ghId,jdbcType=VARCHAR},
  262. </if>
  263. <if test="row.msgType != null">
  264. msg_type = #{row.msgType,jdbcType=INTEGER},
  265. </if>
  266. <if test="row.title != null">
  267. title = #{row.title,jdbcType=VARCHAR},
  268. </if>
  269. <if test="row.coverUrl != null">
  270. cover_url = #{row.coverUrl,jdbcType=VARCHAR},
  271. </if>
  272. <if test="row.miniAppId != null">
  273. mini_app_id = #{row.miniAppId,jdbcType=VARCHAR},
  274. </if>
  275. <if test="row.miniPagePath != null">
  276. mini_page_path = #{row.miniPagePath,jdbcType=VARCHAR},
  277. </if>
  278. <if test="row.miniVideoId != null">
  279. mini_video_id = #{row.miniVideoId,jdbcType=BIGINT},
  280. </if>
  281. <if test="row.pagePathUrlId != null">
  282. page_path_url_id = #{row.pagePathUrlId,jdbcType=BIGINT},
  283. </if>
  284. <if test="row.newsPublishContentId != null">
  285. news_publish_content_id = #{row.newsPublishContentId,jdbcType=VARCHAR},
  286. </if>
  287. <if test="row.planId != null">
  288. plan_id = #{row.planId,jdbcType=VARCHAR},
  289. </if>
  290. <if test="row.isDelete != null">
  291. is_delete = #{row.isDelete,jdbcType=INTEGER},
  292. </if>
  293. <if test="row.createTime != null">
  294. create_time = #{row.createTime,jdbcType=TIMESTAMP},
  295. </if>
  296. <if test="row.updateTime != null">
  297. update_time = #{row.updateTime,jdbcType=TIMESTAMP},
  298. </if>
  299. </set>
  300. <if test="example != null">
  301. <include refid="Update_By_Example_Where_Clause" />
  302. </if>
  303. </update>
  304. <update id="updateByExample" parameterType="map">
  305. update cgi_reply_bucket_data
  306. set id = #{row.id,jdbcType=BIGINT},
  307. strategy = #{row.strategy,jdbcType=VARCHAR},
  308. sort = #{row.sort,jdbcType=INTEGER},
  309. strategy_dt = #{row.strategyDt,jdbcType=VARCHAR},
  310. gh_id = #{row.ghId,jdbcType=VARCHAR},
  311. msg_type = #{row.msgType,jdbcType=INTEGER},
  312. title = #{row.title,jdbcType=VARCHAR},
  313. cover_url = #{row.coverUrl,jdbcType=VARCHAR},
  314. mini_app_id = #{row.miniAppId,jdbcType=VARCHAR},
  315. mini_page_path = #{row.miniPagePath,jdbcType=VARCHAR},
  316. mini_video_id = #{row.miniVideoId,jdbcType=BIGINT},
  317. page_path_url_id = #{row.pagePathUrlId,jdbcType=BIGINT},
  318. news_publish_content_id = #{row.newsPublishContentId,jdbcType=VARCHAR},
  319. plan_id = #{row.planId,jdbcType=VARCHAR},
  320. is_delete = #{row.isDelete,jdbcType=INTEGER},
  321. create_time = #{row.createTime,jdbcType=TIMESTAMP},
  322. update_time = #{row.updateTime,jdbcType=TIMESTAMP}
  323. <if test="example != null">
  324. <include refid="Update_By_Example_Where_Clause" />
  325. </if>
  326. </update>
  327. <update id="updateByPrimaryKeySelective" parameterType="com.tzld.longarticle.recommend.server.repository.model.CgiReplyBucketData">
  328. update cgi_reply_bucket_data
  329. <set>
  330. <if test="strategy != null">
  331. strategy = #{strategy,jdbcType=VARCHAR},
  332. </if>
  333. <if test="sort != null">
  334. sort = #{sort,jdbcType=INTEGER},
  335. </if>
  336. <if test="strategyDt != null">
  337. strategy_dt = #{strategyDt,jdbcType=VARCHAR},
  338. </if>
  339. <if test="ghId != null">
  340. gh_id = #{ghId,jdbcType=VARCHAR},
  341. </if>
  342. <if test="msgType != null">
  343. msg_type = #{msgType,jdbcType=INTEGER},
  344. </if>
  345. <if test="title != null">
  346. title = #{title,jdbcType=VARCHAR},
  347. </if>
  348. <if test="coverUrl != null">
  349. cover_url = #{coverUrl,jdbcType=VARCHAR},
  350. </if>
  351. <if test="miniAppId != null">
  352. mini_app_id = #{miniAppId,jdbcType=VARCHAR},
  353. </if>
  354. <if test="miniPagePath != null">
  355. mini_page_path = #{miniPagePath,jdbcType=VARCHAR},
  356. </if>
  357. <if test="miniVideoId != null">
  358. mini_video_id = #{miniVideoId,jdbcType=BIGINT},
  359. </if>
  360. <if test="pagePathUrlId != null">
  361. page_path_url_id = #{pagePathUrlId,jdbcType=BIGINT},
  362. </if>
  363. <if test="newsPublishContentId != null">
  364. news_publish_content_id = #{newsPublishContentId,jdbcType=VARCHAR},
  365. </if>
  366. <if test="planId != null">
  367. plan_id = #{planId,jdbcType=VARCHAR},
  368. </if>
  369. <if test="isDelete != null">
  370. is_delete = #{isDelete,jdbcType=INTEGER},
  371. </if>
  372. <if test="createTime != null">
  373. create_time = #{createTime,jdbcType=TIMESTAMP},
  374. </if>
  375. <if test="updateTime != null">
  376. update_time = #{updateTime,jdbcType=TIMESTAMP},
  377. </if>
  378. </set>
  379. where id = #{id,jdbcType=BIGINT}
  380. </update>
  381. <update id="updateByPrimaryKey" parameterType="com.tzld.longarticle.recommend.server.repository.model.CgiReplyBucketData">
  382. update cgi_reply_bucket_data
  383. set strategy = #{strategy,jdbcType=VARCHAR},
  384. sort = #{sort,jdbcType=INTEGER},
  385. strategy_dt = #{strategyDt,jdbcType=VARCHAR},
  386. gh_id = #{ghId,jdbcType=VARCHAR},
  387. msg_type = #{msgType,jdbcType=INTEGER},
  388. title = #{title,jdbcType=VARCHAR},
  389. cover_url = #{coverUrl,jdbcType=VARCHAR},
  390. mini_app_id = #{miniAppId,jdbcType=VARCHAR},
  391. mini_page_path = #{miniPagePath,jdbcType=VARCHAR},
  392. mini_video_id = #{miniVideoId,jdbcType=BIGINT},
  393. page_path_url_id = #{pagePathUrlId,jdbcType=BIGINT},
  394. news_publish_content_id = #{newsPublishContentId,jdbcType=VARCHAR},
  395. plan_id = #{planId,jdbcType=VARCHAR},
  396. is_delete = #{isDelete,jdbcType=INTEGER},
  397. create_time = #{createTime,jdbcType=TIMESTAMP},
  398. update_time = #{updateTime,jdbcType=TIMESTAMP}
  399. where id = #{id,jdbcType=BIGINT}
  400. </update>
  401. </mapper>