修复无法注册 Bug + 完善我的回复功能
This commit is contained in:
parent
aa6c6b3f6c
commit
bfc7a5d8e5
18
README.md
18
README.md
@ -9,10 +9,11 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
[](https://github.com/Veal98/Echo/stargazers)
|
[](https://github.com/Veal98/Echo/stargazers)
|
||||||
[](https://github.com/Veal98/Echo/network)
|
[](https://github.com/Veal98/Echo/network)
|
||||||
[]()
|
[](https://gitee.com/veal98/Echo/stargazers)
|
||||||
|
[](https://gitee.com/veal98/Echo/members)
|
||||||
|
[]()
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -235,8 +236,8 @@ Echo 是一套前后端不分离的开源社区系统,基于目前主流 Java
|
|||||||
以下是我个人发现的本项目存在的问题,但是暂时没有头绪无法解决,集思广益,欢迎各位小伙伴提 PR 解决:
|
以下是我个人发现的本项目存在的问题,但是暂时没有头绪无法解决,集思广益,欢迎各位小伙伴提 PR 解决:
|
||||||
|
|
||||||
- [ ] 注册模块无法正常跳转到操作提示界面(本地运行没有问题)
|
- [ ] 注册模块无法正常跳转到操作提示界面(本地运行没有问题)
|
||||||
- [ ] 评论功能的前端显示部分存在 Bug
|
- [x] 评论功能的前端显示部分存在 Bug
|
||||||
- [ ] 查询我的评论(未完善)
|
- [x] 查询我的评论(未完善)
|
||||||
|
|
||||||
以下是我觉得本项目还可以添加的功能,同样欢迎各位小伙伴提 issue 指出还可以增加哪些功能,或者直接提 PR 实现该功能:
|
以下是我觉得本项目还可以添加的功能,同样欢迎各位小伙伴提 issue 指出还可以增加哪些功能,或者直接提 PR 实现该功能:
|
||||||
|
|
||||||
@ -537,13 +538,20 @@ double score = Math.log10(Math.max(w, 1))
|
|||||||
|
|
||||||
- [必读:Echo 项目的 README](https://mp.weixin.qq.com/s/iiukwRNW1-my1q6UjYl4iw)
|
- [必读:Echo 项目的 README](https://mp.weixin.qq.com/s/iiukwRNW1-my1q6UjYl4iw)
|
||||||
- [Echo 项目结构分析](https://mp.weixin.qq.com/s/dZqSB0EN5-rmGQeG3Lx2jA)
|
- [Echo 项目结构分析](https://mp.weixin.qq.com/s/dZqSB0EN5-rmGQeG3Lx2jA)
|
||||||
- Echo 数据库表分析
|
- Echo 的数据库表是如何设计的
|
||||||
|
- Echo 技术选型分析
|
||||||
|
|
||||||
### 部署篇
|
### 部署篇
|
||||||
|
|
||||||
- [Echo 在 Windows 环境下的部署](https://mp.weixin.qq.com/s/ZgYGqLB5_rfCXNrW9jqgtQ)
|
- [Echo 在 Windows 环境下的部署](https://mp.weixin.qq.com/s/ZgYGqLB5_rfCXNrW9jqgtQ)
|
||||||
- [Echo 在 Linux 服务器上的部署](https://mp.weixin.qq.com/s/q9X5sJv7mtPaSApZB0PxPA)
|
- [Echo 在 Linux 服务器上的部署](https://mp.weixin.qq.com/s/q9X5sJv7mtPaSApZB0PxPA)
|
||||||
|
|
||||||
|
### 架构篇
|
||||||
|
|
||||||
|
### 技术要点篇
|
||||||
|
|
||||||
|
### 常见面试题
|
||||||
|
|
||||||
## 📞 联系我
|
## 📞 联系我
|
||||||
|
|
||||||
有什么问题也可以添加我的微信,记得备注来意:格式 <u>(学校或公司 - 姓名或昵称 - 来意)</u>
|
有什么问题也可以添加我的微信,记得备注来意:格式 <u>(学校或公司 - 姓名或昵称 - 来意)</u>
|
||||||
|
@ -524,13 +524,20 @@ double score = Math.log10(Math.max(w, 1))
|
|||||||
|
|
||||||
- [必读:Echo 项目的 README](https://mp.weixin.qq.com/s/iiukwRNW1-my1q6UjYl4iw)
|
- [必读:Echo 项目的 README](https://mp.weixin.qq.com/s/iiukwRNW1-my1q6UjYl4iw)
|
||||||
- [Echo 项目结构分析](https://mp.weixin.qq.com/s/dZqSB0EN5-rmGQeG3Lx2jA)
|
- [Echo 项目结构分析](https://mp.weixin.qq.com/s/dZqSB0EN5-rmGQeG3Lx2jA)
|
||||||
- Echo 数据库表分析
|
- Echo 的数据库表是如何设计的
|
||||||
|
- Echo 技术选型分析
|
||||||
|
|
||||||
### 部署篇
|
### 部署篇
|
||||||
|
|
||||||
- [Echo 在 Windows 环境下的部署](https://mp.weixin.qq.com/s/ZgYGqLB5_rfCXNrW9jqgtQ)
|
- [Echo 在 Windows 环境下的部署](https://mp.weixin.qq.com/s/ZgYGqLB5_rfCXNrW9jqgtQ)
|
||||||
- [Echo 在 Linux 服务器上的部署](https://mp.weixin.qq.com/s/q9X5sJv7mtPaSApZB0PxPA)
|
- [Echo 在 Linux 服务器上的部署](https://mp.weixin.qq.com/s/q9X5sJv7mtPaSApZB0PxPA)
|
||||||
|
|
||||||
|
### 架构篇
|
||||||
|
|
||||||
|
### 技术要点篇
|
||||||
|
|
||||||
|
### 常见面试题
|
||||||
|
|
||||||
## 📞 联系我
|
## 📞 联系我
|
||||||
|
|
||||||
有什么问题也可以添加我的微信,记得备注来意:格式 <u>(学校或公司 - 姓名或昵称 - 来意)</u>
|
有什么问题也可以添加我的微信,记得备注来意:格式 <u>(学校或公司 - 姓名或昵称 - 来意)</u>
|
||||||
|
@ -138,7 +138,7 @@ public class DiscussPostController implements CommunityConstant {
|
|||||||
Map<String, Object> replyVo = new HashMap<>();
|
Map<String, Object> replyVo = new HashMap<>();
|
||||||
replyVo.put("reply", reply); // 回复
|
replyVo.put("reply", reply); // 回复
|
||||||
replyVo.put("user", userService.findUserById(reply.getUserId())); // 发布该回复的作者
|
replyVo.put("user", userService.findUserById(reply.getUserId())); // 发布该回复的作者
|
||||||
User target = reply.getTargetId() == 0 ? null : userService.findUserById(reply.getUserId());
|
User target = reply.getTargetId() == 0 ? null : userService.findUserById(reply.getTargetId());
|
||||||
replyVo.put("target", target); // 该回复的目标用户
|
replyVo.put("target", target); // 该回复的目标用户
|
||||||
likeCount = likeService.findEntityLikeCount(ENTITY_TYPE_COMMENT, reply.getId());
|
likeCount = likeService.findEntityLikeCount(ENTITY_TYPE_COMMENT, reply.getId());
|
||||||
replyVo.put("likeCount", likeCount); // 该回复的点赞数量
|
replyVo.put("likeCount", likeCount); // 该回复的点赞数量
|
||||||
|
@ -248,9 +248,18 @@ public class UserController implements CommunityConstant {
|
|||||||
for (Comment comment : list) {
|
for (Comment comment : list) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("comment", comment);
|
map.put("comment", comment);
|
||||||
|
// 显示评论/回复对应的文章信息
|
||||||
// 待做
|
if (comment.getEntityType() == ENTITY_TYPE_POST) {
|
||||||
|
// 如果是对帖子的评论,则直接查询 target_id 即可
|
||||||
|
DiscussPost post = discussPostService.findDiscussPostById(comment.getEntityId());
|
||||||
|
map.put("post", post);
|
||||||
|
}
|
||||||
|
else if (comment.getEntityType() == ENTITY_TYPE_COMMENT) {
|
||||||
|
// 如过是对评论的回复,则先根据该回复的 target_id 查询评论的 id, 再根据该评论的 target_id 查询帖子的 id
|
||||||
|
Comment targetComment = commentService.findCommentById(comment.getEntityId());
|
||||||
|
DiscussPost post = discussPostService.findDiscussPostById(targetComment.getEntityId());
|
||||||
|
map.put("post", post);
|
||||||
|
}
|
||||||
|
|
||||||
comments.add(map);
|
comments.add(map);
|
||||||
}
|
}
|
||||||
|
@ -42,12 +42,6 @@ public class EventConsumer implements CommunityConstant {
|
|||||||
@Value("${qiniu.key.secret}")
|
@Value("${qiniu.key.secret}")
|
||||||
private String secretKey;
|
private String secretKey;
|
||||||
|
|
||||||
@Value("${qiniu.bucket.share.name}")
|
|
||||||
private String shareBucketName;
|
|
||||||
|
|
||||||
@Value("${qiniu.bucket.share.url}")
|
|
||||||
private String shareBucketUrl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消费评论、点赞、关注事件
|
* 消费评论、点赞、关注事件
|
||||||
* @param record
|
* @param record
|
||||||
|
@ -15,6 +15,7 @@ spring.datasource.url = jdbc:mysql://127.0.0.1:3306/greatecommunity?characterEnc
|
|||||||
spring.datasource.username = root
|
spring.datasource.username = root
|
||||||
spring.datasource.password = root
|
spring.datasource.password = root
|
||||||
# Mysql 5.0+ 版本使用 com.mysql.jdbc.Driver
|
# Mysql 5.0+ 版本使用 com.mysql.jdbc.Driver
|
||||||
|
# 如果是 8.0+ 的版本请改成 com.mysql.cj.jdbc.Driver
|
||||||
spring.datasource.driver-class-name = com.mysql.jdbc.Driver
|
spring.datasource.driver-class-name = com.mysql.jdbc.Driver
|
||||||
|
|
||||||
# Mybatis
|
# Mybatis
|
||||||
|
@ -79,6 +79,7 @@
|
|||||||
<div class="mt-0">
|
<div class="mt-0">
|
||||||
<span class="font-size-12 text-success" th:utext="${cvo.user.username}"></span>
|
<span class="font-size-12 text-success" th:utext="${cvo.user.username}"></span>
|
||||||
<span class="badge badge-secondary float-right floor">
|
<span class="badge badge-secondary float-right floor">
|
||||||
|
<!-- 楼数 -->
|
||||||
<i th:text="${page.offset + cvoStat.count}"></i> 楼
|
<i th:text="${page.offset + cvoStat.count}"></i> 楼
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,11 +28,11 @@
|
|||||||
<li class="border-bottom pb-3 mt-4" th:each="map:${discussPosts}">
|
<li class="border-bottom pb-3 mt-4" th:each="map:${discussPosts}">
|
||||||
<div class="font-size-16 text-info">
|
<div class="font-size-16 text-info">
|
||||||
<a th:href="@{|/discuss/detail/${map.post.id}|}" class="text-info" th:utext="${map.post.title}">文章标题</a>
|
<a th:href="@{|/discuss/detail/${map.post.id}|}" class="text-info" th:utext="${map.post.title}">文章标题</a>
|
||||||
</div>
|
<span class="text-right font-size-12 text-muted">
|
||||||
<div class="mt-1 font-size-14" th:utext="${map.post.content}">文章内容</div>
|
|
||||||
<div class="text-right font-size-12 text-muted">
|
|
||||||
赞 <i class="mr-3" th:text="${map.likeCount}"></i>
|
赞 <i class="mr-3" th:text="${map.likeCount}"></i>
|
||||||
|
评论 <i class="mr-3" th:text="${map.post.commentCount}"></i>
|
||||||
发布于 <b th:text="${#dates.format(map.post.createTime,'yyyy-MM-dd HH:mm:ss')}"></b>
|
发布于 <b th:text="${#dates.format(map.post.createTime,'yyyy-MM-dd HH:mm:ss')}"></b>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<ul class="list-unstyled mt-4 pl-3 pr-3">
|
<ul class="list-unstyled mt-4 pl-3 pr-3">
|
||||||
<li class="border-bottom pb-3 mt-4" th:each="map:${comments}">
|
<li class="border-bottom pb-3 mt-4" th:each="map:${comments}">
|
||||||
<div class="font-size-16 text-info">
|
<div class="font-size-16 text-info">
|
||||||
<a href="#" class="text-info" >文章标题</a>
|
<a th:utext="${map.post.title}" th:href="@{|/discuss/detail/${map.post.id}|}" class="text-info" >文章标题</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1 font-size-14" th:utext="${map.comment.content}">回复内容</div>
|
<div class="mt-1 font-size-14" th:utext="${map.comment.content}">回复内容</div>
|
||||||
<div class="text-right font-size-12 text-muted">
|
<div class="text-right font-size-12 text-muted">
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<a th:class="|nav-link ${tab=='mypost' ? 'active' : ''}|" th:href="@{|/user/discuss/${user.id}|}">我的帖子</a>
|
<a th:class="|nav-link ${tab=='mypost' ? 'active' : ''}|" th:href="@{|/user/discuss/${user.id}|}">我的帖子</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a th:class="|nav-link ${tab=='myreply' ? 'active' : ''}|" th:href="@{|/user/comment/${user.id}|}">我的回复(未完成)</a>
|
<a th:class="|nav-link ${tab=='myreply' ? 'active' : ''}|" th:href="@{|/user/comment/${user.id}|}">我的回复</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user