|
@@ -1,22 +1,20 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
-<mapper namespace="WebsiteES.myBatis.GoodsMapper" >
|
|
|
- <resultMap id="BaseResultMap" type="WebsiteES.myBatis.Goods" >
|
|
|
+<mapper namespace="WebsiteES.myBatis.UserCollectMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="WebsiteES.myBatis.UserCollect" >
|
|
|
<!--
|
|
|
WARNING - @mbggenerated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
-->
|
|
|
- <id column="goods_id" property="goodsId" jdbcType="BIGINT" />
|
|
|
- <result column="postion" property="postion" jdbcType="VARCHAR" />
|
|
|
- <result column="name" property="name" jdbcType="VARCHAR" />
|
|
|
- <result column="star" property="star" jdbcType="INTEGER" />
|
|
|
+ <id column="user_collect_Id" property="userCollectId" jdbcType="BIGINT" />
|
|
|
+ <result column="goodId" property="goodid" jdbcType="BIGINT" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
<!--
|
|
|
WARNING - @mbggenerated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
-->
|
|
|
- goods_id, postion, name, star
|
|
|
+ user_collect_Id, goodId
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
<!--
|
|
@@ -25,90 +23,68 @@
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
- from goods
|
|
|
- where goods_id = #{goodsId,jdbcType=BIGINT}
|
|
|
+ from user_collect
|
|
|
+ where user_collect_Id = #{userCollectId,jdbcType=BIGINT}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
<!--
|
|
|
WARNING - @mbggenerated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
-->
|
|
|
- delete from goods
|
|
|
- where goods_id = #{goodsId,jdbcType=BIGINT}
|
|
|
+ delete from user_collect
|
|
|
+ where user_collect_Id = #{userCollectId,jdbcType=BIGINT}
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="WebsiteES.myBatis.Goods" >
|
|
|
+ <insert id="insert" parameterType="WebsiteES.myBatis.UserCollect" >
|
|
|
<!--
|
|
|
WARNING - @mbggenerated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
-->
|
|
|
- insert into goods (goods_id, postion, name,
|
|
|
- star)
|
|
|
- values (#{goodsId,jdbcType=BIGINT}, #{postion,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
- #{star,jdbcType=INTEGER})
|
|
|
+ insert into user_collect (user_collect_Id, goodId)
|
|
|
+ values (#{userCollectId,jdbcType=BIGINT}, #{goodid,jdbcType=BIGINT})
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" parameterType="WebsiteES.myBatis.Goods" >
|
|
|
+ <insert id="insertSelective" parameterType="WebsiteES.myBatis.UserCollect" >
|
|
|
<!--
|
|
|
WARNING - @mbggenerated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
-->
|
|
|
- insert into goods
|
|
|
+ insert into user_collect
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
- <if test="goodsId != null" >
|
|
|
- goods_id,
|
|
|
+ <if test="userCollectId != null" >
|
|
|
+ user_collect_Id,
|
|
|
</if>
|
|
|
- <if test="postion != null" >
|
|
|
- postion,
|
|
|
- </if>
|
|
|
- <if test="name != null" >
|
|
|
- name,
|
|
|
- </if>
|
|
|
- <if test="star != null" >
|
|
|
- star,
|
|
|
+ <if test="goodid != null" >
|
|
|
+ goodId,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
- <if test="goodsId != null" >
|
|
|
- #{goodsId,jdbcType=BIGINT},
|
|
|
- </if>
|
|
|
- <if test="postion != null" >
|
|
|
- #{postion,jdbcType=VARCHAR},
|
|
|
+ <if test="userCollectId != null" >
|
|
|
+ #{userCollectId,jdbcType=BIGINT},
|
|
|
</if>
|
|
|
- <if test="name != null" >
|
|
|
- #{name,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="star != null" >
|
|
|
- #{star,jdbcType=INTEGER},
|
|
|
+ <if test="goodid != null" >
|
|
|
+ #{goodid,jdbcType=BIGINT},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="WebsiteES.myBatis.Goods" >
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="WebsiteES.myBatis.UserCollect" >
|
|
|
<!--
|
|
|
WARNING - @mbggenerated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
-->
|
|
|
- update goods
|
|
|
+ update user_collect
|
|
|
<set >
|
|
|
- <if test="postion != null" >
|
|
|
- postion = #{postion,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="name != null" >
|
|
|
- name = #{name,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="star != null" >
|
|
|
- star = #{star,jdbcType=INTEGER},
|
|
|
+ <if test="goodid != null" >
|
|
|
+ goodId = #{goodid,jdbcType=BIGINT},
|
|
|
</if>
|
|
|
</set>
|
|
|
- where goods_id = #{goodsId,jdbcType=BIGINT}
|
|
|
+ where user_collect_Id = #{userCollectId,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="WebsiteES.myBatis.Goods" >
|
|
|
+ <update id="updateByPrimaryKey" parameterType="WebsiteES.myBatis.UserCollect" >
|
|
|
<!--
|
|
|
WARNING - @mbggenerated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
-->
|
|
|
- update goods
|
|
|
- set postion = #{postion,jdbcType=VARCHAR},
|
|
|
- name = #{name,jdbcType=VARCHAR},
|
|
|
- star = #{star,jdbcType=INTEGER}
|
|
|
- where goods_id = #{goodsId,jdbcType=BIGINT}
|
|
|
+ update user_collect
|
|
|
+ set goodId = #{goodid,jdbcType=BIGINT}
|
|
|
+ where user_collect_Id = #{userCollectId,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
</mapper>
|