SelectionMapper.xml 9.2 KB

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