ThirdPartWeComMsgMapper.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  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.api.dao.mapper.wecom.thirdpart.ThirdPartWeComMsgMapper">
  4. <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="uuid" jdbcType="VARCHAR" property="uuid" />
  7. <result column="send_userid" jdbcType="BIGINT" property="sendUserid" />
  8. <result column="staff_id" jdbcType="BIGINT" property="staffId" />
  9. <result column="video_id" jdbcType="BIGINT" property="videoId" />
  10. <result column="appName" jdbcType="VARCHAR" property="appname" />
  11. <result column="title" jdbcType="VARCHAR" property="title" />
  12. <result column="weappIconUrl" jdbcType="VARCHAR" property="weappiconurl" />
  13. <result column="pagepath" jdbcType="VARCHAR" property="pagepath" />
  14. <result column="root_source_id" jdbcType="VARCHAR" property="rootSourceId" />
  15. <result column="username" jdbcType="VARCHAR" property="username" />
  16. <result column="appid" jdbcType="VARCHAR" property="appid" />
  17. <result column="cdnkey" jdbcType="VARCHAR" property="cdnkey" />
  18. <result column="md5" jdbcType="VARCHAR" property="md5" />
  19. <result column="aeskey" jdbcType="VARCHAR" property="aeskey" />
  20. <result column="fileSize" jdbcType="INTEGER" property="filesize" />
  21. <result column="isRoom" jdbcType="BIT" property="isroom" />
  22. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  23. </resultMap>
  24. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg">
  25. <result column="desc" jdbcType="LONGVARCHAR" property="desc" />
  26. </resultMap>
  27. <sql id="Example_Where_Clause">
  28. <where>
  29. <foreach collection="oredCriteria" item="criteria" separator="or">
  30. <if test="criteria.valid">
  31. <trim prefix="(" prefixOverrides="and" suffix=")">
  32. <foreach collection="criteria.criteria" item="criterion">
  33. <choose>
  34. <when test="criterion.noValue">
  35. and ${criterion.condition}
  36. </when>
  37. <when test="criterion.singleValue">
  38. and ${criterion.condition} #{criterion.value}
  39. </when>
  40. <when test="criterion.betweenValue">
  41. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  42. </when>
  43. <when test="criterion.listValue">
  44. and ${criterion.condition}
  45. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  46. #{listItem}
  47. </foreach>
  48. </when>
  49. </choose>
  50. </foreach>
  51. </trim>
  52. </if>
  53. </foreach>
  54. </where>
  55. </sql>
  56. <sql id="Update_By_Example_Where_Clause">
  57. <where>
  58. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  59. <if test="criteria.valid">
  60. <trim prefix="(" prefixOverrides="and" suffix=")">
  61. <foreach collection="criteria.criteria" item="criterion">
  62. <choose>
  63. <when test="criterion.noValue">
  64. and ${criterion.condition}
  65. </when>
  66. <when test="criterion.singleValue">
  67. and ${criterion.condition} #{criterion.value}
  68. </when>
  69. <when test="criterion.betweenValue">
  70. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  71. </when>
  72. <when test="criterion.listValue">
  73. and ${criterion.condition}
  74. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  75. #{listItem}
  76. </foreach>
  77. </when>
  78. </choose>
  79. </foreach>
  80. </trim>
  81. </if>
  82. </foreach>
  83. </where>
  84. </sql>
  85. <sql id="Base_Column_List">
  86. id, uuid, send_userid, staff_id, video_id, appName, title, weappIconUrl, pagepath,
  87. root_source_id, username, appid, cdnkey, md5, aeskey, fileSize, isRoom, create_time
  88. </sql>
  89. <sql id="Blob_Column_List">
  90. `desc`
  91. </sql>
  92. <select id="selectByExampleWithBLOBs" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsgExample" resultMap="ResultMapWithBLOBs">
  93. select
  94. <if test="distinct">
  95. distinct
  96. </if>
  97. <include refid="Base_Column_List" />
  98. ,
  99. <include refid="Blob_Column_List" />
  100. from third_part_we_com_msg
  101. <if test="_parameter != null">
  102. <include refid="Example_Where_Clause" />
  103. </if>
  104. <if test="orderByClause != null">
  105. order by ${orderByClause}
  106. </if>
  107. <if test="page != null">
  108. limit #{page.offset} , #{page.pageSize}
  109. </if>
  110. </select>
  111. <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsgExample" resultMap="BaseResultMap">
  112. select
  113. <if test="distinct">
  114. distinct
  115. </if>
  116. <include refid="Base_Column_List" />
  117. from third_part_we_com_msg
  118. <if test="_parameter != null">
  119. <include refid="Example_Where_Clause" />
  120. </if>
  121. <if test="orderByClause != null">
  122. order by ${orderByClause}
  123. </if>
  124. <if test="page != null">
  125. limit #{page.offset} , #{page.pageSize}
  126. </if>
  127. </select>
  128. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
  129. select
  130. <include refid="Base_Column_List" />
  131. ,
  132. <include refid="Blob_Column_List" />
  133. from third_part_we_com_msg
  134. where id = #{id,jdbcType=BIGINT}
  135. </select>
  136. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  137. delete from third_part_we_com_msg
  138. where id = #{id,jdbcType=BIGINT}
  139. </delete>
  140. <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsgExample">
  141. delete from third_part_we_com_msg
  142. <if test="_parameter != null">
  143. <include refid="Example_Where_Clause" />
  144. </if>
  145. </delete>
  146. <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg">
  147. insert into third_part_we_com_msg (id, uuid, send_userid,
  148. staff_id, video_id, appName,
  149. title, weappIconUrl, pagepath,
  150. root_source_id, username, appid,
  151. cdnkey, md5, aeskey,
  152. fileSize, isRoom, create_time,
  153. `desc`)
  154. values (#{id,jdbcType=BIGINT}, #{uuid,jdbcType=VARCHAR}, #{sendUserid,jdbcType=BIGINT},
  155. #{staffId,jdbcType=BIGINT}, #{videoId,jdbcType=BIGINT}, #{appname,jdbcType=VARCHAR},
  156. #{title,jdbcType=VARCHAR}, #{weappiconurl,jdbcType=VARCHAR}, #{pagepath,jdbcType=VARCHAR},
  157. #{rootSourceId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR},
  158. #{cdnkey,jdbcType=VARCHAR}, #{md5,jdbcType=VARCHAR}, #{aeskey,jdbcType=VARCHAR},
  159. #{filesize,jdbcType=INTEGER}, #{isroom,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP},
  160. #{desc,jdbcType=LONGVARCHAR})
  161. </insert>
  162. <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg">
  163. insert into third_part_we_com_msg
  164. <trim prefix="(" suffix=")" suffixOverrides=",">
  165. <if test="id != null">
  166. id,
  167. </if>
  168. <if test="uuid != null">
  169. uuid,
  170. </if>
  171. <if test="sendUserid != null">
  172. send_userid,
  173. </if>
  174. <if test="staffId != null">
  175. staff_id,
  176. </if>
  177. <if test="videoId != null">
  178. video_id,
  179. </if>
  180. <if test="appname != null">
  181. appName,
  182. </if>
  183. <if test="title != null">
  184. title,
  185. </if>
  186. <if test="weappiconurl != null">
  187. weappIconUrl,
  188. </if>
  189. <if test="pagepath != null">
  190. pagepath,
  191. </if>
  192. <if test="rootSourceId != null">
  193. root_source_id,
  194. </if>
  195. <if test="username != null">
  196. username,
  197. </if>
  198. <if test="appid != null">
  199. appid,
  200. </if>
  201. <if test="cdnkey != null">
  202. cdnkey,
  203. </if>
  204. <if test="md5 != null">
  205. md5,
  206. </if>
  207. <if test="aeskey != null">
  208. aeskey,
  209. </if>
  210. <if test="filesize != null">
  211. fileSize,
  212. </if>
  213. <if test="isroom != null">
  214. isRoom,
  215. </if>
  216. <if test="createTime != null">
  217. create_time,
  218. </if>
  219. <if test="desc != null">
  220. `desc`,
  221. </if>
  222. </trim>
  223. <trim prefix="values (" suffix=")" suffixOverrides=",">
  224. <if test="id != null">
  225. #{id,jdbcType=BIGINT},
  226. </if>
  227. <if test="uuid != null">
  228. #{uuid,jdbcType=VARCHAR},
  229. </if>
  230. <if test="sendUserid != null">
  231. #{sendUserid,jdbcType=BIGINT},
  232. </if>
  233. <if test="staffId != null">
  234. #{staffId,jdbcType=BIGINT},
  235. </if>
  236. <if test="videoId != null">
  237. #{videoId,jdbcType=BIGINT},
  238. </if>
  239. <if test="appname != null">
  240. #{appname,jdbcType=VARCHAR},
  241. </if>
  242. <if test="title != null">
  243. #{title,jdbcType=VARCHAR},
  244. </if>
  245. <if test="weappiconurl != null">
  246. #{weappiconurl,jdbcType=VARCHAR},
  247. </if>
  248. <if test="pagepath != null">
  249. #{pagepath,jdbcType=VARCHAR},
  250. </if>
  251. <if test="rootSourceId != null">
  252. #{rootSourceId,jdbcType=VARCHAR},
  253. </if>
  254. <if test="username != null">
  255. #{username,jdbcType=VARCHAR},
  256. </if>
  257. <if test="appid != null">
  258. #{appid,jdbcType=VARCHAR},
  259. </if>
  260. <if test="cdnkey != null">
  261. #{cdnkey,jdbcType=VARCHAR},
  262. </if>
  263. <if test="md5 != null">
  264. #{md5,jdbcType=VARCHAR},
  265. </if>
  266. <if test="aeskey != null">
  267. #{aeskey,jdbcType=VARCHAR},
  268. </if>
  269. <if test="filesize != null">
  270. #{filesize,jdbcType=INTEGER},
  271. </if>
  272. <if test="isroom != null">
  273. #{isroom,jdbcType=BIT},
  274. </if>
  275. <if test="createTime != null">
  276. #{createTime,jdbcType=TIMESTAMP},
  277. </if>
  278. <if test="desc != null">
  279. #{desc,jdbcType=LONGVARCHAR},
  280. </if>
  281. </trim>
  282. </insert>
  283. <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsgExample" resultType="java.lang.Long">
  284. select count(*) from third_part_we_com_msg
  285. <if test="_parameter != null">
  286. <include refid="Example_Where_Clause" />
  287. </if>
  288. </select>
  289. <update id="updateByExampleSelective" parameterType="map">
  290. update third_part_we_com_msg
  291. <set>
  292. <if test="record.id != null">
  293. id = #{record.id,jdbcType=BIGINT},
  294. </if>
  295. <if test="record.uuid != null">
  296. uuid = #{record.uuid,jdbcType=VARCHAR},
  297. </if>
  298. <if test="record.sendUserid != null">
  299. send_userid = #{record.sendUserid,jdbcType=BIGINT},
  300. </if>
  301. <if test="record.staffId != null">
  302. staff_id = #{record.staffId,jdbcType=BIGINT},
  303. </if>
  304. <if test="record.videoId != null">
  305. video_id = #{record.videoId,jdbcType=BIGINT},
  306. </if>
  307. <if test="record.appname != null">
  308. appName = #{record.appname,jdbcType=VARCHAR},
  309. </if>
  310. <if test="record.title != null">
  311. title = #{record.title,jdbcType=VARCHAR},
  312. </if>
  313. <if test="record.weappiconurl != null">
  314. weappIconUrl = #{record.weappiconurl,jdbcType=VARCHAR},
  315. </if>
  316. <if test="record.pagepath != null">
  317. pagepath = #{record.pagepath,jdbcType=VARCHAR},
  318. </if>
  319. <if test="record.rootSourceId != null">
  320. root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
  321. </if>
  322. <if test="record.username != null">
  323. username = #{record.username,jdbcType=VARCHAR},
  324. </if>
  325. <if test="record.appid != null">
  326. appid = #{record.appid,jdbcType=VARCHAR},
  327. </if>
  328. <if test="record.cdnkey != null">
  329. cdnkey = #{record.cdnkey,jdbcType=VARCHAR},
  330. </if>
  331. <if test="record.md5 != null">
  332. md5 = #{record.md5,jdbcType=VARCHAR},
  333. </if>
  334. <if test="record.aeskey != null">
  335. aeskey = #{record.aeskey,jdbcType=VARCHAR},
  336. </if>
  337. <if test="record.filesize != null">
  338. fileSize = #{record.filesize,jdbcType=INTEGER},
  339. </if>
  340. <if test="record.isroom != null">
  341. isRoom = #{record.isroom,jdbcType=BIT},
  342. </if>
  343. <if test="record.createTime != null">
  344. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  345. </if>
  346. <if test="record.desc != null">
  347. `desc` = #{record.desc,jdbcType=LONGVARCHAR},
  348. </if>
  349. </set>
  350. <if test="_parameter != null">
  351. <include refid="Update_By_Example_Where_Clause" />
  352. </if>
  353. </update>
  354. <update id="updateByExampleWithBLOBs" parameterType="map">
  355. update third_part_we_com_msg
  356. set id = #{record.id,jdbcType=BIGINT},
  357. uuid = #{record.uuid,jdbcType=VARCHAR},
  358. send_userid = #{record.sendUserid,jdbcType=BIGINT},
  359. staff_id = #{record.staffId,jdbcType=BIGINT},
  360. video_id = #{record.videoId,jdbcType=BIGINT},
  361. appName = #{record.appname,jdbcType=VARCHAR},
  362. title = #{record.title,jdbcType=VARCHAR},
  363. weappIconUrl = #{record.weappiconurl,jdbcType=VARCHAR},
  364. pagepath = #{record.pagepath,jdbcType=VARCHAR},
  365. root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
  366. username = #{record.username,jdbcType=VARCHAR},
  367. appid = #{record.appid,jdbcType=VARCHAR},
  368. cdnkey = #{record.cdnkey,jdbcType=VARCHAR},
  369. md5 = #{record.md5,jdbcType=VARCHAR},
  370. aeskey = #{record.aeskey,jdbcType=VARCHAR},
  371. fileSize = #{record.filesize,jdbcType=INTEGER},
  372. isRoom = #{record.isroom,jdbcType=BIT},
  373. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  374. `desc` = #{record.desc,jdbcType=LONGVARCHAR}
  375. <if test="_parameter != null">
  376. <include refid="Update_By_Example_Where_Clause" />
  377. </if>
  378. </update>
  379. <update id="updateByExample" parameterType="map">
  380. update third_part_we_com_msg
  381. set id = #{record.id,jdbcType=BIGINT},
  382. uuid = #{record.uuid,jdbcType=VARCHAR},
  383. send_userid = #{record.sendUserid,jdbcType=BIGINT},
  384. staff_id = #{record.staffId,jdbcType=BIGINT},
  385. video_id = #{record.videoId,jdbcType=BIGINT},
  386. appName = #{record.appname,jdbcType=VARCHAR},
  387. title = #{record.title,jdbcType=VARCHAR},
  388. weappIconUrl = #{record.weappiconurl,jdbcType=VARCHAR},
  389. pagepath = #{record.pagepath,jdbcType=VARCHAR},
  390. root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
  391. username = #{record.username,jdbcType=VARCHAR},
  392. appid = #{record.appid,jdbcType=VARCHAR},
  393. cdnkey = #{record.cdnkey,jdbcType=VARCHAR},
  394. md5 = #{record.md5,jdbcType=VARCHAR},
  395. aeskey = #{record.aeskey,jdbcType=VARCHAR},
  396. fileSize = #{record.filesize,jdbcType=INTEGER},
  397. isRoom = #{record.isroom,jdbcType=BIT},
  398. create_time = #{record.createTime,jdbcType=TIMESTAMP}
  399. <if test="_parameter != null">
  400. <include refid="Update_By_Example_Where_Clause" />
  401. </if>
  402. </update>
  403. <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg">
  404. update third_part_we_com_msg
  405. <set>
  406. <if test="uuid != null">
  407. uuid = #{uuid,jdbcType=VARCHAR},
  408. </if>
  409. <if test="sendUserid != null">
  410. send_userid = #{sendUserid,jdbcType=BIGINT},
  411. </if>
  412. <if test="staffId != null">
  413. staff_id = #{staffId,jdbcType=BIGINT},
  414. </if>
  415. <if test="videoId != null">
  416. video_id = #{videoId,jdbcType=BIGINT},
  417. </if>
  418. <if test="appname != null">
  419. appName = #{appname,jdbcType=VARCHAR},
  420. </if>
  421. <if test="title != null">
  422. title = #{title,jdbcType=VARCHAR},
  423. </if>
  424. <if test="weappiconurl != null">
  425. weappIconUrl = #{weappiconurl,jdbcType=VARCHAR},
  426. </if>
  427. <if test="pagepath != null">
  428. pagepath = #{pagepath,jdbcType=VARCHAR},
  429. </if>
  430. <if test="rootSourceId != null">
  431. root_source_id = #{rootSourceId,jdbcType=VARCHAR},
  432. </if>
  433. <if test="username != null">
  434. username = #{username,jdbcType=VARCHAR},
  435. </if>
  436. <if test="appid != null">
  437. appid = #{appid,jdbcType=VARCHAR},
  438. </if>
  439. <if test="cdnkey != null">
  440. cdnkey = #{cdnkey,jdbcType=VARCHAR},
  441. </if>
  442. <if test="md5 != null">
  443. md5 = #{md5,jdbcType=VARCHAR},
  444. </if>
  445. <if test="aeskey != null">
  446. aeskey = #{aeskey,jdbcType=VARCHAR},
  447. </if>
  448. <if test="filesize != null">
  449. fileSize = #{filesize,jdbcType=INTEGER},
  450. </if>
  451. <if test="isroom != null">
  452. isRoom = #{isroom,jdbcType=BIT},
  453. </if>
  454. <if test="createTime != null">
  455. create_time = #{createTime,jdbcType=TIMESTAMP},
  456. </if>
  457. <if test="desc != null">
  458. `desc` = #{desc,jdbcType=LONGVARCHAR},
  459. </if>
  460. </set>
  461. where id = #{id,jdbcType=BIGINT}
  462. </update>
  463. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg">
  464. update third_part_we_com_msg
  465. set uuid = #{uuid,jdbcType=VARCHAR},
  466. send_userid = #{sendUserid,jdbcType=BIGINT},
  467. staff_id = #{staffId,jdbcType=BIGINT},
  468. video_id = #{videoId,jdbcType=BIGINT},
  469. appName = #{appname,jdbcType=VARCHAR},
  470. title = #{title,jdbcType=VARCHAR},
  471. weappIconUrl = #{weappiconurl,jdbcType=VARCHAR},
  472. pagepath = #{pagepath,jdbcType=VARCHAR},
  473. root_source_id = #{rootSourceId,jdbcType=VARCHAR},
  474. username = #{username,jdbcType=VARCHAR},
  475. appid = #{appid,jdbcType=VARCHAR},
  476. cdnkey = #{cdnkey,jdbcType=VARCHAR},
  477. md5 = #{md5,jdbcType=VARCHAR},
  478. aeskey = #{aeskey,jdbcType=VARCHAR},
  479. fileSize = #{filesize,jdbcType=INTEGER},
  480. isRoom = #{isroom,jdbcType=BIT},
  481. create_time = #{createTime,jdbcType=TIMESTAMP},
  482. `desc` = #{desc,jdbcType=LONGVARCHAR}
  483. where id = #{id,jdbcType=BIGINT}
  484. </update>
  485. <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg">
  486. update third_part_we_com_msg
  487. set uuid = #{uuid,jdbcType=VARCHAR},
  488. send_userid = #{sendUserid,jdbcType=BIGINT},
  489. staff_id = #{staffId,jdbcType=BIGINT},
  490. video_id = #{videoId,jdbcType=BIGINT},
  491. appName = #{appname,jdbcType=VARCHAR},
  492. title = #{title,jdbcType=VARCHAR},
  493. weappIconUrl = #{weappiconurl,jdbcType=VARCHAR},
  494. pagepath = #{pagepath,jdbcType=VARCHAR},
  495. root_source_id = #{rootSourceId,jdbcType=VARCHAR},
  496. username = #{username,jdbcType=VARCHAR},
  497. appid = #{appid,jdbcType=VARCHAR},
  498. cdnkey = #{cdnkey,jdbcType=VARCHAR},
  499. md5 = #{md5,jdbcType=VARCHAR},
  500. aeskey = #{aeskey,jdbcType=VARCHAR},
  501. fileSize = #{filesize,jdbcType=INTEGER},
  502. isRoom = #{isroom,jdbcType=BIT},
  503. create_time = #{createTime,jdbcType=TIMESTAMP}
  504. where id = #{id,jdbcType=BIGINT}
  505. </update>
  506. </mapper>