Commit 8799a5d0 authored by shiyu's avatar shiyu

关注列表1

parent eb40ea9c
......@@ -10,7 +10,7 @@ import lombok.Data;
/**
* @author shiyu
* @date 2024/04/08
* @date 2024/04/09
*/
@Data
public class FollowFansRecord implements Entity {
......
......@@ -5,6 +5,7 @@
<id column="id" jdbcType="INTEGER" property="id" />
<result column="fans_id" jdbcType="BIGINT" property="fansId" />
<result column="follower_id" jdbcType="BIGINT" property="followerId" />
<result column="introducer_id" jdbcType="BIGINT" property="introducerId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="state" jdbcType="INTEGER" property="state" />
......@@ -68,7 +69,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, fans_id, follower_id, create_time, update_time, `state`
id, fans_id, follower_id, introducer_id, create_time, update_time, `state`
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.FollowFansRecordExample" resultMap="BaseResultMap">
select
......@@ -97,13 +98,13 @@
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, fans_id, follower_id, create_time, update_time, `state`
id, fans_id, follower_id, introducer_id, create_time, update_time, `state`
</otherwise>
</choose>
from follow_fans_record
......@@ -128,13 +129,13 @@
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, fans_id, follower_id, create_time, update_time, `state`
id, fans_id, follower_id, introducer_id, create_time, update_time, `state`
</otherwise>
</choose>
from follow_fans_record
......@@ -154,10 +155,12 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into follow_fans_record (fans_id, follower_id, create_time,
update_time, `state`)
values (#{fansId,jdbcType=BIGINT}, #{followerId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER})
insert into follow_fans_record (fans_id, follower_id, introducer_id,
create_time, update_time, `state`
)
values (#{fansId,jdbcType=BIGINT}, #{followerId,jdbcType=BIGINT}, #{introducerId,jdbcType=BIGINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.FollowFansRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
......@@ -171,6 +174,9 @@
<if test="followerId != null">
follower_id,
</if>
<if test="introducerId != null">
introducer_id,
</if>
<if test="createTime != null">
create_time,
</if>
......@@ -188,6 +194,9 @@
<if test="followerId != null">
#{followerId,jdbcType=BIGINT},
</if>
<if test="introducerId != null">
#{introducerId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
......@@ -217,6 +226,9 @@
<if test="record.followerId != null">
follower_id = #{record.followerId,jdbcType=BIGINT},
</if>
<if test="record.introducerId != null">
introducer_id = #{record.introducerId,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
......@@ -236,6 +248,7 @@
set id = #{record.id,jdbcType=INTEGER},
fans_id = #{record.fansId,jdbcType=BIGINT},
follower_id = #{record.followerId,jdbcType=BIGINT},
introducer_id = #{record.introducerId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
`state` = #{record.state,jdbcType=INTEGER}
......@@ -252,6 +265,9 @@
<if test="followerId != null">
follower_id = #{followerId,jdbcType=BIGINT},
</if>
<if test="introducerId != null">
introducer_id = #{introducerId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
......@@ -268,6 +284,7 @@
update follow_fans_record
set fans_id = #{fansId,jdbcType=BIGINT},
follower_id = #{followerId,jdbcType=BIGINT},
introducer_id = #{introducerId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
`state` = #{state,jdbcType=INTEGER}
......@@ -300,13 +317,13 @@
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, fans_id, follower_id, create_time, update_time, `state`
id, fans_id, follower_id, introducer_id, create_time, update_time, `state`
</otherwise>
</choose>
from follow_fans_record
......
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