ThirdPartWeComStaffUserMapper.xml 18 KB

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