MarketingManagementMapper.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  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.goafanti.common.dao.MarketingManagementMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.MarketingManagement">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  9. -->
  10. <id column="id" jdbcType="VARCHAR" property="id" />
  11. <result column="product_id" jdbcType="VARCHAR" property="productId" />
  12. <result column="show_page" jdbcType="VARCHAR" property="showPage" />
  13. <result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
  14. <result column="start_date" jdbcType="TIMESTAMP" property="startDate" />
  15. <result column="end_date" jdbcType="TIMESTAMP" property="endDate" />
  16. <result column="category" jdbcType="INTEGER" property="category" />
  17. <result column="effective" jdbcType="INTEGER" property="effective" />
  18. </resultMap>
  19. <sql id="Example_Where_Clause">
  20. <!--
  21. WARNING - @mbg.generated
  22. This element is automatically generated by MyBatis Generator, do not modify.
  23. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  24. -->
  25. <where>
  26. <foreach collection="oredCriteria" item="criteria" separator="or">
  27. <if test="criteria.valid">
  28. <trim prefix="(" prefixOverrides="and" suffix=")">
  29. <foreach collection="criteria.criteria" item="criterion">
  30. <choose>
  31. <when test="criterion.noValue">
  32. and ${criterion.condition}
  33. </when>
  34. <when test="criterion.singleValue">
  35. and ${criterion.condition} #{criterion.value}
  36. </when>
  37. <when test="criterion.betweenValue">
  38. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  39. </when>
  40. <when test="criterion.listValue">
  41. and ${criterion.condition}
  42. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  43. #{listItem}
  44. </foreach>
  45. </when>
  46. </choose>
  47. </foreach>
  48. </trim>
  49. </if>
  50. </foreach>
  51. </where>
  52. </sql>
  53. <sql id="Update_By_Example_Where_Clause">
  54. <!--
  55. WARNING - @mbg.generated
  56. This element is automatically generated by MyBatis Generator, do not modify.
  57. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  58. -->
  59. <where>
  60. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  61. <if test="criteria.valid">
  62. <trim prefix="(" prefixOverrides="and" suffix=")">
  63. <foreach collection="criteria.criteria" item="criterion">
  64. <choose>
  65. <when test="criterion.noValue">
  66. and ${criterion.condition}
  67. </when>
  68. <when test="criterion.singleValue">
  69. and ${criterion.condition} #{criterion.value}
  70. </when>
  71. <when test="criterion.betweenValue">
  72. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  73. </when>
  74. <when test="criterion.listValue">
  75. and ${criterion.condition}
  76. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  77. #{listItem}
  78. </foreach>
  79. </when>
  80. </choose>
  81. </foreach>
  82. </trim>
  83. </if>
  84. </foreach>
  85. </where>
  86. </sql>
  87. <sql id="Base_Column_List">
  88. <!--
  89. WARNING - @mbg.generated
  90. This element is automatically generated by MyBatis Generator, do not modify.
  91. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  92. -->
  93. id, product_id, show_page, cover_img, start_date, end_date, category, effective
  94. </sql>
  95. <select id="selectByExample" parameterType="com.goafanti.common.model.MarketingManagementExample" resultMap="BaseResultMap">
  96. <!--
  97. WARNING - @mbg.generated
  98. This element is automatically generated by MyBatis Generator, do not modify.
  99. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  100. -->
  101. select
  102. <if test="distinct">
  103. distinct
  104. </if>
  105. <include refid="Base_Column_List" />
  106. from marketing_management
  107. <if test="_parameter != null">
  108. <include refid="Example_Where_Clause" />
  109. </if>
  110. <if test="orderByClause != null">
  111. order by ${orderByClause}
  112. </if>
  113. </select>
  114. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  115. <!--
  116. WARNING - @mbg.generated
  117. This element is automatically generated by MyBatis Generator, do not modify.
  118. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  119. -->
  120. select
  121. <include refid="Base_Column_List" />
  122. from marketing_management
  123. where id = #{id,jdbcType=VARCHAR}
  124. </select>
  125. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  126. <!--
  127. WARNING - @mbg.generated
  128. This element is automatically generated by MyBatis Generator, do not modify.
  129. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  130. -->
  131. delete from marketing_management
  132. where id = #{id,jdbcType=VARCHAR}
  133. </delete>
  134. <delete id="deleteByExample" parameterType="com.goafanti.common.model.MarketingManagementExample">
  135. <!--
  136. WARNING - @mbg.generated
  137. This element is automatically generated by MyBatis Generator, do not modify.
  138. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  139. -->
  140. delete from marketing_management
  141. <if test="_parameter != null">
  142. <include refid="Example_Where_Clause" />
  143. </if>
  144. </delete>
  145. <insert id="insert" parameterType="com.goafanti.common.model.MarketingManagement">
  146. <!--
  147. WARNING - @mbg.generated
  148. This element is automatically generated by MyBatis Generator, do not modify.
  149. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  150. -->
  151. insert into marketing_management (id, product_id, show_page,
  152. cover_img, start_date, end_date,
  153. category, effective)
  154. values (#{id,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR}, #{showPage,jdbcType=VARCHAR},
  155. #{coverImg,jdbcType=VARCHAR}, #{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP},
  156. #{category,jdbcType=INTEGER}, #{effective,jdbcType=INTEGER})
  157. </insert>
  158. <insert id="insertSelective" parameterType="com.goafanti.common.model.MarketingManagement">
  159. <!--
  160. WARNING - @mbg.generated
  161. This element is automatically generated by MyBatis Generator, do not modify.
  162. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  163. -->
  164. insert into marketing_management
  165. <trim prefix="(" suffix=")" suffixOverrides=",">
  166. <if test="id != null">
  167. id,
  168. </if>
  169. <if test="productId != null">
  170. product_id,
  171. </if>
  172. <if test="showPage != null">
  173. show_page,
  174. </if>
  175. <if test="coverImg != null">
  176. cover_img,
  177. </if>
  178. <if test="startDate != null">
  179. start_date,
  180. </if>
  181. <if test="endDate != null">
  182. end_date,
  183. </if>
  184. <if test="category != null">
  185. category,
  186. </if>
  187. <if test="effective != null">
  188. effective,
  189. </if>
  190. </trim>
  191. <trim prefix="values (" suffix=")" suffixOverrides=",">
  192. <if test="id != null">
  193. #{id,jdbcType=VARCHAR},
  194. </if>
  195. <if test="productId != null">
  196. #{productId,jdbcType=VARCHAR},
  197. </if>
  198. <if test="showPage != null">
  199. #{showPage,jdbcType=VARCHAR},
  200. </if>
  201. <if test="coverImg != null">
  202. #{coverImg,jdbcType=VARCHAR},
  203. </if>
  204. <if test="startDate != null">
  205. #{startDate,jdbcType=TIMESTAMP},
  206. </if>
  207. <if test="endDate != null">
  208. #{endDate,jdbcType=TIMESTAMP},
  209. </if>
  210. <if test="category != null">
  211. #{category,jdbcType=INTEGER},
  212. </if>
  213. <if test="effective != null">
  214. #{effective,jdbcType=INTEGER},
  215. </if>
  216. </trim>
  217. </insert>
  218. <select id="countByExample" parameterType="com.goafanti.common.model.MarketingManagementExample" resultType="java.lang.Long">
  219. <!--
  220. WARNING - @mbg.generated
  221. This element is automatically generated by MyBatis Generator, do not modify.
  222. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  223. -->
  224. select count(*) from marketing_management
  225. <if test="_parameter != null">
  226. <include refid="Example_Where_Clause" />
  227. </if>
  228. </select>
  229. <update id="updateByExampleSelective" parameterType="map">
  230. <!--
  231. WARNING - @mbg.generated
  232. This element is automatically generated by MyBatis Generator, do not modify.
  233. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  234. -->
  235. update marketing_management
  236. <set>
  237. <if test="record.id != null">
  238. id = #{record.id,jdbcType=VARCHAR},
  239. </if>
  240. <if test="record.productId != null">
  241. product_id = #{record.productId,jdbcType=VARCHAR},
  242. </if>
  243. <if test="record.showPage != null">
  244. show_page = #{record.showPage,jdbcType=VARCHAR},
  245. </if>
  246. <if test="record.coverImg != null">
  247. cover_img = #{record.coverImg,jdbcType=VARCHAR},
  248. </if>
  249. <if test="record.startDate != null">
  250. start_date = #{record.startDate,jdbcType=TIMESTAMP},
  251. </if>
  252. <if test="record.endDate != null">
  253. end_date = #{record.endDate,jdbcType=TIMESTAMP},
  254. </if>
  255. <if test="record.category != null">
  256. category = #{record.category,jdbcType=INTEGER},
  257. </if>
  258. <if test="record.effective != null">
  259. effective = #{record.effective,jdbcType=INTEGER},
  260. </if>
  261. </set>
  262. <if test="_parameter != null">
  263. <include refid="Update_By_Example_Where_Clause" />
  264. </if>
  265. </update>
  266. <update id="updateByExample" parameterType="map">
  267. <!--
  268. WARNING - @mbg.generated
  269. This element is automatically generated by MyBatis Generator, do not modify.
  270. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  271. -->
  272. update marketing_management
  273. set id = #{record.id,jdbcType=VARCHAR},
  274. product_id = #{record.productId,jdbcType=VARCHAR},
  275. show_page = #{record.showPage,jdbcType=VARCHAR},
  276. cover_img = #{record.coverImg,jdbcType=VARCHAR},
  277. start_date = #{record.startDate,jdbcType=TIMESTAMP},
  278. end_date = #{record.endDate,jdbcType=TIMESTAMP},
  279. category = #{record.category,jdbcType=INTEGER},
  280. effective = #{record.effective,jdbcType=INTEGER}
  281. <if test="_parameter != null">
  282. <include refid="Update_By_Example_Where_Clause" />
  283. </if>
  284. </update>
  285. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.MarketingManagement">
  286. <!--
  287. WARNING - @mbg.generated
  288. This element is automatically generated by MyBatis Generator, do not modify.
  289. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  290. -->
  291. update marketing_management
  292. <set>
  293. <if test="productId != null">
  294. product_id = #{productId,jdbcType=VARCHAR},
  295. </if>
  296. <if test="showPage != null">
  297. show_page = #{showPage,jdbcType=VARCHAR},
  298. </if>
  299. <if test="coverImg != null">
  300. cover_img = #{coverImg,jdbcType=VARCHAR},
  301. </if>
  302. <if test="startDate != null">
  303. start_date = #{startDate,jdbcType=TIMESTAMP},
  304. </if>
  305. <if test="endDate != null">
  306. end_date = #{endDate,jdbcType=TIMESTAMP},
  307. </if>
  308. <if test="category != null">
  309. category = #{category,jdbcType=INTEGER},
  310. </if>
  311. <if test="effective != null">
  312. effective = #{effective,jdbcType=INTEGER},
  313. </if>
  314. </set>
  315. where id = #{id,jdbcType=VARCHAR}
  316. </update>
  317. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.MarketingManagement">
  318. <!--
  319. WARNING - @mbg.generated
  320. This element is automatically generated by MyBatis Generator, do not modify.
  321. This element was generated on Tue Sep 26 14:34:04 CST 2017.
  322. -->
  323. update marketing_management
  324. set product_id = #{productId,jdbcType=VARCHAR},
  325. show_page = #{showPage,jdbcType=VARCHAR},
  326. cover_img = #{coverImg,jdbcType=VARCHAR},
  327. start_date = #{startDate,jdbcType=TIMESTAMP},
  328. end_date = #{endDate,jdbcType=TIMESTAMP},
  329. category = #{category,jdbcType=INTEGER},
  330. effective = #{effective,jdbcType=INTEGER}
  331. where id = #{id,jdbcType=VARCHAR}
  332. </update>
  333. </mapper>