ContentPlatformQwDataStatTotalMapper.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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.contentplatform.ContentPlatformQwDataStatTotalMapper">
  4. <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatTotal">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="date_str" jdbcType="VARCHAR" property="dateStr" />
  7. <result column="channel" jdbcType="VARCHAR" property="channel" />
  8. <result column="first_level_count" jdbcType="INTEGER" property="firstLevelCount" />
  9. <result column="score" jdbcType="DOUBLE" property="score" />
  10. <result column="unit_price" jdbcType="DOUBLE" property="unitPrice" />
  11. <result column="settlement_amount" jdbcType="DOUBLE" property="settlementAmount" />
  12. <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
  13. </resultMap>
  14. <sql id="Example_Where_Clause">
  15. <where>
  16. <foreach collection="oredCriteria" item="criteria" separator="or">
  17. <if test="criteria.valid">
  18. <trim prefix="(" prefixOverrides="and" suffix=")">
  19. <foreach collection="criteria.criteria" item="criterion">
  20. <choose>
  21. <when test="criterion.noValue">
  22. and ${criterion.condition}
  23. </when>
  24. <when test="criterion.singleValue">
  25. and ${criterion.condition} #{criterion.value}
  26. </when>
  27. <when test="criterion.betweenValue">
  28. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  29. </when>
  30. <when test="criterion.listValue">
  31. and ${criterion.condition}
  32. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  33. #{listItem}
  34. </foreach>
  35. </when>
  36. </choose>
  37. </foreach>
  38. </trim>
  39. </if>
  40. </foreach>
  41. </where>
  42. </sql>
  43. <sql id="Update_By_Example_Where_Clause">
  44. <where>
  45. <foreach collection="example.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="Base_Column_List">
  73. id, date_str, channel, first_level_count, score, unit_price, settlement_amount, create_timestamp
  74. </sql>
  75. <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatTotalExample" resultMap="BaseResultMap">
  76. select
  77. <if test="distinct">
  78. distinct
  79. </if>
  80. <include refid="Base_Column_List" />
  81. from content_platform_qw_datastat_total
  82. <if test="_parameter != null">
  83. <include refid="Example_Where_Clause" />
  84. </if>
  85. <if test="orderByClause != null">
  86. order by ${orderByClause}
  87. </if>
  88. <if test="page != null">
  89. limit #{page.offset} , #{page.pageSize}
  90. </if>
  91. </select>
  92. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  93. select
  94. <include refid="Base_Column_List" />
  95. from content_platform_qw_datastat_total
  96. where id = #{id,jdbcType=BIGINT}
  97. </select>
  98. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  99. delete from content_platform_qw_datastat_total
  100. where id = #{id,jdbcType=BIGINT}
  101. </delete>
  102. <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatTotalExample">
  103. delete from content_platform_qw_datastat_total
  104. <if test="_parameter != null">
  105. <include refid="Example_Where_Clause" />
  106. </if>
  107. </delete>
  108. <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatTotal">
  109. insert into content_platform_qw_datastat_total (id, date_str, channel,
  110. first_level_count, score, unit_price,
  111. settlement_amount, create_timestamp)
  112. values (#{id,jdbcType=BIGINT}, #{dateStr,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR},
  113. #{firstLevelCount,jdbcType=INTEGER}, #{score,jdbcType=DOUBLE}, #{unitPrice,jdbcType=DOUBLE},
  114. #{settlementAmount,jdbcType=DOUBLE}, #{createTimestamp,jdbcType=BIGINT})
  115. </insert>
  116. <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatTotal">
  117. insert into content_platform_qw_datastat_total
  118. <trim prefix="(" suffix=")" suffixOverrides=",">
  119. <if test="id != null">
  120. id,
  121. </if>
  122. <if test="dateStr != null">
  123. date_str,
  124. </if>
  125. <if test="channel != null">
  126. channel,
  127. </if>
  128. <if test="firstLevelCount != null">
  129. first_level_count,
  130. </if>
  131. <if test="score != null">
  132. score,
  133. </if>
  134. <if test="unitPrice != null">
  135. unit_price,
  136. </if>
  137. <if test="settlementAmount != null">
  138. settlement_amount,
  139. </if>
  140. <if test="createTimestamp != null">
  141. create_timestamp,
  142. </if>
  143. </trim>
  144. <trim prefix="values (" suffix=")" suffixOverrides=",">
  145. <if test="id != null">
  146. #{id,jdbcType=BIGINT},
  147. </if>
  148. <if test="dateStr != null">
  149. #{dateStr,jdbcType=VARCHAR},
  150. </if>
  151. <if test="channel != null">
  152. #{channel,jdbcType=VARCHAR},
  153. </if>
  154. <if test="firstLevelCount != null">
  155. #{firstLevelCount,jdbcType=INTEGER},
  156. </if>
  157. <if test="score != null">
  158. #{score,jdbcType=DOUBLE},
  159. </if>
  160. <if test="unitPrice != null">
  161. #{unitPrice,jdbcType=DOUBLE},
  162. </if>
  163. <if test="settlementAmount != null">
  164. #{settlementAmount,jdbcType=DOUBLE},
  165. </if>
  166. <if test="createTimestamp != null">
  167. #{createTimestamp,jdbcType=BIGINT},
  168. </if>
  169. </trim>
  170. </insert>
  171. <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatTotalExample" resultType="java.lang.Long">
  172. select count(*) from content_platform_qw_datastat_total
  173. <if test="_parameter != null">
  174. <include refid="Example_Where_Clause" />
  175. </if>
  176. </select>
  177. <update id="updateByExampleSelective" parameterType="map">
  178. update content_platform_qw_datastat_total
  179. <set>
  180. <if test="record.id != null">
  181. id = #{record.id,jdbcType=BIGINT},
  182. </if>
  183. <if test="record.dateStr != null">
  184. date_str = #{record.dateStr,jdbcType=VARCHAR},
  185. </if>
  186. <if test="record.channel != null">
  187. channel = #{record.channel,jdbcType=VARCHAR},
  188. </if>
  189. <if test="record.firstLevelCount != null">
  190. first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
  191. </if>
  192. <if test="record.score != null">
  193. score = #{record.score,jdbcType=DOUBLE},
  194. </if>
  195. <if test="record.unitPrice != null">
  196. unit_price = #{record.unitPrice,jdbcType=DOUBLE},
  197. </if>
  198. <if test="record.settlementAmount != null">
  199. settlement_amount = #{record.settlementAmount,jdbcType=DOUBLE},
  200. </if>
  201. <if test="record.createTimestamp != null">
  202. create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
  203. </if>
  204. </set>
  205. <if test="_parameter != null">
  206. <include refid="Update_By_Example_Where_Clause" />
  207. </if>
  208. </update>
  209. <update id="updateByExample" parameterType="map">
  210. update content_platform_qw_datastat_total
  211. set id = #{record.id,jdbcType=BIGINT},
  212. date_str = #{record.dateStr,jdbcType=VARCHAR},
  213. channel = #{record.channel,jdbcType=VARCHAR},
  214. first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
  215. score = #{record.score,jdbcType=DOUBLE},
  216. unit_price = #{record.unitPrice,jdbcType=DOUBLE},
  217. settlement_amount = #{record.settlementAmount,jdbcType=DOUBLE},
  218. create_timestamp = #{record.createTimestamp,jdbcType=BIGINT}
  219. <if test="_parameter != null">
  220. <include refid="Update_By_Example_Where_Clause" />
  221. </if>
  222. </update>
  223. <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatTotal">
  224. update content_platform_qw_datastat_total
  225. <set>
  226. <if test="dateStr != null">
  227. date_str = #{dateStr,jdbcType=VARCHAR},
  228. </if>
  229. <if test="channel != null">
  230. channel = #{channel,jdbcType=VARCHAR},
  231. </if>
  232. <if test="firstLevelCount != null">
  233. first_level_count = #{firstLevelCount,jdbcType=INTEGER},
  234. </if>
  235. <if test="score != null">
  236. score = #{score,jdbcType=DOUBLE},
  237. </if>
  238. <if test="unitPrice != null">
  239. unit_price = #{unitPrice,jdbcType=DOUBLE},
  240. </if>
  241. <if test="settlementAmount != null">
  242. settlement_amount = #{settlementAmount,jdbcType=DOUBLE},
  243. </if>
  244. <if test="createTimestamp != null">
  245. create_timestamp = #{createTimestamp,jdbcType=BIGINT},
  246. </if>
  247. </set>
  248. where id = #{id,jdbcType=BIGINT}
  249. </update>
  250. <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatTotal">
  251. update content_platform_qw_datastat_total
  252. set date_str = #{dateStr,jdbcType=VARCHAR},
  253. channel = #{channel,jdbcType=VARCHAR},
  254. first_level_count = #{firstLevelCount,jdbcType=INTEGER},
  255. score = #{score,jdbcType=DOUBLE},
  256. unit_price = #{unitPrice,jdbcType=DOUBLE},
  257. settlement_amount = #{settlementAmount,jdbcType=DOUBLE},
  258. create_timestamp = #{createTimestamp,jdbcType=BIGINT}
  259. where id = #{id,jdbcType=BIGINT}
  260. </update>
  261. </mapper>