ThirdPartWeComRoomUserMapper.xml 17 KB

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