AIVideoAbTestMapper.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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.longarticle.dao.mapper.longarticle.AIVideoAbTestMapper">
  4. <resultMap id="BaseResultMap" type="com.tzld.piaoquan.longarticle.model.po.longarticle.AIVideoAbTest">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="content_id" jdbcType="VARCHAR" property="contentId" />
  7. <result column="publish_content_id" jdbcType="VARCHAR" property="publishContentId" />
  8. <result column="new_channel_content_id" jdbcType="VARCHAR" property="newChannelContentId" />
  9. <result column="title" jdbcType="VARCHAR" property="title" />
  10. <result column="pq_video_id" jdbcType="INTEGER" property="pqVideoId" />
  11. <result column="video_oss_path" jdbcType="VARCHAR" property="videoOssPath" />
  12. <result column="status" jdbcType="INTEGER" property="status" />
  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, content_id, publish_content_id, new_channel_content_id, title, pq_video_id, video_oss_path,
  74. `status`
  75. </sql>
  76. <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AIVideoAbTestExample" resultMap="BaseResultMap">
  77. select
  78. <if test="distinct">
  79. distinct
  80. </if>
  81. <include refid="Base_Column_List" />
  82. from ai_video_ab_test
  83. <if test="_parameter != null">
  84. <include refid="Example_Where_Clause" />
  85. </if>
  86. <if test="orderByClause != null">
  87. order by ${orderByClause}
  88. </if>
  89. <if test="page != null">
  90. limit #{page.offset} , #{page.pageSize}
  91. </if>
  92. </select>
  93. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  94. select
  95. <include refid="Base_Column_List" />
  96. from ai_video_ab_test
  97. where id = #{id,jdbcType=INTEGER}
  98. </select>
  99. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  100. delete from ai_video_ab_test
  101. where id = #{id,jdbcType=INTEGER}
  102. </delete>
  103. <delete id="deleteByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AIVideoAbTestExample">
  104. delete from ai_video_ab_test
  105. <if test="_parameter != null">
  106. <include refid="Example_Where_Clause" />
  107. </if>
  108. </delete>
  109. <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AIVideoAbTest">
  110. insert into ai_video_ab_test (id, content_id, publish_content_id,
  111. new_channel_content_id, title, pq_video_id,
  112. video_oss_path, `status`)
  113. values (#{id,jdbcType=INTEGER}, #{contentId,jdbcType=VARCHAR}, #{publishContentId,jdbcType=VARCHAR},
  114. #{newChannelContentId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{pqVideoId,jdbcType=INTEGER},
  115. #{videoOssPath,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER})
  116. </insert>
  117. <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AIVideoAbTest">
  118. insert into ai_video_ab_test
  119. <trim prefix="(" suffix=")" suffixOverrides=",">
  120. <if test="id != null">
  121. id,
  122. </if>
  123. <if test="contentId != null">
  124. content_id,
  125. </if>
  126. <if test="publishContentId != null">
  127. publish_content_id,
  128. </if>
  129. <if test="newChannelContentId != null">
  130. new_channel_content_id,
  131. </if>
  132. <if test="title != null">
  133. title,
  134. </if>
  135. <if test="pqVideoId != null">
  136. pq_video_id,
  137. </if>
  138. <if test="videoOssPath != null">
  139. video_oss_path,
  140. </if>
  141. <if test="status != null">
  142. `status`,
  143. </if>
  144. </trim>
  145. <trim prefix="values (" suffix=")" suffixOverrides=",">
  146. <if test="id != null">
  147. #{id,jdbcType=INTEGER},
  148. </if>
  149. <if test="contentId != null">
  150. #{contentId,jdbcType=VARCHAR},
  151. </if>
  152. <if test="publishContentId != null">
  153. #{publishContentId,jdbcType=VARCHAR},
  154. </if>
  155. <if test="newChannelContentId != null">
  156. #{newChannelContentId,jdbcType=VARCHAR},
  157. </if>
  158. <if test="title != null">
  159. #{title,jdbcType=VARCHAR},
  160. </if>
  161. <if test="pqVideoId != null">
  162. #{pqVideoId,jdbcType=INTEGER},
  163. </if>
  164. <if test="videoOssPath != null">
  165. #{videoOssPath,jdbcType=VARCHAR},
  166. </if>
  167. <if test="status != null">
  168. #{status,jdbcType=INTEGER},
  169. </if>
  170. </trim>
  171. </insert>
  172. <select id="countByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AIVideoAbTestExample" resultType="java.lang.Long">
  173. select count(*) from ai_video_ab_test
  174. <if test="_parameter != null">
  175. <include refid="Example_Where_Clause" />
  176. </if>
  177. </select>
  178. <update id="updateByExampleSelective" parameterType="map">
  179. update ai_video_ab_test
  180. <set>
  181. <if test="record.id != null">
  182. id = #{record.id,jdbcType=INTEGER},
  183. </if>
  184. <if test="record.contentId != null">
  185. content_id = #{record.contentId,jdbcType=VARCHAR},
  186. </if>
  187. <if test="record.publishContentId != null">
  188. publish_content_id = #{record.publishContentId,jdbcType=VARCHAR},
  189. </if>
  190. <if test="record.newChannelContentId != null">
  191. new_channel_content_id = #{record.newChannelContentId,jdbcType=VARCHAR},
  192. </if>
  193. <if test="record.title != null">
  194. title = #{record.title,jdbcType=VARCHAR},
  195. </if>
  196. <if test="record.pqVideoId != null">
  197. pq_video_id = #{record.pqVideoId,jdbcType=INTEGER},
  198. </if>
  199. <if test="record.videoOssPath != null">
  200. video_oss_path = #{record.videoOssPath,jdbcType=VARCHAR},
  201. </if>
  202. <if test="record.status != null">
  203. `status` = #{record.status,jdbcType=INTEGER},
  204. </if>
  205. </set>
  206. <if test="_parameter != null">
  207. <include refid="Update_By_Example_Where_Clause" />
  208. </if>
  209. </update>
  210. <update id="updateByExample" parameterType="map">
  211. update ai_video_ab_test
  212. set id = #{record.id,jdbcType=INTEGER},
  213. content_id = #{record.contentId,jdbcType=VARCHAR},
  214. publish_content_id = #{record.publishContentId,jdbcType=VARCHAR},
  215. new_channel_content_id = #{record.newChannelContentId,jdbcType=VARCHAR},
  216. title = #{record.title,jdbcType=VARCHAR},
  217. pq_video_id = #{record.pqVideoId,jdbcType=INTEGER},
  218. video_oss_path = #{record.videoOssPath,jdbcType=VARCHAR},
  219. `status` = #{record.status,jdbcType=INTEGER}
  220. <if test="_parameter != null">
  221. <include refid="Update_By_Example_Where_Clause" />
  222. </if>
  223. </update>
  224. <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AIVideoAbTest">
  225. update ai_video_ab_test
  226. <set>
  227. <if test="contentId != null">
  228. content_id = #{contentId,jdbcType=VARCHAR},
  229. </if>
  230. <if test="publishContentId != null">
  231. publish_content_id = #{publishContentId,jdbcType=VARCHAR},
  232. </if>
  233. <if test="newChannelContentId != null">
  234. new_channel_content_id = #{newChannelContentId,jdbcType=VARCHAR},
  235. </if>
  236. <if test="title != null">
  237. title = #{title,jdbcType=VARCHAR},
  238. </if>
  239. <if test="pqVideoId != null">
  240. pq_video_id = #{pqVideoId,jdbcType=INTEGER},
  241. </if>
  242. <if test="videoOssPath != null">
  243. video_oss_path = #{videoOssPath,jdbcType=VARCHAR},
  244. </if>
  245. <if test="status != null">
  246. `status` = #{status,jdbcType=INTEGER},
  247. </if>
  248. </set>
  249. where id = #{id,jdbcType=INTEGER}
  250. </update>
  251. <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.AIVideoAbTest">
  252. update ai_video_ab_test
  253. set content_id = #{contentId,jdbcType=VARCHAR},
  254. publish_content_id = #{publishContentId,jdbcType=VARCHAR},
  255. new_channel_content_id = #{newChannelContentId,jdbcType=VARCHAR},
  256. title = #{title,jdbcType=VARCHAR},
  257. pq_video_id = #{pqVideoId,jdbcType=INTEGER},
  258. video_oss_path = #{videoOssPath,jdbcType=VARCHAR},
  259. `status` = #{status,jdbcType=INTEGER}
  260. where id = #{id,jdbcType=INTEGER}
  261. </update>
  262. </mapper>