Commit c5dd98cf authored by muhong's avatar muhong

修改 小程序藏品接口

parent cabdb8f4
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<mapper namespace="com.wwdz.ch.db.mapper.FavoritesItemsRelationMapper"> <mapper namespace="com.wwdz.ch.db.mapper.FavoritesItemsRelationMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.FavoritesItemsRelation"> <resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.FavoritesItemsRelation">
<result column="favorites_id" jdbcType="BIGINT" property="favoritesId" /> <result column="favorites_id" jdbcType="BIGINT" property="favoritesId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="item_id" jdbcType="BIGINT" property="itemId" /> <result column="item_id" jdbcType="BIGINT" property="itemId" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" /> <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
</resultMap> </resultMap>
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
favorites_id, item_id, add_time favorites_id, user_id, item_id, add_time
</sql> </sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.FavoritesItemsRelationExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.wwdz.ch.db.domain.FavoritesItemsRelationExample" resultMap="BaseResultMap">
select select
...@@ -94,13 +95,13 @@ ...@@ -94,13 +95,13 @@
distinct distinct
</if> </if>
<choose> <choose>
<when test="selective != null and selective.length > 0"> <when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=","> <foreach collection="selective" item="column" separator=",">
${column.escapedColumnName} ${column.escapedColumnName}
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
favorites_id, item_id, add_time favorites_id, user_id, item_id, add_time
</otherwise> </otherwise>
</choose> </choose>
from favorites_items_relation from favorites_items_relation
...@@ -118,16 +119,16 @@ ...@@ -118,16 +119,16 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.FavoritesItemsRelation"> <insert id="insert" parameterType="com.wwdz.ch.db.domain.FavoritesItemsRelation">
insert into favorites_items_relation (favorites_id, item_id, add_time insert into favorites_items_relation (favorites_id, user_id, item_id,
) add_time)
values (#{favoritesId,jdbcType=BIGINT}, #{itemId,jdbcType=BIGINT}, #{addTime,jdbcType=TIMESTAMP} values (#{favoritesId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{itemId,jdbcType=BIGINT},
) #{addTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="batchInsert" parameterType="com.wwdz.ch.db.domain.FavoritesItemsRelation"> <insert id="batchInsert" parameterType="com.wwdz.ch.db.domain.FavoritesItemsRelation">
insert into favorites_coins_relation (favorites_id, item_id, add_time) insert into favorites_items_relation (favorites_id, user_id, item_id,
values add_time)
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.favoritesId,jdbcType=BIGINT}, #{item.itemId,jdbcType=BIGINT}, #{item.addTime,jdbcType=TIMESTAMP}) (#{item.favoritesId,jdbcType=BIGINT}, #{item.userId,jdbcType=BIGINT}, #{item.itemId,jdbcType=BIGINT}, #{item.addTime,jdbcType=TIMESTAMP})
</foreach> </foreach>
</insert> </insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.FavoritesItemsRelation"> <insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.FavoritesItemsRelation">
...@@ -136,6 +137,9 @@ ...@@ -136,6 +137,9 @@
<if test="favoritesId != null"> <if test="favoritesId != null">
favorites_id, favorites_id,
</if> </if>
<if test="userId != null">
user_id,
</if>
<if test="itemId != null"> <if test="itemId != null">
item_id, item_id,
</if> </if>
...@@ -147,6 +151,9 @@ ...@@ -147,6 +151,9 @@
<if test="favoritesId != null"> <if test="favoritesId != null">
#{favoritesId,jdbcType=BIGINT}, #{favoritesId,jdbcType=BIGINT},
</if> </if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="itemId != null"> <if test="itemId != null">
#{itemId,jdbcType=BIGINT}, #{itemId,jdbcType=BIGINT},
</if> </if>
...@@ -167,6 +174,9 @@ ...@@ -167,6 +174,9 @@
<if test="record.favoritesId != null"> <if test="record.favoritesId != null">
favorites_id = #{record.favoritesId,jdbcType=BIGINT}, favorites_id = #{record.favoritesId,jdbcType=BIGINT},
</if> </if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.itemId != null"> <if test="record.itemId != null">
item_id = #{record.itemId,jdbcType=BIGINT}, item_id = #{record.itemId,jdbcType=BIGINT},
</if> </if>
...@@ -181,6 +191,7 @@ ...@@ -181,6 +191,7 @@
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update favorites_items_relation update favorites_items_relation
set favorites_id = #{record.favoritesId,jdbcType=BIGINT}, set favorites_id = #{record.favoritesId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT}, item_id = #{record.itemId,jdbcType=BIGINT},
add_time = #{record.addTime,jdbcType=TIMESTAMP} add_time = #{record.addTime,jdbcType=TIMESTAMP}
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -214,13 +225,13 @@ ...@@ -214,13 +225,13 @@
select select
'true' as QUERYID, 'true' as QUERYID,
<choose> <choose>
<when test="selective != null and selective.length > 0"> <when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=","> <foreach collection="selective" item="column" separator=",">
${column.escapedColumnName} ${column.escapedColumnName}
</foreach> </foreach>
</when> </when>
<otherwise> <otherwise>
favorites_id, item_id, add_time favorites_id, user_id, item_id, add_time
</otherwise> </otherwise>
</choose> </choose>
from favorites_items_relation from favorites_items_relation
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment