ContentPlatformVideoAggMapper.xml 11 KB

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