GuaranteesVideoMapper.xml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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.common.dao.mapper.OfflineGuaranteesVideoMapper">
  4. <resultMap id="BaseResultMap" type="com.tzld.piaoquan.common.model.po.GuaranteesVideo">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="date" jdbcType="VARCHAR" property="date" />
  7. <result column="staff_id" jdbcType="BIGINT" property="staffId" />
  8. <result column="video_ids" jdbcType="VARCHAR" property="videoIds" />
  9. <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  11. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  12. </resultMap>
  13. <sql id="Example_Where_Clause">
  14. <where>
  15. <foreach collection="oredCriteria" item="criteria" separator="or">
  16. <if test="criteria.valid">
  17. <trim prefix="(" prefixOverrides="and" suffix=")">
  18. <foreach collection="criteria.criteria" item="criterion">
  19. <choose>
  20. <when test="criterion.noValue">
  21. and ${criterion.condition}
  22. </when>
  23. <when test="criterion.singleValue">
  24. and ${criterion.condition} #{criterion.value}
  25. </when>
  26. <when test="criterion.betweenValue">
  27. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  28. </when>
  29. <when test="criterion.listValue">
  30. and ${criterion.condition}
  31. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  32. #{listItem}
  33. </foreach>
  34. </when>
  35. </choose>
  36. </foreach>
  37. </trim>
  38. </if>
  39. </foreach>
  40. </where>
  41. </sql>
  42. <sql id="Update_By_Example_Where_Clause">
  43. <where>
  44. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  45. <if test="criteria.valid">
  46. <trim prefix="(" prefixOverrides="and" suffix=")">
  47. <foreach collection="criteria.criteria" item="criterion">
  48. <choose>
  49. <when test="criterion.noValue">
  50. and ${criterion.condition}
  51. </when>
  52. <when test="criterion.singleValue">
  53. and ${criterion.condition} #{criterion.value}
  54. </when>
  55. <when test="criterion.betweenValue">
  56. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  57. </when>
  58. <when test="criterion.listValue">
  59. and ${criterion.condition}
  60. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  61. #{listItem}
  62. </foreach>
  63. </when>
  64. </choose>
  65. </foreach>
  66. </trim>
  67. </if>
  68. </foreach>
  69. </where>
  70. </sql>
  71. <sql id="Base_Column_List">
  72. id, `date`, staff_id, video_ids, is_delete, create_time, update_time
  73. </sql>
  74. <select id="selectByExample" parameterType="com.tzld.piaoquan.common.model.po.GuaranteesVideoExample" resultMap="BaseResultMap">
  75. select
  76. <if test="distinct">
  77. distinct
  78. </if>
  79. <include refid="Base_Column_List" />
  80. from we_com_guarantees_video
  81. <if test="_parameter != null">
  82. <include refid="Example_Where_Clause" />
  83. </if>
  84. <if test="orderByClause != null">
  85. order by ${orderByClause}
  86. </if>
  87. <if test="page != null">
  88. limit #{page.offset} , #{page.pageSize}
  89. </if>
  90. </select>
  91. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  92. select
  93. <include refid="Base_Column_List" />
  94. from we_com_guarantees_video
  95. where id = #{id,jdbcType=BIGINT}
  96. </select>
  97. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  98. delete from we_com_guarantees_video
  99. where id = #{id,jdbcType=BIGINT}
  100. </delete>
  101. <delete id="deleteByExample" parameterType="com.tzld.piaoquan.common.model.po.GuaranteesVideoExample">
  102. delete from we_com_guarantees_video
  103. <if test="_parameter != null">
  104. <include refid="Example_Where_Clause" />
  105. </if>
  106. </delete>
  107. <insert id="insert" parameterType="com.tzld.piaoquan.common.model.po.GuaranteesVideo">
  108. insert into we_com_guarantees_video (id, `date`, staff_id,
  109. video_ids, is_delete, create_time,
  110. update_time)
  111. values (#{id,jdbcType=BIGINT}, #{date,jdbcType=VARCHAR}, #{staffId,jdbcType=BIGINT},
  112. #{videoIds,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  113. #{updateTime,jdbcType=TIMESTAMP})
  114. </insert>
  115. <insert id="insertSelective" parameterType="com.tzld.piaoquan.common.model.po.GuaranteesVideo">
  116. insert into we_com_guarantees_video
  117. <trim prefix="(" suffix=")" suffixOverrides=",">
  118. <if test="id != null">
  119. id,
  120. </if>
  121. <if test="date != null">
  122. `date`,
  123. </if>
  124. <if test="staffId != null">
  125. staff_id,
  126. </if>
  127. <if test="videoIds != null">
  128. video_ids,
  129. </if>
  130. <if test="isDelete != null">
  131. is_delete,
  132. </if>
  133. <if test="createTime != null">
  134. create_time,
  135. </if>
  136. <if test="updateTime != null">
  137. update_time,
  138. </if>
  139. </trim>
  140. <trim prefix="values (" suffix=")" suffixOverrides=",">
  141. <if test="id != null">
  142. #{id,jdbcType=BIGINT},
  143. </if>
  144. <if test="date != null">
  145. #{date,jdbcType=VARCHAR},
  146. </if>
  147. <if test="staffId != null">
  148. #{staffId,jdbcType=BIGINT},
  149. </if>
  150. <if test="videoIds != null">
  151. #{videoIds,jdbcType=VARCHAR},
  152. </if>
  153. <if test="isDelete != null">
  154. #{isDelete,jdbcType=INTEGER},
  155. </if>
  156. <if test="createTime != null">
  157. #{createTime,jdbcType=TIMESTAMP},
  158. </if>
  159. <if test="updateTime != null">
  160. #{updateTime,jdbcType=TIMESTAMP},
  161. </if>
  162. </trim>
  163. </insert>
  164. <select id="countByExample" parameterType="com.tzld.piaoquan.common.model.po.GuaranteesVideoExample" resultType="java.lang.Long">
  165. select count(*) from we_com_guarantees_video
  166. <if test="_parameter != null">
  167. <include refid="Example_Where_Clause" />
  168. </if>
  169. </select>
  170. <update id="updateByExampleSelective" parameterType="map">
  171. update we_com_guarantees_video
  172. <set>
  173. <if test="record.id != null">
  174. id = #{record.id,jdbcType=BIGINT},
  175. </if>
  176. <if test="record.date != null">
  177. `date` = #{record.date,jdbcType=VARCHAR},
  178. </if>
  179. <if test="record.staffId != null">
  180. staff_id = #{record.staffId,jdbcType=BIGINT},
  181. </if>
  182. <if test="record.videoIds != null">
  183. video_ids = #{record.videoIds,jdbcType=VARCHAR},
  184. </if>
  185. <if test="record.isDelete != null">
  186. is_delete = #{record.isDelete,jdbcType=INTEGER},
  187. </if>
  188. <if test="record.createTime != null">
  189. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  190. </if>
  191. <if test="record.updateTime != null">
  192. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  193. </if>
  194. </set>
  195. <if test="_parameter != null">
  196. <include refid="Update_By_Example_Where_Clause" />
  197. </if>
  198. </update>
  199. <update id="updateByExample" parameterType="map">
  200. update we_com_guarantees_video
  201. set id = #{record.id,jdbcType=BIGINT},
  202. `date` = #{record.date,jdbcType=VARCHAR},
  203. staff_id = #{record.staffId,jdbcType=BIGINT},
  204. video_ids = #{record.videoIds,jdbcType=VARCHAR},
  205. is_delete = #{record.isDelete,jdbcType=INTEGER},
  206. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  207. update_time = #{record.updateTime,jdbcType=TIMESTAMP}
  208. <if test="_parameter != null">
  209. <include refid="Update_By_Example_Where_Clause" />
  210. </if>
  211. </update>
  212. <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.common.model.po.GuaranteesVideo">
  213. update we_com_guarantees_video
  214. <set>
  215. <if test="date != null">
  216. `date` = #{date,jdbcType=VARCHAR},
  217. </if>
  218. <if test="staffId != null">
  219. staff_id = #{staffId,jdbcType=BIGINT},
  220. </if>
  221. <if test="videoIds != null">
  222. video_ids = #{videoIds,jdbcType=VARCHAR},
  223. </if>
  224. <if test="isDelete != null">
  225. is_delete = #{isDelete,jdbcType=INTEGER},
  226. </if>
  227. <if test="createTime != null">
  228. create_time = #{createTime,jdbcType=TIMESTAMP},
  229. </if>
  230. <if test="updateTime != null">
  231. update_time = #{updateTime,jdbcType=TIMESTAMP},
  232. </if>
  233. </set>
  234. where id = #{id,jdbcType=BIGINT}
  235. </update>
  236. <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.common.model.po.GuaranteesVideo">
  237. update we_com_guarantees_video
  238. set `date` = #{date,jdbcType=VARCHAR},
  239. staff_id = #{staffId,jdbcType=BIGINT},
  240. video_ids = #{videoIds,jdbcType=VARCHAR},
  241. is_delete = #{isDelete,jdbcType=INTEGER},
  242. create_time = #{createTime,jdbcType=TIMESTAMP},
  243. update_time = #{updateTime,jdbcType=TIMESTAMP}
  244. where id = #{id,jdbcType=BIGINT}
  245. </update>
  246. </mapper>