ContentPlatformUploadVideoMapper.xml 13 KB

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