AdMuseTaskMapper.xml 14 KB

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