Commit 8799a5d0 authored by shiyu's avatar shiyu

关注列表1

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