FwhDailyPublishDetailMapper.xml 9.2 KB

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