ContentPlatformQwDataStatSubChannelMapper.xml 11 KB

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