GoodsMapper.xml 9.3 KB

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