Commit faced86f authored by 刘基明's avatar 刘基明

follow表修改

parent 0b385b67
......@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-07-07
* @since 2021-07-12
*/
@TableName("file_record")
@Builder
......@@ -54,6 +54,8 @@ public class FileRecordEntity implements Serializable {
private Integer deleteTag;
private String extInfo;
public Integer getId() {
return id;
......@@ -127,6 +129,14 @@ public class FileRecordEntity implements Serializable {
this.deleteTag = deleteTag;
}
public String getExtInfo() {
return extInfo;
}
public void setExtInfo(String extInfo) {
this.extInfo = extInfo;
}
@Override
public String toString() {
return "FileRecordEntity{" +
......@@ -139,6 +149,7 @@ public class FileRecordEntity implements Serializable {
", createTime=" + createTime +
", updateTime=" + updateTime +
", deleteTag=" + deleteTag +
", extInfo=" + extInfo +
"}";
}
}
......@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-07-07
* @since 2021-07-12
*/
@TableName("follow_rel")
@Builder
......@@ -34,7 +34,7 @@ public class FollowRelEntity implements Serializable {
private Integer id;
@ApiModelProperty(value = "被关注的人id")
private String followId;
private String followUserId;
@ApiModelProperty(value = "粉丝id")
private String followerId;
......@@ -60,12 +60,12 @@ public class FollowRelEntity implements Serializable {
this.id = id;
}
public String getFollowId() {
return followId;
public String getFollowUserId() {
return followUserId;
}
public void setFollowId(String followId) {
this.followId = followId;
public void setFollowUserId(String followUserId) {
this.followUserId = followUserId;
}
public String getFollowerId() {
......@@ -120,7 +120,7 @@ public class FollowRelEntity implements Serializable {
public String toString() {
return "FollowRelEntity{" +
"id=" + id +
", followId=" + followId +
", followUserId=" + followUserId +
", followerId=" + followerId +
", followTime=" + followTime +
", unfollowTime=" + unfollowTime +
......
......@@ -16,7 +16,7 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-07-07
* @since 2021-07-12
*/
@TableName("theme_attachment")
@Builder
......@@ -49,6 +49,8 @@ public class ThemeAttachmentEntity implements Serializable {
private Integer deleteTag;
private String extInfo;
public String getId() {
return id;
......@@ -122,6 +124,14 @@ public class ThemeAttachmentEntity implements Serializable {
this.deleteTag = deleteTag;
}
public String getExtInfo() {
return extInfo;
}
public void setExtInfo(String extInfo) {
this.extInfo = extInfo;
}
@Override
public String toString() {
return "ThemeAttachmentEntity{" +
......@@ -134,6 +144,7 @@ public class ThemeAttachmentEntity implements Serializable {
", updateBy=" + updateBy +
", updateTime=" + updateTime +
", deleteTag=" + deleteTag +
", extInfo=" + extInfo +
"}";
}
}
......@@ -20,20 +20,20 @@ public class FollowRelService {
public List<String> queryFansByFollowerId(String followerId) {
return followRelMapper.selectList(new LambdaQueryWrapper<FollowRelEntity>()
.eq(FollowRelEntity::getFollowerId, followerId))
.stream().map(FollowRelEntity::getFollowId).collect(Collectors.toList());
.stream().map(FollowRelEntity::getFollowUserId).collect(Collectors.toList());
}
// @Cacheable(value = "tempCache", keyGenerator = "communityKeyGenerator")
public List<String> queryFansByIdolId(String idolId) {
LambdaQueryWrapper<FollowRelEntity> queryWrapper = new LambdaQueryWrapper<FollowRelEntity>()
.eq(FollowRelEntity::getFollowId, idolId);
.eq(FollowRelEntity::getFollowUserId, idolId);
return followRelMapper.selectList(queryWrapper)
.stream().map(FollowRelEntity::getFollowerId).collect(Collectors.toList());
}
public void addFans(String idolId, String followerId) {
FollowRelEntity rel = new FollowRelEntity();
rel.setFollowId(idolId);
rel.setFollowUserId(idolId);
rel.setFollowerId(followerId);
followRelMapper.insert(rel);
......
......@@ -13,6 +13,7 @@
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<result column="delete_tag" property="deleteTag" />
<result column="ext_info" property="extInfo" />
</resultMap>
</mapper>
......@@ -5,7 +5,7 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.tanpu.community.dao.entity.community.FollowRelEntity">
<id column="id" property="id" />
<result column="follow_id" property="followId" />
<result column="follow_user_id" property="followUserId" />
<result column="follower_id" property="followerId" />
<result column="follow_time" property="followTime" />
<result column="unfollow_time" property="unfollowTime" />
......
......@@ -13,6 +13,7 @@
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
<result column="delete_tag" property="deleteTag" />
<result column="ext_info" property="extInfo" />
</resultMap>
</mapper>
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