SunStaticIncomeMapper.xml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  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.dao.polardb.mapper.SunStaticIncomeMapper">
  4. <resultMap id="BaseResultMap" type="com.book.dao.polardb.entity.SunStaticIncome">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="static_date" jdbcType="VARCHAR" property="staticDate" />
  12. <result column="new_user_count" jdbcType="INTEGER" property="newUserCount" />
  13. <result column="new_follow_count" jdbcType="INTEGER" property="newFollowCount" />
  14. <result column="new_recharge_sum" jdbcType="VARCHAR" property="newRechargeSum" />
  15. <result column="all_spend" jdbcType="VARCHAR" property="allSpend" />
  16. <result column="first_roi" jdbcType="VARCHAR" property="firstRoi" />
  17. <result column="all_recharge" jdbcType="VARCHAR" property="allRecharge" />
  18. <result column="all_roi" jdbcType="VARCHAR" property="allRoi" />
  19. <result column="insert_time" jdbcType="TIMESTAMP" property="insertTime" />
  20. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  21. </resultMap>
  22. <sql id="Example_Where_Clause">
  23. <!--
  24. WARNING - @mbg.generated
  25. This element is automatically generated by MyBatis Generator, do not modify.
  26. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  27. -->
  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. <!--
  58. WARNING - @mbg.generated
  59. This element is automatically generated by MyBatis Generator, do not modify.
  60. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  61. -->
  62. <where>
  63. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  64. <if test="criteria.valid">
  65. <trim prefix="(" prefixOverrides="and" suffix=")">
  66. <foreach collection="criteria.criteria" item="criterion">
  67. <choose>
  68. <when test="criterion.noValue">
  69. and ${criterion.condition}
  70. </when>
  71. <when test="criterion.singleValue">
  72. and ${criterion.condition} #{criterion.value}
  73. </when>
  74. <when test="criterion.betweenValue">
  75. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  76. </when>
  77. <when test="criterion.listValue">
  78. and ${criterion.condition}
  79. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  80. #{listItem}
  81. </foreach>
  82. </when>
  83. </choose>
  84. </foreach>
  85. </trim>
  86. </if>
  87. </foreach>
  88. </where>
  89. </sql>
  90. <sql id="Base_Column_List">
  91. <!--
  92. WARNING - @mbg.generated
  93. This element is automatically generated by MyBatis Generator, do not modify.
  94. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  95. -->
  96. id, static_date, new_user_count, new_follow_count, new_recharge_sum, all_spend, first_roi,
  97. all_recharge, all_roi, insert_time, update_time
  98. </sql>
  99. <select id="selectByExample" parameterType="com.book.dao.polardb.pojo.example.SunStaticIncomeExample" resultMap="BaseResultMap">
  100. <!--
  101. WARNING - @mbg.generated
  102. This element is automatically generated by MyBatis Generator, do not modify.
  103. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  104. -->
  105. select
  106. <if test="distinct">
  107. distinct
  108. </if>
  109. <include refid="Base_Column_List" />
  110. from sun_static_income
  111. <if test="_parameter != null">
  112. <include refid="Example_Where_Clause" />
  113. </if>
  114. <if test="orderByClause != null">
  115. order by ${orderByClause}
  116. </if>
  117. <if test="rows != null">
  118. <if test="offset != null">
  119. limit ${offset}, ${rows}
  120. </if>
  121. <if test="offset == null">
  122. limit ${rows}
  123. </if>
  124. </if>
  125. </select>
  126. <select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
  127. <!--
  128. WARNING - @mbg.generated
  129. This element is automatically generated by MyBatis Generator, do not modify.
  130. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  131. -->
  132. select
  133. <if test="example != null and example.distinct">
  134. distinct
  135. </if>
  136. <choose>
  137. <when test="selective != null and selective.length &gt; 0">
  138. <foreach collection="selective" item="column" separator=",">
  139. ${column.aliasedEscapedColumnName}
  140. </foreach>
  141. </when>
  142. <otherwise>
  143. <include refid="Base_Column_List" />
  144. </otherwise>
  145. </choose>
  146. from sun_static_income
  147. <if test="example != null">
  148. <include refid="Update_By_Example_Where_Clause" />
  149. </if>
  150. <if test="example != null and example.orderByClause != null">
  151. order by ${example.orderByClause}
  152. </if>
  153. <if test="example != null and example.rows != null">
  154. <if test="example.offset != null">
  155. limit ${example.offset}, ${example.rows}
  156. </if>
  157. <if test="example.offset == null">
  158. limit ${example.rows}
  159. </if>
  160. </if>
  161. </select>
  162. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  163. <!--
  164. WARNING - @mbg.generated
  165. This element is automatically generated by MyBatis Generator, do not modify.
  166. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  167. -->
  168. select
  169. <include refid="Base_Column_List" />
  170. from sun_static_income
  171. where id = #{id,jdbcType=INTEGER}
  172. </select>
  173. <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
  174. <!--
  175. WARNING - @mbg.generated
  176. This element is automatically generated by MyBatis Generator, do not modify.
  177. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  178. -->
  179. select
  180. <choose>
  181. <when test="selective != null and selective.length &gt; 0">
  182. <foreach collection="selective" item="column" separator=",">
  183. ${column.aliasedEscapedColumnName}
  184. </foreach>
  185. </when>
  186. <otherwise>
  187. <include refid="Base_Column_List" />
  188. </otherwise>
  189. </choose>
  190. from sun_static_income
  191. where id = #{id,jdbcType=INTEGER}
  192. </select>
  193. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  194. <!--
  195. WARNING - @mbg.generated
  196. This element is automatically generated by MyBatis Generator, do not modify.
  197. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  198. -->
  199. delete from sun_static_income
  200. where id = #{id,jdbcType=INTEGER}
  201. </delete>
  202. <delete id="deleteByExample" parameterType="com.book.dao.polardb.pojo.example.SunStaticIncomeExample">
  203. <!--
  204. WARNING - @mbg.generated
  205. This element is automatically generated by MyBatis Generator, do not modify.
  206. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  207. -->
  208. delete from sun_static_income
  209. <if test="_parameter != null">
  210. <include refid="Example_Where_Clause" />
  211. </if>
  212. </delete>
  213. <insert id="insert" parameterType="com.book.dao.polardb.entity.SunStaticIncome">
  214. <!--
  215. WARNING - @mbg.generated
  216. This element is automatically generated by MyBatis Generator, do not modify.
  217. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  218. -->
  219. insert into sun_static_income (id, static_date, new_user_count,
  220. new_follow_count, new_recharge_sum, all_spend,
  221. first_roi, all_recharge, all_roi,
  222. insert_time, update_time)
  223. values (#{id,jdbcType=INTEGER}, #{staticDate,jdbcType=VARCHAR}, #{newUserCount,jdbcType=INTEGER},
  224. #{newFollowCount,jdbcType=INTEGER}, #{newRechargeSum,jdbcType=VARCHAR}, #{allSpend,jdbcType=VARCHAR},
  225. #{firstRoi,jdbcType=VARCHAR}, #{allRecharge,jdbcType=VARCHAR}, #{allRoi,jdbcType=VARCHAR},
  226. #{insertTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
  227. </insert>
  228. <insert id="insertSelective" parameterType="map">
  229. <!--
  230. WARNING - @mbg.generated
  231. This element is automatically generated by MyBatis Generator, do not modify.
  232. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  233. -->
  234. insert into sun_static_income
  235. <choose>
  236. <when test="selective != null and selective.length &gt; 0">
  237. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  238. ${column.escapedColumnName}
  239. </foreach>
  240. </when>
  241. <otherwise>
  242. <trim prefix="(" suffix=")" suffixOverrides=",">
  243. <if test="record.id != null">
  244. id,
  245. </if>
  246. <if test="record.staticDate != null">
  247. static_date,
  248. </if>
  249. <if test="record.newUserCount != null">
  250. new_user_count,
  251. </if>
  252. <if test="record.newFollowCount != null">
  253. new_follow_count,
  254. </if>
  255. <if test="record.newRechargeSum != null">
  256. new_recharge_sum,
  257. </if>
  258. <if test="record.allSpend != null">
  259. all_spend,
  260. </if>
  261. <if test="record.firstRoi != null">
  262. first_roi,
  263. </if>
  264. <if test="record.allRecharge != null">
  265. all_recharge,
  266. </if>
  267. <if test="record.allRoi != null">
  268. all_roi,
  269. </if>
  270. <if test="record.insertTime != null">
  271. insert_time,
  272. </if>
  273. <if test="record.updateTime != null">
  274. update_time,
  275. </if>
  276. </trim>
  277. <trim prefix="(" suffix=")" suffixOverrides="," />
  278. </otherwise>
  279. </choose>
  280. values
  281. <choose>
  282. <when test="selective != null and selective.length &gt; 0">
  283. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  284. #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  285. </foreach>
  286. </when>
  287. <otherwise>
  288. <trim prefix="(" suffix=")" suffixOverrides=",">
  289. <if test="record.id != null">
  290. #{record.id,jdbcType=INTEGER},
  291. </if>
  292. <if test="record.staticDate != null">
  293. #{record.staticDate,jdbcType=VARCHAR},
  294. </if>
  295. <if test="record.newUserCount != null">
  296. #{record.newUserCount,jdbcType=INTEGER},
  297. </if>
  298. <if test="record.newFollowCount != null">
  299. #{record.newFollowCount,jdbcType=INTEGER},
  300. </if>
  301. <if test="record.newRechargeSum != null">
  302. #{record.newRechargeSum,jdbcType=VARCHAR},
  303. </if>
  304. <if test="record.allSpend != null">
  305. #{record.allSpend,jdbcType=VARCHAR},
  306. </if>
  307. <if test="record.firstRoi != null">
  308. #{record.firstRoi,jdbcType=VARCHAR},
  309. </if>
  310. <if test="record.allRecharge != null">
  311. #{record.allRecharge,jdbcType=VARCHAR},
  312. </if>
  313. <if test="record.allRoi != null">
  314. #{record.allRoi,jdbcType=VARCHAR},
  315. </if>
  316. <if test="record.insertTime != null">
  317. #{record.insertTime,jdbcType=TIMESTAMP},
  318. </if>
  319. <if test="record.updateTime != null">
  320. #{record.updateTime,jdbcType=TIMESTAMP},
  321. </if>
  322. </trim>
  323. </otherwise>
  324. </choose>
  325. </insert>
  326. <select id="countByExample" parameterType="com.book.dao.polardb.pojo.example.SunStaticIncomeExample" resultType="java.lang.Long">
  327. <!--
  328. WARNING - @mbg.generated
  329. This element is automatically generated by MyBatis Generator, do not modify.
  330. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  331. -->
  332. select count(*) from sun_static_income
  333. <if test="_parameter != null">
  334. <include refid="Example_Where_Clause" />
  335. </if>
  336. </select>
  337. <update id="updateByExampleSelective" parameterType="map">
  338. <!--
  339. WARNING - @mbg.generated
  340. This element is automatically generated by MyBatis Generator, do not modify.
  341. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  342. -->
  343. update sun_static_income
  344. SET
  345. <choose>
  346. <when test="selective != null and selective.length &gt; 0">
  347. <foreach collection="selective" item="column" separator=",">
  348. ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  349. </foreach>
  350. </when>
  351. <otherwise>
  352. <trim suffixOverrides=",">
  353. <if test="record.id != null">
  354. id = #{record.id,jdbcType=INTEGER},
  355. </if>
  356. <if test="record.staticDate != null">
  357. static_date = #{record.staticDate,jdbcType=VARCHAR},
  358. </if>
  359. <if test="record.newUserCount != null">
  360. new_user_count = #{record.newUserCount,jdbcType=INTEGER},
  361. </if>
  362. <if test="record.newFollowCount != null">
  363. new_follow_count = #{record.newFollowCount,jdbcType=INTEGER},
  364. </if>
  365. <if test="record.newRechargeSum != null">
  366. new_recharge_sum = #{record.newRechargeSum,jdbcType=VARCHAR},
  367. </if>
  368. <if test="record.allSpend != null">
  369. all_spend = #{record.allSpend,jdbcType=VARCHAR},
  370. </if>
  371. <if test="record.firstRoi != null">
  372. first_roi = #{record.firstRoi,jdbcType=VARCHAR},
  373. </if>
  374. <if test="record.allRecharge != null">
  375. all_recharge = #{record.allRecharge,jdbcType=VARCHAR},
  376. </if>
  377. <if test="record.allRoi != null">
  378. all_roi = #{record.allRoi,jdbcType=VARCHAR},
  379. </if>
  380. <if test="record.insertTime != null">
  381. insert_time = #{record.insertTime,jdbcType=TIMESTAMP},
  382. </if>
  383. <if test="record.updateTime != null">
  384. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  385. </if>
  386. </trim>
  387. </otherwise>
  388. </choose>
  389. <if test="_parameter != null">
  390. <include refid="Update_By_Example_Where_Clause" />
  391. </if>
  392. </update>
  393. <update id="updateByExample" parameterType="map">
  394. <!--
  395. WARNING - @mbg.generated
  396. This element is automatically generated by MyBatis Generator, do not modify.
  397. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  398. -->
  399. update sun_static_income
  400. set id = #{record.id,jdbcType=INTEGER},
  401. static_date = #{record.staticDate,jdbcType=VARCHAR},
  402. new_user_count = #{record.newUserCount,jdbcType=INTEGER},
  403. new_follow_count = #{record.newFollowCount,jdbcType=INTEGER},
  404. new_recharge_sum = #{record.newRechargeSum,jdbcType=VARCHAR},
  405. all_spend = #{record.allSpend,jdbcType=VARCHAR},
  406. first_roi = #{record.firstRoi,jdbcType=VARCHAR},
  407. all_recharge = #{record.allRecharge,jdbcType=VARCHAR},
  408. all_roi = #{record.allRoi,jdbcType=VARCHAR},
  409. insert_time = #{record.insertTime,jdbcType=TIMESTAMP},
  410. update_time = #{record.updateTime,jdbcType=TIMESTAMP}
  411. <if test="_parameter != null">
  412. <include refid="Update_By_Example_Where_Clause" />
  413. </if>
  414. </update>
  415. <update id="updateByPrimaryKeySelective" parameterType="map">
  416. <!--
  417. WARNING - @mbg.generated
  418. This element is automatically generated by MyBatis Generator, do not modify.
  419. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  420. -->
  421. update sun_static_income
  422. SET
  423. <choose>
  424. <when test="selective != null and selective.length &gt; 0">
  425. <foreach collection="selective" item="column" separator=",">
  426. ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  427. </foreach>
  428. </when>
  429. <otherwise>
  430. <trim suffixOverrides=",">
  431. <if test="record.staticDate != null">
  432. static_date = #{record.staticDate,jdbcType=VARCHAR},
  433. </if>
  434. <if test="record.newUserCount != null">
  435. new_user_count = #{record.newUserCount,jdbcType=INTEGER},
  436. </if>
  437. <if test="record.newFollowCount != null">
  438. new_follow_count = #{record.newFollowCount,jdbcType=INTEGER},
  439. </if>
  440. <if test="record.newRechargeSum != null">
  441. new_recharge_sum = #{record.newRechargeSum,jdbcType=VARCHAR},
  442. </if>
  443. <if test="record.allSpend != null">
  444. all_spend = #{record.allSpend,jdbcType=VARCHAR},
  445. </if>
  446. <if test="record.firstRoi != null">
  447. first_roi = #{record.firstRoi,jdbcType=VARCHAR},
  448. </if>
  449. <if test="record.allRecharge != null">
  450. all_recharge = #{record.allRecharge,jdbcType=VARCHAR},
  451. </if>
  452. <if test="record.allRoi != null">
  453. all_roi = #{record.allRoi,jdbcType=VARCHAR},
  454. </if>
  455. <if test="record.insertTime != null">
  456. insert_time = #{record.insertTime,jdbcType=TIMESTAMP},
  457. </if>
  458. <if test="record.updateTime != null">
  459. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  460. </if>
  461. </trim>
  462. </otherwise>
  463. </choose>
  464. where id = #{record.id,jdbcType=INTEGER}
  465. </update>
  466. <update id="updateByPrimaryKey" parameterType="com.book.dao.polardb.entity.SunStaticIncome">
  467. <!--
  468. WARNING - @mbg.generated
  469. This element is automatically generated by MyBatis Generator, do not modify.
  470. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  471. -->
  472. update sun_static_income
  473. set static_date = #{staticDate,jdbcType=VARCHAR},
  474. new_user_count = #{newUserCount,jdbcType=INTEGER},
  475. new_follow_count = #{newFollowCount,jdbcType=INTEGER},
  476. new_recharge_sum = #{newRechargeSum,jdbcType=VARCHAR},
  477. all_spend = #{allSpend,jdbcType=VARCHAR},
  478. first_roi = #{firstRoi,jdbcType=VARCHAR},
  479. all_recharge = #{allRecharge,jdbcType=VARCHAR},
  480. all_roi = #{allRoi,jdbcType=VARCHAR},
  481. insert_time = #{insertTime,jdbcType=TIMESTAMP},
  482. update_time = #{updateTime,jdbcType=TIMESTAMP}
  483. where id = #{id,jdbcType=INTEGER}
  484. </update>
  485. <select id="selectOneByExample" parameterType="com.book.dao.polardb.pojo.example.SunStaticIncomeExample" resultMap="BaseResultMap">
  486. <!--
  487. WARNING - @mbg.generated
  488. This element is automatically generated by MyBatis Generator, do not modify.
  489. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  490. -->
  491. select
  492. <include refid="Base_Column_List" />
  493. from sun_static_income
  494. <if test="_parameter != null">
  495. <include refid="Example_Where_Clause" />
  496. </if>
  497. <if test="orderByClause != null">
  498. order by ${orderByClause}
  499. </if>
  500. limit 1
  501. </select>
  502. <select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
  503. <!--
  504. WARNING - @mbg.generated
  505. This element is automatically generated by MyBatis Generator, do not modify.
  506. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  507. -->
  508. select
  509. <choose>
  510. <when test="selective != null and selective.length &gt; 0">
  511. <foreach collection="selective" item="column" separator=",">
  512. ${column.aliasedEscapedColumnName}
  513. </foreach>
  514. </when>
  515. <otherwise>
  516. <include refid="Base_Column_List" />
  517. </otherwise>
  518. </choose>
  519. from sun_static_income
  520. <if test="example != null">
  521. <include refid="Update_By_Example_Where_Clause" />
  522. </if>
  523. <if test="example != null and example.orderByClause != null">
  524. order by ${example.orderByClause}
  525. </if>
  526. limit 1
  527. </select>
  528. <insert id="batchInsert" parameterType="map">
  529. <!--
  530. WARNING - @mbg.generated
  531. This element is automatically generated by MyBatis Generator, do not modify.
  532. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  533. -->
  534. insert into sun_static_income
  535. (id, static_date, new_user_count, new_follow_count, new_recharge_sum, all_spend,
  536. first_roi, all_recharge, all_roi, insert_time, update_time)
  537. values
  538. <foreach collection="list" item="item" separator=",">
  539. (#{item.id,jdbcType=INTEGER}, #{item.staticDate,jdbcType=VARCHAR}, #{item.newUserCount,jdbcType=INTEGER},
  540. #{item.newFollowCount,jdbcType=INTEGER}, #{item.newRechargeSum,jdbcType=VARCHAR},
  541. #{item.allSpend,jdbcType=VARCHAR}, #{item.firstRoi,jdbcType=VARCHAR}, #{item.allRecharge,jdbcType=VARCHAR},
  542. #{item.allRoi,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}
  543. )
  544. </foreach>
  545. </insert>
  546. <insert id="batchInsertSelective" parameterType="map">
  547. <!--
  548. WARNING - @mbg.generated
  549. This element is automatically generated by MyBatis Generator, do not modify.
  550. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  551. -->
  552. insert into sun_static_income (
  553. <foreach collection="selective" item="column" separator=",">
  554. ${column.escapedColumnName}
  555. </foreach>
  556. )
  557. values
  558. <foreach collection="list" item="item" separator=",">
  559. (
  560. <foreach collection="selective" item="column" separator=",">
  561. <if test="'id'.toString() == column.value">
  562. #{item.id,jdbcType=INTEGER}
  563. </if>
  564. <if test="'static_date'.toString() == column.value">
  565. #{item.staticDate,jdbcType=VARCHAR}
  566. </if>
  567. <if test="'new_user_count'.toString() == column.value">
  568. #{item.newUserCount,jdbcType=INTEGER}
  569. </if>
  570. <if test="'new_follow_count'.toString() == column.value">
  571. #{item.newFollowCount,jdbcType=INTEGER}
  572. </if>
  573. <if test="'new_recharge_sum'.toString() == column.value">
  574. #{item.newRechargeSum,jdbcType=VARCHAR}
  575. </if>
  576. <if test="'all_spend'.toString() == column.value">
  577. #{item.allSpend,jdbcType=VARCHAR}
  578. </if>
  579. <if test="'first_roi'.toString() == column.value">
  580. #{item.firstRoi,jdbcType=VARCHAR}
  581. </if>
  582. <if test="'all_recharge'.toString() == column.value">
  583. #{item.allRecharge,jdbcType=VARCHAR}
  584. </if>
  585. <if test="'all_roi'.toString() == column.value">
  586. #{item.allRoi,jdbcType=VARCHAR}
  587. </if>
  588. <if test="'insert_time'.toString() == column.value">
  589. #{item.insertTime,jdbcType=TIMESTAMP}
  590. </if>
  591. <if test="'update_time'.toString() == column.value">
  592. #{item.updateTime,jdbcType=TIMESTAMP}
  593. </if>
  594. </foreach>
  595. )
  596. </foreach>
  597. </insert>
  598. <insert id="upsertSelective" parameterType="map">
  599. <!--
  600. WARNING - @mbg.generated
  601. This element is automatically generated by MyBatis Generator, do not modify.
  602. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  603. -->
  604. insert into sun_static_income
  605. <choose>
  606. <when test="selective != null and selective.length &gt; 0">
  607. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  608. ${column.escapedColumnName}
  609. </foreach>
  610. </when>
  611. <otherwise>
  612. <trim prefix="(" suffix=")" suffixOverrides=",">
  613. <if test="record.id != null">
  614. id,
  615. </if>
  616. <if test="record.staticDate != null">
  617. static_date,
  618. </if>
  619. <if test="record.newUserCount != null">
  620. new_user_count,
  621. </if>
  622. <if test="record.newFollowCount != null">
  623. new_follow_count,
  624. </if>
  625. <if test="record.newRechargeSum != null">
  626. new_recharge_sum,
  627. </if>
  628. <if test="record.allSpend != null">
  629. all_spend,
  630. </if>
  631. <if test="record.firstRoi != null">
  632. first_roi,
  633. </if>
  634. <if test="record.allRecharge != null">
  635. all_recharge,
  636. </if>
  637. <if test="record.allRoi != null">
  638. all_roi,
  639. </if>
  640. <if test="record.insertTime != null">
  641. insert_time,
  642. </if>
  643. <if test="record.updateTime != null">
  644. update_time,
  645. </if>
  646. </trim>
  647. <trim prefix="(" suffix=")" suffixOverrides="," />
  648. </otherwise>
  649. </choose>
  650. values
  651. <choose>
  652. <when test="selective != null and selective.length &gt; 0">
  653. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  654. #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  655. </foreach>
  656. </when>
  657. <otherwise>
  658. <trim prefix="(" suffix=")" suffixOverrides=",">
  659. <if test="record.id != null">
  660. #{record.id,jdbcType=INTEGER},
  661. </if>
  662. <if test="record.staticDate != null">
  663. #{record.staticDate,jdbcType=VARCHAR},
  664. </if>
  665. <if test="record.newUserCount != null">
  666. #{record.newUserCount,jdbcType=INTEGER},
  667. </if>
  668. <if test="record.newFollowCount != null">
  669. #{record.newFollowCount,jdbcType=INTEGER},
  670. </if>
  671. <if test="record.newRechargeSum != null">
  672. #{record.newRechargeSum,jdbcType=VARCHAR},
  673. </if>
  674. <if test="record.allSpend != null">
  675. #{record.allSpend,jdbcType=VARCHAR},
  676. </if>
  677. <if test="record.firstRoi != null">
  678. #{record.firstRoi,jdbcType=VARCHAR},
  679. </if>
  680. <if test="record.allRecharge != null">
  681. #{record.allRecharge,jdbcType=VARCHAR},
  682. </if>
  683. <if test="record.allRoi != null">
  684. #{record.allRoi,jdbcType=VARCHAR},
  685. </if>
  686. <if test="record.insertTime != null">
  687. #{record.insertTime,jdbcType=TIMESTAMP},
  688. </if>
  689. <if test="record.updateTime != null">
  690. #{record.updateTime,jdbcType=TIMESTAMP},
  691. </if>
  692. </trim>
  693. </otherwise>
  694. </choose>
  695. on duplicate key update
  696. <choose>
  697. <when test="selective != null and selective.length &gt; 0">
  698. <foreach collection="selective" item="column" separator=",">
  699. ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  700. </foreach>
  701. </when>
  702. <otherwise>
  703. <trim suffixOverrides=",">
  704. <if test="record.id != null">
  705. id = #{record.id,jdbcType=INTEGER},
  706. </if>
  707. <if test="record.staticDate != null">
  708. static_date = #{record.staticDate,jdbcType=VARCHAR},
  709. </if>
  710. <if test="record.newUserCount != null">
  711. new_user_count = #{record.newUserCount,jdbcType=INTEGER},
  712. </if>
  713. <if test="record.newFollowCount != null">
  714. new_follow_count = #{record.newFollowCount,jdbcType=INTEGER},
  715. </if>
  716. <if test="record.newRechargeSum != null">
  717. new_recharge_sum = #{record.newRechargeSum,jdbcType=VARCHAR},
  718. </if>
  719. <if test="record.allSpend != null">
  720. all_spend = #{record.allSpend,jdbcType=VARCHAR},
  721. </if>
  722. <if test="record.firstRoi != null">
  723. first_roi = #{record.firstRoi,jdbcType=VARCHAR},
  724. </if>
  725. <if test="record.allRecharge != null">
  726. all_recharge = #{record.allRecharge,jdbcType=VARCHAR},
  727. </if>
  728. <if test="record.allRoi != null">
  729. all_roi = #{record.allRoi,jdbcType=VARCHAR},
  730. </if>
  731. <if test="record.insertTime != null">
  732. insert_time = #{record.insertTime,jdbcType=TIMESTAMP},
  733. </if>
  734. <if test="record.updateTime != null">
  735. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  736. </if>
  737. </trim>
  738. </otherwise>
  739. </choose>
  740. </insert>
  741. <insert id="upsert" parameterType="com.book.dao.polardb.entity.SunStaticIncome">
  742. <!--
  743. WARNING - @mbg.generated
  744. This element is automatically generated by MyBatis Generator, do not modify.
  745. This element was generated on Sat Oct 16 14:42:43 CST 2021.
  746. -->
  747. insert into sun_static_income
  748. (id, static_date, new_user_count, new_follow_count, new_recharge_sum, all_spend,
  749. first_roi, all_recharge, all_roi, insert_time, update_time)
  750. values
  751. (#{id,jdbcType=INTEGER}, #{staticDate,jdbcType=VARCHAR}, #{newUserCount,jdbcType=INTEGER},
  752. #{newFollowCount,jdbcType=INTEGER}, #{newRechargeSum,jdbcType=VARCHAR}, #{allSpend,jdbcType=VARCHAR},
  753. #{firstRoi,jdbcType=VARCHAR}, #{allRecharge,jdbcType=VARCHAR}, #{allRoi,jdbcType=VARCHAR},
  754. #{insertTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
  755. on duplicate key update
  756. id = #{id,jdbcType=INTEGER},
  757. static_date = #{staticDate,jdbcType=VARCHAR},
  758. new_user_count = #{newUserCount,jdbcType=INTEGER},
  759. new_follow_count = #{newFollowCount,jdbcType=INTEGER},
  760. new_recharge_sum = #{newRechargeSum,jdbcType=VARCHAR},
  761. all_spend = #{allSpend,jdbcType=VARCHAR},
  762. first_roi = #{firstRoi,jdbcType=VARCHAR},
  763. all_recharge = #{allRecharge,jdbcType=VARCHAR},
  764. all_roi = #{allRoi,jdbcType=VARCHAR},
  765. insert_time = #{insertTime,jdbcType=TIMESTAMP},
  766. update_time = #{updateTime,jdbcType=TIMESTAMP}
  767. </insert>
  768. </mapper>