ContentPlatformGzhPlanVideoMapper.xml 13 KB

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