UserMapper.xml 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244
  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.book.server.dao.mapper.UserMapper">
  4. <resultMap id="BaseResultMap" type="com.book.dao.cps.pojo.User">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  9. -->
  10. <id column="id" jdbcType="BIGINT" property="id" />
  11. <result column="openid" jdbcType="VARCHAR" property="openid" />
  12. <result column="unionid" jdbcType="VARCHAR" property="unionid" />
  13. <result column="visitor" jdbcType="VARCHAR" property="visitor" />
  14. <result column="nickname" jdbcType="VARCHAR" property="nickname" />
  15. <result column="sex" jdbcType="CHAR" property="sex" />
  16. <result column="mobile" jdbcType="CHAR" property="mobile" />
  17. <result column="avatar" jdbcType="VARCHAR" property="avatar" />
  18. <result column="is_subscribe" jdbcType="CHAR" property="isSubscribe" />
  19. <result column="subscription_extend" jdbcType="CHAR" property="subscriptionExtend" />
  20. <result column="subscribe_time" jdbcType="INTEGER" property="subscribeTime" />
  21. <result column="book_category_ids" jdbcType="VARCHAR" property="bookCategoryIds" />
  22. <result column="operate_time" jdbcType="INTEGER" property="operateTime" />
  23. <result column="is_pay" jdbcType="CHAR" property="isPay" />
  24. <result column="kandian" jdbcType="INTEGER" property="kandian" />
  25. <result column="free_kandian" jdbcType="INTEGER" property="freeKandian" />
  26. <result column="vip_endtime" jdbcType="INTEGER" property="vipEndtime" />
  27. <result column="register_ip" jdbcType="VARCHAR" property="registerIp" />
  28. <result column="country" jdbcType="VARCHAR" property="country" />
  29. <result column="area" jdbcType="VARCHAR" property="area" />
  30. <result column="province" jdbcType="VARCHAR" property="province" />
  31. <result column="city" jdbcType="VARCHAR" property="city" />
  32. <result column="isp" jdbcType="VARCHAR" property="isp" />
  33. <result column="channel_id" jdbcType="INTEGER" property="channelId" />
  34. <result column="state" jdbcType="CHAR" property="state" />
  35. <result column="createtime" jdbcType="INTEGER" property="createtime" />
  36. <result column="updatetime" jdbcType="INTEGER" property="updatetime" />
  37. </resultMap>
  38. <sql id="Example_Where_Clause">
  39. <!--
  40. WARNING - @mbg.generated
  41. This element is automatically generated by MyBatis Generator, do not modify.
  42. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  43. -->
  44. <where>
  45. <foreach collection="oredCriteria" item="criteria" separator="or">
  46. <if test="criteria.valid">
  47. <trim prefix="(" prefixOverrides="and" suffix=")">
  48. <foreach collection="criteria.criteria" item="criterion">
  49. <choose>
  50. <when test="criterion.noValue">
  51. and ${criterion.condition}
  52. </when>
  53. <when test="criterion.singleValue">
  54. and ${criterion.condition} #{criterion.value}
  55. </when>
  56. <when test="criterion.betweenValue">
  57. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  58. </when>
  59. <when test="criterion.listValue">
  60. and ${criterion.condition}
  61. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  62. #{listItem}
  63. </foreach>
  64. </when>
  65. </choose>
  66. </foreach>
  67. </trim>
  68. </if>
  69. </foreach>
  70. </where>
  71. </sql>
  72. <sql id="Update_By_Example_Where_Clause">
  73. <!--
  74. WARNING - @mbg.generated
  75. This element is automatically generated by MyBatis Generator, do not modify.
  76. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  77. -->
  78. <where>
  79. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  80. <if test="criteria.valid">
  81. <trim prefix="(" prefixOverrides="and" suffix=")">
  82. <foreach collection="criteria.criteria" item="criterion">
  83. <choose>
  84. <when test="criterion.noValue">
  85. and ${criterion.condition}
  86. </when>
  87. <when test="criterion.singleValue">
  88. and ${criterion.condition} #{criterion.value}
  89. </when>
  90. <when test="criterion.betweenValue">
  91. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  92. </when>
  93. <when test="criterion.listValue">
  94. and ${criterion.condition}
  95. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  96. #{listItem}
  97. </foreach>
  98. </when>
  99. </choose>
  100. </foreach>
  101. </trim>
  102. </if>
  103. </foreach>
  104. </where>
  105. </sql>
  106. <sql id="Base_Column_List">
  107. <!--
  108. WARNING - @mbg.generated
  109. This element is automatically generated by MyBatis Generator, do not modify.
  110. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  111. -->
  112. id, openid, unionid, visitor, nickname, sex, mobile, avatar, is_subscribe, subscription_extend,
  113. subscribe_time, book_category_ids, operate_time, is_pay, kandian, free_kandian, vip_endtime,
  114. register_ip, country, area, province, city, isp, channel_id, state, createtime, updatetime
  115. </sql>
  116. <select id="selectByExample" parameterType="com.book.dao.cps.pojo.example.UserExample" resultMap="BaseResultMap">
  117. <!--
  118. WARNING - @mbg.generated
  119. This element is automatically generated by MyBatis Generator, do not modify.
  120. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  121. -->
  122. select
  123. <if test="distinct">
  124. distinct
  125. </if>
  126. <include refid="Base_Column_List" />
  127. from user
  128. <if test="_parameter != null">
  129. <include refid="Example_Where_Clause" />
  130. </if>
  131. <if test="orderByClause != null">
  132. order by ${orderByClause}
  133. </if>
  134. <if test="rows != null">
  135. <if test="offset != null">
  136. limit ${offset}, ${rows}
  137. </if>
  138. <if test="offset == null">
  139. limit ${rows}
  140. </if>
  141. </if>
  142. </select>
  143. <select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
  144. <!--
  145. WARNING - @mbg.generated
  146. This element is automatically generated by MyBatis Generator, do not modify.
  147. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  148. -->
  149. select
  150. <if test="example != null and example.distinct">
  151. distinct
  152. </if>
  153. <choose>
  154. <when test="selective != null and selective.length > 0">
  155. <foreach collection="selective" item="column" separator=",">
  156. ${column.aliasedEscapedColumnName}
  157. </foreach>
  158. </when>
  159. <otherwise>
  160. <include refid="Base_Column_List" />
  161. </otherwise>
  162. </choose>
  163. from user
  164. <if test="example != null">
  165. <include refid="Update_By_Example_Where_Clause" />
  166. </if>
  167. <if test="example != null and example.orderByClause != null">
  168. order by ${example.orderByClause}
  169. </if>
  170. <if test="example != null and example.rows != null">
  171. <if test="example.offset != null">
  172. limit ${example.offset}, ${example.rows}
  173. </if>
  174. <if test="example.offset == null">
  175. limit ${example.rows}
  176. </if>
  177. </if>
  178. </select>
  179. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  180. <!--
  181. WARNING - @mbg.generated
  182. This element is automatically generated by MyBatis Generator, do not modify.
  183. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  184. -->
  185. select
  186. <include refid="Base_Column_List" />
  187. from user
  188. where id = #{id,jdbcType=BIGINT}
  189. </select>
  190. <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
  191. <!--
  192. WARNING - @mbg.generated
  193. This element is automatically generated by MyBatis Generator, do not modify.
  194. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  195. -->
  196. select
  197. <choose>
  198. <when test="selective != null and selective.length > 0">
  199. <foreach collection="selective" item="column" separator=",">
  200. ${column.aliasedEscapedColumnName}
  201. </foreach>
  202. </when>
  203. <otherwise>
  204. <include refid="Base_Column_List" />
  205. </otherwise>
  206. </choose>
  207. from user
  208. where id = #{id,jdbcType=BIGINT}
  209. </select>
  210. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  211. <!--
  212. WARNING - @mbg.generated
  213. This element is automatically generated by MyBatis Generator, do not modify.
  214. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  215. -->
  216. delete from user
  217. where id = #{id,jdbcType=BIGINT}
  218. </delete>
  219. <delete id="deleteByExample" parameterType="com.book.dao.cps.pojo.example.UserExample">
  220. <!--
  221. WARNING - @mbg.generated
  222. This element is automatically generated by MyBatis Generator, do not modify.
  223. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  224. -->
  225. delete from user
  226. <if test="_parameter != null">
  227. <include refid="Example_Where_Clause" />
  228. </if>
  229. </delete>
  230. <insert id="insert" parameterType="com.book.dao.cps.pojo.User">
  231. <!--
  232. WARNING - @mbg.generated
  233. This element is automatically generated by MyBatis Generator, do not modify.
  234. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  235. -->
  236. insert into user (id, openid, unionid,
  237. visitor, nickname, sex,
  238. mobile, avatar, is_subscribe,
  239. subscription_extend, subscribe_time, book_category_ids,
  240. operate_time, is_pay, kandian,
  241. free_kandian, vip_endtime, register_ip,
  242. country, area, province,
  243. city, isp, channel_id,
  244. state, createtime, updatetime
  245. )
  246. values (#{id,jdbcType=BIGINT}, #{openid,jdbcType=VARCHAR}, #{unionid,jdbcType=VARCHAR},
  247. #{visitor,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{sex,jdbcType=CHAR},
  248. #{mobile,jdbcType=CHAR}, #{avatar,jdbcType=VARCHAR}, #{isSubscribe,jdbcType=CHAR},
  249. #{subscriptionExtend,jdbcType=CHAR}, #{subscribeTime,jdbcType=INTEGER}, #{bookCategoryIds,jdbcType=VARCHAR},
  250. #{operateTime,jdbcType=INTEGER}, #{isPay,jdbcType=CHAR}, #{kandian,jdbcType=INTEGER},
  251. #{freeKandian,jdbcType=INTEGER}, #{vipEndtime,jdbcType=INTEGER}, #{registerIp,jdbcType=VARCHAR},
  252. #{country,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR},
  253. #{city,jdbcType=VARCHAR}, #{isp,jdbcType=VARCHAR}, #{channelId,jdbcType=INTEGER},
  254. #{state,jdbcType=CHAR}, #{createtime,jdbcType=INTEGER}, #{updatetime,jdbcType=INTEGER}
  255. )
  256. </insert>
  257. <insert id="insertSelective" parameterType="map">
  258. <!--
  259. WARNING - @mbg.generated
  260. This element is automatically generated by MyBatis Generator, do not modify.
  261. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  262. -->
  263. insert into user
  264. <choose>
  265. <when test="selective != null and selective.length > 0">
  266. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  267. ${column.escapedColumnName}
  268. </foreach>
  269. </when>
  270. <otherwise>
  271. <trim prefix="(" suffix=")" suffixOverrides=",">
  272. <if test="record.id != null">
  273. id,
  274. </if>
  275. <if test="record.openid != null">
  276. openid,
  277. </if>
  278. <if test="record.unionid != null">
  279. unionid,
  280. </if>
  281. <if test="record.visitor != null">
  282. visitor,
  283. </if>
  284. <if test="record.nickname != null">
  285. nickname,
  286. </if>
  287. <if test="record.sex != null">
  288. sex,
  289. </if>
  290. <if test="record.mobile != null">
  291. mobile,
  292. </if>
  293. <if test="record.avatar != null">
  294. avatar,
  295. </if>
  296. <if test="record.isSubscribe != null">
  297. is_subscribe,
  298. </if>
  299. <if test="record.subscriptionExtend != null">
  300. subscription_extend,
  301. </if>
  302. <if test="record.subscribeTime != null">
  303. subscribe_time,
  304. </if>
  305. <if test="record.bookCategoryIds != null">
  306. book_category_ids,
  307. </if>
  308. <if test="record.operateTime != null">
  309. operate_time,
  310. </if>
  311. <if test="record.isPay != null">
  312. is_pay,
  313. </if>
  314. <if test="record.kandian != null">
  315. kandian,
  316. </if>
  317. <if test="record.freeKandian != null">
  318. free_kandian,
  319. </if>
  320. <if test="record.vipEndtime != null">
  321. vip_endtime,
  322. </if>
  323. <if test="record.registerIp != null">
  324. register_ip,
  325. </if>
  326. <if test="record.country != null">
  327. country,
  328. </if>
  329. <if test="record.area != null">
  330. area,
  331. </if>
  332. <if test="record.province != null">
  333. province,
  334. </if>
  335. <if test="record.city != null">
  336. city,
  337. </if>
  338. <if test="record.isp != null">
  339. isp,
  340. </if>
  341. <if test="record.channelId != null">
  342. channel_id,
  343. </if>
  344. <if test="record.state != null">
  345. state,
  346. </if>
  347. <if test="record.createtime != null">
  348. createtime,
  349. </if>
  350. <if test="record.updatetime != null">
  351. updatetime,
  352. </if>
  353. </trim>
  354. <trim prefix="(" suffix=")" suffixOverrides="," />
  355. </otherwise>
  356. </choose>
  357. values
  358. <choose>
  359. <when test="selective != null and selective.length > 0">
  360. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  361. #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  362. </foreach>
  363. </when>
  364. <otherwise>
  365. <trim prefix="(" suffix=")" suffixOverrides=",">
  366. <if test="record.id != null">
  367. #{record.id,jdbcType=BIGINT},
  368. </if>
  369. <if test="record.openid != null">
  370. #{record.openid,jdbcType=VARCHAR},
  371. </if>
  372. <if test="record.unionid != null">
  373. #{record.unionid,jdbcType=VARCHAR},
  374. </if>
  375. <if test="record.visitor != null">
  376. #{record.visitor,jdbcType=VARCHAR},
  377. </if>
  378. <if test="record.nickname != null">
  379. #{record.nickname,jdbcType=VARCHAR},
  380. </if>
  381. <if test="record.sex != null">
  382. #{record.sex,jdbcType=CHAR},
  383. </if>
  384. <if test="record.mobile != null">
  385. #{record.mobile,jdbcType=CHAR},
  386. </if>
  387. <if test="record.avatar != null">
  388. #{record.avatar,jdbcType=VARCHAR},
  389. </if>
  390. <if test="record.isSubscribe != null">
  391. #{record.isSubscribe,jdbcType=CHAR},
  392. </if>
  393. <if test="record.subscriptionExtend != null">
  394. #{record.subscriptionExtend,jdbcType=CHAR},
  395. </if>
  396. <if test="record.subscribeTime != null">
  397. #{record.subscribeTime,jdbcType=INTEGER},
  398. </if>
  399. <if test="record.bookCategoryIds != null">
  400. #{record.bookCategoryIds,jdbcType=VARCHAR},
  401. </if>
  402. <if test="record.operateTime != null">
  403. #{record.operateTime,jdbcType=INTEGER},
  404. </if>
  405. <if test="record.isPay != null">
  406. #{record.isPay,jdbcType=CHAR},
  407. </if>
  408. <if test="record.kandian != null">
  409. #{record.kandian,jdbcType=INTEGER},
  410. </if>
  411. <if test="record.freeKandian != null">
  412. #{record.freeKandian,jdbcType=INTEGER},
  413. </if>
  414. <if test="record.vipEndtime != null">
  415. #{record.vipEndtime,jdbcType=INTEGER},
  416. </if>
  417. <if test="record.registerIp != null">
  418. #{record.registerIp,jdbcType=VARCHAR},
  419. </if>
  420. <if test="record.country != null">
  421. #{record.country,jdbcType=VARCHAR},
  422. </if>
  423. <if test="record.area != null">
  424. #{record.area,jdbcType=VARCHAR},
  425. </if>
  426. <if test="record.province != null">
  427. #{record.province,jdbcType=VARCHAR},
  428. </if>
  429. <if test="record.city != null">
  430. #{record.city,jdbcType=VARCHAR},
  431. </if>
  432. <if test="record.isp != null">
  433. #{record.isp,jdbcType=VARCHAR},
  434. </if>
  435. <if test="record.channelId != null">
  436. #{record.channelId,jdbcType=INTEGER},
  437. </if>
  438. <if test="record.state != null">
  439. #{record.state,jdbcType=CHAR},
  440. </if>
  441. <if test="record.createtime != null">
  442. #{record.createtime,jdbcType=INTEGER},
  443. </if>
  444. <if test="record.updatetime != null">
  445. #{record.updatetime,jdbcType=INTEGER},
  446. </if>
  447. </trim>
  448. </otherwise>
  449. </choose>
  450. </insert>
  451. <select id="countByExample" parameterType="com.book.dao.cps.pojo.example.UserExample" resultType="java.lang.Long">
  452. <!--
  453. WARNING - @mbg.generated
  454. This element is automatically generated by MyBatis Generator, do not modify.
  455. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  456. -->
  457. select count(*) from user
  458. <if test="_parameter != null">
  459. <include refid="Example_Where_Clause" />
  460. </if>
  461. </select>
  462. <update id="updateByExampleSelective" parameterType="map">
  463. <!--
  464. WARNING - @mbg.generated
  465. This element is automatically generated by MyBatis Generator, do not modify.
  466. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  467. -->
  468. update user
  469. SET
  470. <choose>
  471. <when test="selective != null and selective.length > 0">
  472. <foreach collection="selective" item="column" separator=",">
  473. ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  474. </foreach>
  475. </when>
  476. <otherwise>
  477. <trim suffixOverrides=",">
  478. <if test="record.id != null">
  479. id = #{record.id,jdbcType=BIGINT},
  480. </if>
  481. <if test="record.openid != null">
  482. openid = #{record.openid,jdbcType=VARCHAR},
  483. </if>
  484. <if test="record.unionid != null">
  485. unionid = #{record.unionid,jdbcType=VARCHAR},
  486. </if>
  487. <if test="record.visitor != null">
  488. visitor = #{record.visitor,jdbcType=VARCHAR},
  489. </if>
  490. <if test="record.nickname != null">
  491. nickname = #{record.nickname,jdbcType=VARCHAR},
  492. </if>
  493. <if test="record.sex != null">
  494. sex = #{record.sex,jdbcType=CHAR},
  495. </if>
  496. <if test="record.mobile != null">
  497. mobile = #{record.mobile,jdbcType=CHAR},
  498. </if>
  499. <if test="record.avatar != null">
  500. avatar = #{record.avatar,jdbcType=VARCHAR},
  501. </if>
  502. <if test="record.isSubscribe != null">
  503. is_subscribe = #{record.isSubscribe,jdbcType=CHAR},
  504. </if>
  505. <if test="record.subscriptionExtend != null">
  506. subscription_extend = #{record.subscriptionExtend,jdbcType=CHAR},
  507. </if>
  508. <if test="record.subscribeTime != null">
  509. subscribe_time = #{record.subscribeTime,jdbcType=INTEGER},
  510. </if>
  511. <if test="record.bookCategoryIds != null">
  512. book_category_ids = #{record.bookCategoryIds,jdbcType=VARCHAR},
  513. </if>
  514. <if test="record.operateTime != null">
  515. operate_time = #{record.operateTime,jdbcType=INTEGER},
  516. </if>
  517. <if test="record.isPay != null">
  518. is_pay = #{record.isPay,jdbcType=CHAR},
  519. </if>
  520. <if test="record.kandian != null">
  521. kandian = #{record.kandian,jdbcType=INTEGER},
  522. </if>
  523. <if test="record.freeKandian != null">
  524. free_kandian = #{record.freeKandian,jdbcType=INTEGER},
  525. </if>
  526. <if test="record.vipEndtime != null">
  527. vip_endtime = #{record.vipEndtime,jdbcType=INTEGER},
  528. </if>
  529. <if test="record.registerIp != null">
  530. register_ip = #{record.registerIp,jdbcType=VARCHAR},
  531. </if>
  532. <if test="record.country != null">
  533. country = #{record.country,jdbcType=VARCHAR},
  534. </if>
  535. <if test="record.area != null">
  536. area = #{record.area,jdbcType=VARCHAR},
  537. </if>
  538. <if test="record.province != null">
  539. province = #{record.province,jdbcType=VARCHAR},
  540. </if>
  541. <if test="record.city != null">
  542. city = #{record.city,jdbcType=VARCHAR},
  543. </if>
  544. <if test="record.isp != null">
  545. isp = #{record.isp,jdbcType=VARCHAR},
  546. </if>
  547. <if test="record.channelId != null">
  548. channel_id = #{record.channelId,jdbcType=INTEGER},
  549. </if>
  550. <if test="record.state != null">
  551. state = #{record.state,jdbcType=CHAR},
  552. </if>
  553. <if test="record.createtime != null">
  554. createtime = #{record.createtime,jdbcType=INTEGER},
  555. </if>
  556. <if test="record.updatetime != null">
  557. updatetime = #{record.updatetime,jdbcType=INTEGER},
  558. </if>
  559. </trim>
  560. </otherwise>
  561. </choose>
  562. <if test="_parameter != null">
  563. <include refid="Update_By_Example_Where_Clause" />
  564. </if>
  565. </update>
  566. <update id="updateByExample" parameterType="map">
  567. <!--
  568. WARNING - @mbg.generated
  569. This element is automatically generated by MyBatis Generator, do not modify.
  570. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  571. -->
  572. update user
  573. set id = #{record.id,jdbcType=BIGINT},
  574. openid = #{record.openid,jdbcType=VARCHAR},
  575. unionid = #{record.unionid,jdbcType=VARCHAR},
  576. visitor = #{record.visitor,jdbcType=VARCHAR},
  577. nickname = #{record.nickname,jdbcType=VARCHAR},
  578. sex = #{record.sex,jdbcType=CHAR},
  579. mobile = #{record.mobile,jdbcType=CHAR},
  580. avatar = #{record.avatar,jdbcType=VARCHAR},
  581. is_subscribe = #{record.isSubscribe,jdbcType=CHAR},
  582. subscription_extend = #{record.subscriptionExtend,jdbcType=CHAR},
  583. subscribe_time = #{record.subscribeTime,jdbcType=INTEGER},
  584. book_category_ids = #{record.bookCategoryIds,jdbcType=VARCHAR},
  585. operate_time = #{record.operateTime,jdbcType=INTEGER},
  586. is_pay = #{record.isPay,jdbcType=CHAR},
  587. kandian = #{record.kandian,jdbcType=INTEGER},
  588. free_kandian = #{record.freeKandian,jdbcType=INTEGER},
  589. vip_endtime = #{record.vipEndtime,jdbcType=INTEGER},
  590. register_ip = #{record.registerIp,jdbcType=VARCHAR},
  591. country = #{record.country,jdbcType=VARCHAR},
  592. area = #{record.area,jdbcType=VARCHAR},
  593. province = #{record.province,jdbcType=VARCHAR},
  594. city = #{record.city,jdbcType=VARCHAR},
  595. isp = #{record.isp,jdbcType=VARCHAR},
  596. channel_id = #{record.channelId,jdbcType=INTEGER},
  597. state = #{record.state,jdbcType=CHAR},
  598. createtime = #{record.createtime,jdbcType=INTEGER},
  599. updatetime = #{record.updatetime,jdbcType=INTEGER}
  600. <if test="_parameter != null">
  601. <include refid="Update_By_Example_Where_Clause" />
  602. </if>
  603. </update>
  604. <update id="updateByPrimaryKeySelective" parameterType="map">
  605. <!--
  606. WARNING - @mbg.generated
  607. This element is automatically generated by MyBatis Generator, do not modify.
  608. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  609. -->
  610. update user
  611. SET
  612. <choose>
  613. <when test="selective != null and selective.length > 0">
  614. <foreach collection="selective" item="column" separator=",">
  615. ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  616. </foreach>
  617. </when>
  618. <otherwise>
  619. <trim suffixOverrides=",">
  620. <if test="record.openid != null">
  621. openid = #{record.openid,jdbcType=VARCHAR},
  622. </if>
  623. <if test="record.unionid != null">
  624. unionid = #{record.unionid,jdbcType=VARCHAR},
  625. </if>
  626. <if test="record.visitor != null">
  627. visitor = #{record.visitor,jdbcType=VARCHAR},
  628. </if>
  629. <if test="record.nickname != null">
  630. nickname = #{record.nickname,jdbcType=VARCHAR},
  631. </if>
  632. <if test="record.sex != null">
  633. sex = #{record.sex,jdbcType=CHAR},
  634. </if>
  635. <if test="record.mobile != null">
  636. mobile = #{record.mobile,jdbcType=CHAR},
  637. </if>
  638. <if test="record.avatar != null">
  639. avatar = #{record.avatar,jdbcType=VARCHAR},
  640. </if>
  641. <if test="record.isSubscribe != null">
  642. is_subscribe = #{record.isSubscribe,jdbcType=CHAR},
  643. </if>
  644. <if test="record.subscriptionExtend != null">
  645. subscription_extend = #{record.subscriptionExtend,jdbcType=CHAR},
  646. </if>
  647. <if test="record.subscribeTime != null">
  648. subscribe_time = #{record.subscribeTime,jdbcType=INTEGER},
  649. </if>
  650. <if test="record.bookCategoryIds != null">
  651. book_category_ids = #{record.bookCategoryIds,jdbcType=VARCHAR},
  652. </if>
  653. <if test="record.operateTime != null">
  654. operate_time = #{record.operateTime,jdbcType=INTEGER},
  655. </if>
  656. <if test="record.isPay != null">
  657. is_pay = #{record.isPay,jdbcType=CHAR},
  658. </if>
  659. <if test="record.kandian != null">
  660. kandian = #{record.kandian,jdbcType=INTEGER},
  661. </if>
  662. <if test="record.freeKandian != null">
  663. free_kandian = #{record.freeKandian,jdbcType=INTEGER},
  664. </if>
  665. <if test="record.vipEndtime != null">
  666. vip_endtime = #{record.vipEndtime,jdbcType=INTEGER},
  667. </if>
  668. <if test="record.registerIp != null">
  669. register_ip = #{record.registerIp,jdbcType=VARCHAR},
  670. </if>
  671. <if test="record.country != null">
  672. country = #{record.country,jdbcType=VARCHAR},
  673. </if>
  674. <if test="record.area != null">
  675. area = #{record.area,jdbcType=VARCHAR},
  676. </if>
  677. <if test="record.province != null">
  678. province = #{record.province,jdbcType=VARCHAR},
  679. </if>
  680. <if test="record.city != null">
  681. city = #{record.city,jdbcType=VARCHAR},
  682. </if>
  683. <if test="record.isp != null">
  684. isp = #{record.isp,jdbcType=VARCHAR},
  685. </if>
  686. <if test="record.channelId != null">
  687. channel_id = #{record.channelId,jdbcType=INTEGER},
  688. </if>
  689. <if test="record.state != null">
  690. state = #{record.state,jdbcType=CHAR},
  691. </if>
  692. <if test="record.createtime != null">
  693. createtime = #{record.createtime,jdbcType=INTEGER},
  694. </if>
  695. <if test="record.updatetime != null">
  696. updatetime = #{record.updatetime,jdbcType=INTEGER},
  697. </if>
  698. </trim>
  699. </otherwise>
  700. </choose>
  701. where id = #{record.id,jdbcType=BIGINT}
  702. </update>
  703. <update id="updateByPrimaryKey" parameterType="com.book.dao.cps.pojo.User">
  704. <!--
  705. WARNING - @mbg.generated
  706. This element is automatically generated by MyBatis Generator, do not modify.
  707. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  708. -->
  709. update user
  710. set openid = #{openid,jdbcType=VARCHAR},
  711. unionid = #{unionid,jdbcType=VARCHAR},
  712. visitor = #{visitor,jdbcType=VARCHAR},
  713. nickname = #{nickname,jdbcType=VARCHAR},
  714. sex = #{sex,jdbcType=CHAR},
  715. mobile = #{mobile,jdbcType=CHAR},
  716. avatar = #{avatar,jdbcType=VARCHAR},
  717. is_subscribe = #{isSubscribe,jdbcType=CHAR},
  718. subscription_extend = #{subscriptionExtend,jdbcType=CHAR},
  719. subscribe_time = #{subscribeTime,jdbcType=INTEGER},
  720. book_category_ids = #{bookCategoryIds,jdbcType=VARCHAR},
  721. operate_time = #{operateTime,jdbcType=INTEGER},
  722. is_pay = #{isPay,jdbcType=CHAR},
  723. kandian = #{kandian,jdbcType=INTEGER},
  724. free_kandian = #{freeKandian,jdbcType=INTEGER},
  725. vip_endtime = #{vipEndtime,jdbcType=INTEGER},
  726. register_ip = #{registerIp,jdbcType=VARCHAR},
  727. country = #{country,jdbcType=VARCHAR},
  728. area = #{area,jdbcType=VARCHAR},
  729. province = #{province,jdbcType=VARCHAR},
  730. city = #{city,jdbcType=VARCHAR},
  731. isp = #{isp,jdbcType=VARCHAR},
  732. channel_id = #{channelId,jdbcType=INTEGER},
  733. state = #{state,jdbcType=CHAR},
  734. createtime = #{createtime,jdbcType=INTEGER},
  735. updatetime = #{updatetime,jdbcType=INTEGER}
  736. where id = #{id,jdbcType=BIGINT}
  737. </update>
  738. <select id="selectOneByExample" parameterType="com.book.dao.cps.pojo.example.UserExample" resultMap="BaseResultMap">
  739. <!--
  740. WARNING - @mbg.generated
  741. This element is automatically generated by MyBatis Generator, do not modify.
  742. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  743. -->
  744. select
  745. <include refid="Base_Column_List" />
  746. from user
  747. <if test="_parameter != null">
  748. <include refid="Example_Where_Clause" />
  749. </if>
  750. <if test="orderByClause != null">
  751. order by ${orderByClause}
  752. </if>
  753. limit 1
  754. </select>
  755. <select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
  756. <!--
  757. WARNING - @mbg.generated
  758. This element is automatically generated by MyBatis Generator, do not modify.
  759. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  760. -->
  761. select
  762. <choose>
  763. <when test="selective != null and selective.length > 0">
  764. <foreach collection="selective" item="column" separator=",">
  765. ${column.aliasedEscapedColumnName}
  766. </foreach>
  767. </when>
  768. <otherwise>
  769. <include refid="Base_Column_List" />
  770. </otherwise>
  771. </choose>
  772. from user
  773. <if test="example != null">
  774. <include refid="Update_By_Example_Where_Clause" />
  775. </if>
  776. <if test="example != null and example.orderByClause != null">
  777. order by ${example.orderByClause}
  778. </if>
  779. limit 1
  780. </select>
  781. <insert id="batchInsert" parameterType="map">
  782. <!--
  783. WARNING - @mbg.generated
  784. This element is automatically generated by MyBatis Generator, do not modify.
  785. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  786. -->
  787. insert into user
  788. (id, openid, unionid, visitor, nickname, sex, mobile, avatar, is_subscribe, subscription_extend,
  789. subscribe_time, book_category_ids, operate_time, is_pay, kandian, free_kandian,
  790. vip_endtime, register_ip, country, area, province, city, isp, channel_id, state,
  791. createtime, updatetime)
  792. values
  793. <foreach collection="list" item="item" separator=",">
  794. (#{item.id,jdbcType=BIGINT}, #{item.openid,jdbcType=VARCHAR}, #{item.unionid,jdbcType=VARCHAR},
  795. #{item.visitor,jdbcType=VARCHAR}, #{item.nickname,jdbcType=VARCHAR}, #{item.sex,jdbcType=CHAR},
  796. #{item.mobile,jdbcType=CHAR}, #{item.avatar,jdbcType=VARCHAR}, #{item.isSubscribe,jdbcType=CHAR},
  797. #{item.subscriptionExtend,jdbcType=CHAR}, #{item.subscribeTime,jdbcType=INTEGER},
  798. #{item.bookCategoryIds,jdbcType=VARCHAR}, #{item.operateTime,jdbcType=INTEGER},
  799. #{item.isPay,jdbcType=CHAR}, #{item.kandian,jdbcType=INTEGER}, #{item.freeKandian,jdbcType=INTEGER},
  800. #{item.vipEndtime,jdbcType=INTEGER}, #{item.registerIp,jdbcType=VARCHAR}, #{item.country,jdbcType=VARCHAR},
  801. #{item.area,jdbcType=VARCHAR}, #{item.province,jdbcType=VARCHAR}, #{item.city,jdbcType=VARCHAR},
  802. #{item.isp,jdbcType=VARCHAR}, #{item.channelId,jdbcType=INTEGER}, #{item.state,jdbcType=CHAR},
  803. #{item.createtime,jdbcType=INTEGER}, #{item.updatetime,jdbcType=INTEGER})
  804. </foreach>
  805. </insert>
  806. <insert id="batchInsertSelective" parameterType="map">
  807. <!--
  808. WARNING - @mbg.generated
  809. This element is automatically generated by MyBatis Generator, do not modify.
  810. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  811. -->
  812. insert into user (
  813. <foreach collection="selective" item="column" separator=",">
  814. ${column.escapedColumnName}
  815. </foreach>
  816. )
  817. values
  818. <foreach collection="list" item="item" separator=",">
  819. (
  820. <foreach collection="selective" item="column" separator=",">
  821. <if test="'id'.toString() == column.value">
  822. #{item.id,jdbcType=BIGINT}
  823. </if>
  824. <if test="'openid'.toString() == column.value">
  825. #{item.openid,jdbcType=VARCHAR}
  826. </if>
  827. <if test="'unionid'.toString() == column.value">
  828. #{item.unionid,jdbcType=VARCHAR}
  829. </if>
  830. <if test="'visitor'.toString() == column.value">
  831. #{item.visitor,jdbcType=VARCHAR}
  832. </if>
  833. <if test="'nickname'.toString() == column.value">
  834. #{item.nickname,jdbcType=VARCHAR}
  835. </if>
  836. <if test="'sex'.toString() == column.value">
  837. #{item.sex,jdbcType=CHAR}
  838. </if>
  839. <if test="'mobile'.toString() == column.value">
  840. #{item.mobile,jdbcType=CHAR}
  841. </if>
  842. <if test="'avatar'.toString() == column.value">
  843. #{item.avatar,jdbcType=VARCHAR}
  844. </if>
  845. <if test="'is_subscribe'.toString() == column.value">
  846. #{item.isSubscribe,jdbcType=CHAR}
  847. </if>
  848. <if test="'subscription_extend'.toString() == column.value">
  849. #{item.subscriptionExtend,jdbcType=CHAR}
  850. </if>
  851. <if test="'subscribe_time'.toString() == column.value">
  852. #{item.subscribeTime,jdbcType=INTEGER}
  853. </if>
  854. <if test="'book_category_ids'.toString() == column.value">
  855. #{item.bookCategoryIds,jdbcType=VARCHAR}
  856. </if>
  857. <if test="'operate_time'.toString() == column.value">
  858. #{item.operateTime,jdbcType=INTEGER}
  859. </if>
  860. <if test="'is_pay'.toString() == column.value">
  861. #{item.isPay,jdbcType=CHAR}
  862. </if>
  863. <if test="'kandian'.toString() == column.value">
  864. #{item.kandian,jdbcType=INTEGER}
  865. </if>
  866. <if test="'free_kandian'.toString() == column.value">
  867. #{item.freeKandian,jdbcType=INTEGER}
  868. </if>
  869. <if test="'vip_endtime'.toString() == column.value">
  870. #{item.vipEndtime,jdbcType=INTEGER}
  871. </if>
  872. <if test="'register_ip'.toString() == column.value">
  873. #{item.registerIp,jdbcType=VARCHAR}
  874. </if>
  875. <if test="'country'.toString() == column.value">
  876. #{item.country,jdbcType=VARCHAR}
  877. </if>
  878. <if test="'area'.toString() == column.value">
  879. #{item.area,jdbcType=VARCHAR}
  880. </if>
  881. <if test="'province'.toString() == column.value">
  882. #{item.province,jdbcType=VARCHAR}
  883. </if>
  884. <if test="'city'.toString() == column.value">
  885. #{item.city,jdbcType=VARCHAR}
  886. </if>
  887. <if test="'isp'.toString() == column.value">
  888. #{item.isp,jdbcType=VARCHAR}
  889. </if>
  890. <if test="'channel_id'.toString() == column.value">
  891. #{item.channelId,jdbcType=INTEGER}
  892. </if>
  893. <if test="'state'.toString() == column.value">
  894. #{item.state,jdbcType=CHAR}
  895. </if>
  896. <if test="'createtime'.toString() == column.value">
  897. #{item.createtime,jdbcType=INTEGER}
  898. </if>
  899. <if test="'updatetime'.toString() == column.value">
  900. #{item.updatetime,jdbcType=INTEGER}
  901. </if>
  902. </foreach>
  903. )
  904. </foreach>
  905. </insert>
  906. <insert id="upsertSelective" parameterType="map">
  907. <!--
  908. WARNING - @mbg.generated
  909. This element is automatically generated by MyBatis Generator, do not modify.
  910. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  911. -->
  912. insert into user
  913. <choose>
  914. <when test="selective != null and selective.length > 0">
  915. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  916. ${column.escapedColumnName}
  917. </foreach>
  918. </when>
  919. <otherwise>
  920. <trim prefix="(" suffix=")" suffixOverrides=",">
  921. <if test="record.id != null">
  922. id,
  923. </if>
  924. <if test="record.openid != null">
  925. openid,
  926. </if>
  927. <if test="record.unionid != null">
  928. unionid,
  929. </if>
  930. <if test="record.visitor != null">
  931. visitor,
  932. </if>
  933. <if test="record.nickname != null">
  934. nickname,
  935. </if>
  936. <if test="record.sex != null">
  937. sex,
  938. </if>
  939. <if test="record.mobile != null">
  940. mobile,
  941. </if>
  942. <if test="record.avatar != null">
  943. avatar,
  944. </if>
  945. <if test="record.isSubscribe != null">
  946. is_subscribe,
  947. </if>
  948. <if test="record.subscriptionExtend != null">
  949. subscription_extend,
  950. </if>
  951. <if test="record.subscribeTime != null">
  952. subscribe_time,
  953. </if>
  954. <if test="record.bookCategoryIds != null">
  955. book_category_ids,
  956. </if>
  957. <if test="record.operateTime != null">
  958. operate_time,
  959. </if>
  960. <if test="record.isPay != null">
  961. is_pay,
  962. </if>
  963. <if test="record.kandian != null">
  964. kandian,
  965. </if>
  966. <if test="record.freeKandian != null">
  967. free_kandian,
  968. </if>
  969. <if test="record.vipEndtime != null">
  970. vip_endtime,
  971. </if>
  972. <if test="record.registerIp != null">
  973. register_ip,
  974. </if>
  975. <if test="record.country != null">
  976. country,
  977. </if>
  978. <if test="record.area != null">
  979. area,
  980. </if>
  981. <if test="record.province != null">
  982. province,
  983. </if>
  984. <if test="record.city != null">
  985. city,
  986. </if>
  987. <if test="record.isp != null">
  988. isp,
  989. </if>
  990. <if test="record.channelId != null">
  991. channel_id,
  992. </if>
  993. <if test="record.state != null">
  994. state,
  995. </if>
  996. <if test="record.createtime != null">
  997. createtime,
  998. </if>
  999. <if test="record.updatetime != null">
  1000. updatetime,
  1001. </if>
  1002. </trim>
  1003. <trim prefix="(" suffix=")" suffixOverrides="," />
  1004. </otherwise>
  1005. </choose>
  1006. values
  1007. <choose>
  1008. <when test="selective != null and selective.length > 0">
  1009. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  1010. #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  1011. </foreach>
  1012. </when>
  1013. <otherwise>
  1014. <trim prefix="(" suffix=")" suffixOverrides=",">
  1015. <if test="record.id != null">
  1016. #{record.id,jdbcType=BIGINT},
  1017. </if>
  1018. <if test="record.openid != null">
  1019. #{record.openid,jdbcType=VARCHAR},
  1020. </if>
  1021. <if test="record.unionid != null">
  1022. #{record.unionid,jdbcType=VARCHAR},
  1023. </if>
  1024. <if test="record.visitor != null">
  1025. #{record.visitor,jdbcType=VARCHAR},
  1026. </if>
  1027. <if test="record.nickname != null">
  1028. #{record.nickname,jdbcType=VARCHAR},
  1029. </if>
  1030. <if test="record.sex != null">
  1031. #{record.sex,jdbcType=CHAR},
  1032. </if>
  1033. <if test="record.mobile != null">
  1034. #{record.mobile,jdbcType=CHAR},
  1035. </if>
  1036. <if test="record.avatar != null">
  1037. #{record.avatar,jdbcType=VARCHAR},
  1038. </if>
  1039. <if test="record.isSubscribe != null">
  1040. #{record.isSubscribe,jdbcType=CHAR},
  1041. </if>
  1042. <if test="record.subscriptionExtend != null">
  1043. #{record.subscriptionExtend,jdbcType=CHAR},
  1044. </if>
  1045. <if test="record.subscribeTime != null">
  1046. #{record.subscribeTime,jdbcType=INTEGER},
  1047. </if>
  1048. <if test="record.bookCategoryIds != null">
  1049. #{record.bookCategoryIds,jdbcType=VARCHAR},
  1050. </if>
  1051. <if test="record.operateTime != null">
  1052. #{record.operateTime,jdbcType=INTEGER},
  1053. </if>
  1054. <if test="record.isPay != null">
  1055. #{record.isPay,jdbcType=CHAR},
  1056. </if>
  1057. <if test="record.kandian != null">
  1058. #{record.kandian,jdbcType=INTEGER},
  1059. </if>
  1060. <if test="record.freeKandian != null">
  1061. #{record.freeKandian,jdbcType=INTEGER},
  1062. </if>
  1063. <if test="record.vipEndtime != null">
  1064. #{record.vipEndtime,jdbcType=INTEGER},
  1065. </if>
  1066. <if test="record.registerIp != null">
  1067. #{record.registerIp,jdbcType=VARCHAR},
  1068. </if>
  1069. <if test="record.country != null">
  1070. #{record.country,jdbcType=VARCHAR},
  1071. </if>
  1072. <if test="record.area != null">
  1073. #{record.area,jdbcType=VARCHAR},
  1074. </if>
  1075. <if test="record.province != null">
  1076. #{record.province,jdbcType=VARCHAR},
  1077. </if>
  1078. <if test="record.city != null">
  1079. #{record.city,jdbcType=VARCHAR},
  1080. </if>
  1081. <if test="record.isp != null">
  1082. #{record.isp,jdbcType=VARCHAR},
  1083. </if>
  1084. <if test="record.channelId != null">
  1085. #{record.channelId,jdbcType=INTEGER},
  1086. </if>
  1087. <if test="record.state != null">
  1088. #{record.state,jdbcType=CHAR},
  1089. </if>
  1090. <if test="record.createtime != null">
  1091. #{record.createtime,jdbcType=INTEGER},
  1092. </if>
  1093. <if test="record.updatetime != null">
  1094. #{record.updatetime,jdbcType=INTEGER},
  1095. </if>
  1096. </trim>
  1097. </otherwise>
  1098. </choose>
  1099. on duplicate key update
  1100. <choose>
  1101. <when test="selective != null and selective.length > 0">
  1102. <foreach collection="selective" item="column" separator=",">
  1103. ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  1104. </foreach>
  1105. </when>
  1106. <otherwise>
  1107. <trim suffixOverrides=",">
  1108. <if test="record.id != null">
  1109. id = #{record.id,jdbcType=BIGINT},
  1110. </if>
  1111. <if test="record.openid != null">
  1112. openid = #{record.openid,jdbcType=VARCHAR},
  1113. </if>
  1114. <if test="record.unionid != null">
  1115. unionid = #{record.unionid,jdbcType=VARCHAR},
  1116. </if>
  1117. <if test="record.visitor != null">
  1118. visitor = #{record.visitor,jdbcType=VARCHAR},
  1119. </if>
  1120. <if test="record.nickname != null">
  1121. nickname = #{record.nickname,jdbcType=VARCHAR},
  1122. </if>
  1123. <if test="record.sex != null">
  1124. sex = #{record.sex,jdbcType=CHAR},
  1125. </if>
  1126. <if test="record.mobile != null">
  1127. mobile = #{record.mobile,jdbcType=CHAR},
  1128. </if>
  1129. <if test="record.avatar != null">
  1130. avatar = #{record.avatar,jdbcType=VARCHAR},
  1131. </if>
  1132. <if test="record.isSubscribe != null">
  1133. is_subscribe = #{record.isSubscribe,jdbcType=CHAR},
  1134. </if>
  1135. <if test="record.subscriptionExtend != null">
  1136. subscription_extend = #{record.subscriptionExtend,jdbcType=CHAR},
  1137. </if>
  1138. <if test="record.subscribeTime != null">
  1139. subscribe_time = #{record.subscribeTime,jdbcType=INTEGER},
  1140. </if>
  1141. <if test="record.bookCategoryIds != null">
  1142. book_category_ids = #{record.bookCategoryIds,jdbcType=VARCHAR},
  1143. </if>
  1144. <if test="record.operateTime != null">
  1145. operate_time = #{record.operateTime,jdbcType=INTEGER},
  1146. </if>
  1147. <if test="record.isPay != null">
  1148. is_pay = #{record.isPay,jdbcType=CHAR},
  1149. </if>
  1150. <if test="record.kandian != null">
  1151. kandian = #{record.kandian,jdbcType=INTEGER},
  1152. </if>
  1153. <if test="record.freeKandian != null">
  1154. free_kandian = #{record.freeKandian,jdbcType=INTEGER},
  1155. </if>
  1156. <if test="record.vipEndtime != null">
  1157. vip_endtime = #{record.vipEndtime,jdbcType=INTEGER},
  1158. </if>
  1159. <if test="record.registerIp != null">
  1160. register_ip = #{record.registerIp,jdbcType=VARCHAR},
  1161. </if>
  1162. <if test="record.country != null">
  1163. country = #{record.country,jdbcType=VARCHAR},
  1164. </if>
  1165. <if test="record.area != null">
  1166. area = #{record.area,jdbcType=VARCHAR},
  1167. </if>
  1168. <if test="record.province != null">
  1169. province = #{record.province,jdbcType=VARCHAR},
  1170. </if>
  1171. <if test="record.city != null">
  1172. city = #{record.city,jdbcType=VARCHAR},
  1173. </if>
  1174. <if test="record.isp != null">
  1175. isp = #{record.isp,jdbcType=VARCHAR},
  1176. </if>
  1177. <if test="record.channelId != null">
  1178. channel_id = #{record.channelId,jdbcType=INTEGER},
  1179. </if>
  1180. <if test="record.state != null">
  1181. state = #{record.state,jdbcType=CHAR},
  1182. </if>
  1183. <if test="record.createtime != null">
  1184. createtime = #{record.createtime,jdbcType=INTEGER},
  1185. </if>
  1186. <if test="record.updatetime != null">
  1187. updatetime = #{record.updatetime,jdbcType=INTEGER},
  1188. </if>
  1189. </trim>
  1190. </otherwise>
  1191. </choose>
  1192. </insert>
  1193. <insert id="upsert" parameterType="com.book.dao.cps.pojo.User">
  1194. <!--
  1195. WARNING - @mbg.generated
  1196. This element is automatically generated by MyBatis Generator, do not modify.
  1197. This element was generated on Tue Aug 17 22:19:18 CST 2021.
  1198. -->
  1199. insert into user
  1200. (id, openid, unionid, visitor, nickname, sex, mobile, avatar, is_subscribe, subscription_extend,
  1201. subscribe_time, book_category_ids, operate_time, is_pay, kandian, free_kandian,
  1202. vip_endtime, register_ip, country, area, province, city, isp, channel_id, state,
  1203. createtime, updatetime)
  1204. values
  1205. (#{id,jdbcType=BIGINT}, #{openid,jdbcType=VARCHAR}, #{unionid,jdbcType=VARCHAR},
  1206. #{visitor,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{sex,jdbcType=CHAR},
  1207. #{mobile,jdbcType=CHAR}, #{avatar,jdbcType=VARCHAR}, #{isSubscribe,jdbcType=CHAR},
  1208. #{subscriptionExtend,jdbcType=CHAR}, #{subscribeTime,jdbcType=INTEGER}, #{bookCategoryIds,jdbcType=VARCHAR},
  1209. #{operateTime,jdbcType=INTEGER}, #{isPay,jdbcType=CHAR}, #{kandian,jdbcType=INTEGER},
  1210. #{freeKandian,jdbcType=INTEGER}, #{vipEndtime,jdbcType=INTEGER}, #{registerIp,jdbcType=VARCHAR},
  1211. #{country,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR},
  1212. #{city,jdbcType=VARCHAR}, #{isp,jdbcType=VARCHAR}, #{channelId,jdbcType=INTEGER},
  1213. #{state,jdbcType=CHAR}, #{createtime,jdbcType=INTEGER}, #{updatetime,jdbcType=INTEGER}
  1214. )
  1215. on duplicate key update
  1216. id = #{id,jdbcType=BIGINT},
  1217. openid = #{openid,jdbcType=VARCHAR},
  1218. unionid = #{unionid,jdbcType=VARCHAR},
  1219. visitor = #{visitor,jdbcType=VARCHAR},
  1220. nickname = #{nickname,jdbcType=VARCHAR},
  1221. sex = #{sex,jdbcType=CHAR},
  1222. mobile = #{mobile,jdbcType=CHAR},
  1223. avatar = #{avatar,jdbcType=VARCHAR},
  1224. is_subscribe = #{isSubscribe,jdbcType=CHAR},
  1225. subscription_extend = #{subscriptionExtend,jdbcType=CHAR},
  1226. subscribe_time = #{subscribeTime,jdbcType=INTEGER},
  1227. book_category_ids = #{bookCategoryIds,jdbcType=VARCHAR},
  1228. operate_time = #{operateTime,jdbcType=INTEGER},
  1229. is_pay = #{isPay,jdbcType=CHAR},
  1230. kandian = #{kandian,jdbcType=INTEGER},
  1231. free_kandian = #{freeKandian,jdbcType=INTEGER},
  1232. vip_endtime = #{vipEndtime,jdbcType=INTEGER},
  1233. register_ip = #{registerIp,jdbcType=VARCHAR},
  1234. country = #{country,jdbcType=VARCHAR},
  1235. area = #{area,jdbcType=VARCHAR},
  1236. province = #{province,jdbcType=VARCHAR},
  1237. city = #{city,jdbcType=VARCHAR},
  1238. isp = #{isp,jdbcType=VARCHAR},
  1239. channel_id = #{channelId,jdbcType=INTEGER},
  1240. state = #{state,jdbcType=CHAR},
  1241. createtime = #{createtime,jdbcType=INTEGER},
  1242. updatetime = #{updatetime,jdbcType=INTEGER}
  1243. </insert>
  1244. </mapper>