SelectionGroupMapper.xml 8.8 KB

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