ContentPlatformQwPlanMapper.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.api.dao.mapper.contentplatform.ContentPlatformQwPlanMapper">
  4. <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwPlan">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="type" jdbcType="INTEGER" property="type" />
  7. <result column="scene" jdbcType="INTEGER" property="scene" />
  8. <result column="page_url" jdbcType="VARCHAR" property="pageUrl" />
  9. <result column="root_source_id" jdbcType="VARCHAR" property="rootSourceId" />
  10. <result column="create_account_id" jdbcType="BIGINT" property="createAccountId" />
  11. <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
  12. <result column="update_timestamp" jdbcType="BIGINT" property="updateTimestamp" />
  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, `type`, scene, page_url, root_source_id, create_account_id, create_timestamp,
  74. update_timestamp
  75. </sql>
  76. <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwPlanExample" resultMap="BaseResultMap">
  77. select
  78. <if test="distinct">
  79. distinct
  80. </if>
  81. <include refid="Base_Column_List" />
  82. from content_platform_qw_plan
  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.Long" resultMap="BaseResultMap">
  94. select
  95. <include refid="Base_Column_List" />
  96. from content_platform_qw_plan
  97. where id = #{id,jdbcType=BIGINT}
  98. </select>
  99. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  100. delete from content_platform_qw_plan
  101. where id = #{id,jdbcType=BIGINT}
  102. </delete>
  103. <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwPlanExample">
  104. delete from content_platform_qw_plan
  105. <if test="_parameter != null">
  106. <include refid="Example_Where_Clause" />
  107. </if>
  108. </delete>
  109. <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwPlan">
  110. insert into content_platform_qw_plan (id, `type`, scene,
  111. page_url, root_source_id, create_account_id,
  112. create_timestamp, update_timestamp)
  113. values (#{id,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, #{scene,jdbcType=INTEGER},
  114. #{pageUrl,jdbcType=VARCHAR}, #{rootSourceId,jdbcType=VARCHAR}, #{createAccountId,jdbcType=BIGINT},
  115. #{createTimestamp,jdbcType=BIGINT}, #{updateTimestamp,jdbcType=BIGINT})
  116. </insert>
  117. <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwPlan">
  118. insert into content_platform_qw_plan
  119. <trim prefix="(" suffix=")" suffixOverrides=",">
  120. <if test="id != null">
  121. id,
  122. </if>
  123. <if test="type != null">
  124. `type`,
  125. </if>
  126. <if test="scene != null">
  127. scene,
  128. </if>
  129. <if test="pageUrl != null">
  130. page_url,
  131. </if>
  132. <if test="rootSourceId != null">
  133. root_source_id,
  134. </if>
  135. <if test="createAccountId != null">
  136. create_account_id,
  137. </if>
  138. <if test="createTimestamp != null">
  139. create_timestamp,
  140. </if>
  141. <if test="updateTimestamp != null">
  142. update_timestamp,
  143. </if>
  144. </trim>
  145. <trim prefix="values (" suffix=")" suffixOverrides=",">
  146. <if test="id != null">
  147. #{id,jdbcType=BIGINT},
  148. </if>
  149. <if test="type != null">
  150. #{type,jdbcType=INTEGER},
  151. </if>
  152. <if test="scene != null">
  153. #{scene,jdbcType=INTEGER},
  154. </if>
  155. <if test="pageUrl != null">
  156. #{pageUrl,jdbcType=VARCHAR},
  157. </if>
  158. <if test="rootSourceId != null">
  159. #{rootSourceId,jdbcType=VARCHAR},
  160. </if>
  161. <if test="createAccountId != null">
  162. #{createAccountId,jdbcType=BIGINT},
  163. </if>
  164. <if test="createTimestamp != null">
  165. #{createTimestamp,jdbcType=BIGINT},
  166. </if>
  167. <if test="updateTimestamp != null">
  168. #{updateTimestamp,jdbcType=BIGINT},
  169. </if>
  170. </trim>
  171. </insert>
  172. <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwPlanExample" resultType="java.lang.Long">
  173. select count(*) from content_platform_qw_plan
  174. <if test="_parameter != null">
  175. <include refid="Example_Where_Clause" />
  176. </if>
  177. </select>
  178. <update id="updateByExampleSelective" parameterType="map">
  179. update content_platform_qw_plan
  180. <set>
  181. <if test="record.id != null">
  182. id = #{record.id,jdbcType=BIGINT},
  183. </if>
  184. <if test="record.type != null">
  185. `type` = #{record.type,jdbcType=INTEGER},
  186. </if>
  187. <if test="record.scene != null">
  188. scene = #{record.scene,jdbcType=INTEGER},
  189. </if>
  190. <if test="record.pageUrl != null">
  191. page_url = #{record.pageUrl,jdbcType=VARCHAR},
  192. </if>
  193. <if test="record.rootSourceId != null">
  194. root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
  195. </if>
  196. <if test="record.createAccountId != null">
  197. create_account_id = #{record.createAccountId,jdbcType=BIGINT},
  198. </if>
  199. <if test="record.createTimestamp != null">
  200. create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
  201. </if>
  202. <if test="record.updateTimestamp != null">
  203. update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT},
  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 content_platform_qw_plan
  212. set id = #{record.id,jdbcType=BIGINT},
  213. `type` = #{record.type,jdbcType=INTEGER},
  214. scene = #{record.scene,jdbcType=INTEGER},
  215. page_url = #{record.pageUrl,jdbcType=VARCHAR},
  216. root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
  217. create_account_id = #{record.createAccountId,jdbcType=BIGINT},
  218. create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
  219. update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT}
  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.api.model.po.contentplatform.ContentPlatformQwPlan">
  225. update content_platform_qw_plan
  226. <set>
  227. <if test="type != null">
  228. `type` = #{type,jdbcType=INTEGER},
  229. </if>
  230. <if test="scene != null">
  231. scene = #{scene,jdbcType=INTEGER},
  232. </if>
  233. <if test="pageUrl != null">
  234. page_url = #{pageUrl,jdbcType=VARCHAR},
  235. </if>
  236. <if test="rootSourceId != null">
  237. root_source_id = #{rootSourceId,jdbcType=VARCHAR},
  238. </if>
  239. <if test="createAccountId != null">
  240. create_account_id = #{createAccountId,jdbcType=BIGINT},
  241. </if>
  242. <if test="createTimestamp != null">
  243. create_timestamp = #{createTimestamp,jdbcType=BIGINT},
  244. </if>
  245. <if test="updateTimestamp != null">
  246. update_timestamp = #{updateTimestamp,jdbcType=BIGINT},
  247. </if>
  248. </set>
  249. where id = #{id,jdbcType=BIGINT}
  250. </update>
  251. <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwPlan">
  252. update content_platform_qw_plan
  253. set `type` = #{type,jdbcType=INTEGER},
  254. scene = #{scene,jdbcType=INTEGER},
  255. page_url = #{pageUrl,jdbcType=VARCHAR},
  256. root_source_id = #{rootSourceId,jdbcType=VARCHAR},
  257. create_account_id = #{createAccountId,jdbcType=BIGINT},
  258. create_timestamp = #{createTimestamp,jdbcType=BIGINT},
  259. update_timestamp = #{updateTimestamp,jdbcType=BIGINT}
  260. where id = #{id,jdbcType=BIGINT}
  261. </update>
  262. </mapper>