提交 7ce872c4 作者: 张小凤

DynamicMa(update)

上级 a3844119
...@@ -33,6 +33,8 @@ public class AllReviewQO { ...@@ -33,6 +33,8 @@ public class AllReviewQO {
@ApiModelProperty(value = "动态id",example = "1") @ApiModelProperty(value = "动态id",example = "1")
private String dynamicId; private String dynamicId;
@ApiModelProperty(value = "用户id",example = "1",hidden = true)
private Integer userAccountId;
/** /**
* 初始化起始查询行并返回当前页 * 初始化起始查询行并返回当前页
......
...@@ -105,6 +105,8 @@ public class GambitController extends BaseController{ ...@@ -105,6 +105,8 @@ public class GambitController extends BaseController{
@ApiOperation(value = "动态对应的所有评论") @ApiOperation(value = "动态对应的所有评论")
@PostMapping("/allCommentList") @PostMapping("/allCommentList")
public ResultBody<ForumReviewDO> allCommentList(HttpServletRequest request, @RequestBody AllReviewQO allReviewQO){ public ResultBody<ForumReviewDO> allCommentList(HttpServletRequest request, @RequestBody AllReviewQO allReviewQO){
Integer userAccountId = this.getUserLoginInfoFromRedis(request).getUserAccountId();
allReviewQO.setUserAccountId(userAccountId);
return ResultBody.success(gambitService.allCommentList(allReviewQO)); return ResultBody.success(gambitService.allCommentList(allReviewQO));
} }
......
...@@ -47,6 +47,9 @@ public class ForumReviewDO implements Serializable { ...@@ -47,6 +47,9 @@ public class ForumReviewDO implements Serializable {
@ApiModelProperty(value = "pid") @ApiModelProperty(value = "pid")
private Integer pid; private Integer pid;
@ApiModelProperty(value = "status",example = "true表示已评论 null 就没有评论")
private Boolean status;
} }
...@@ -390,22 +390,25 @@ ...@@ -390,22 +390,25 @@
<select id="allCommentList" resultType="com.mmc.csf.release.entity.forum.ForumReviewDO"> <select id="allCommentList" resultType="com.mmc.csf.release.entity.forum.ForumReviewDO">
SELECT SELECT
id, fr.id,
user_account_id, fr.user_account_id,
dynamic_id, fr.dynamic_id,
content, fr.content,
review_id, fr.review_id,
like_count, fr.like_count,
create_time, fr.create_time,
update_time, fr.update_time,
pid fr.pid,
frl.`status`
FROM FROM
forum_review forum_review fr
LEFT JOIN forum_review_likes frl ON fr.dynamic_id = frl.review_id
AND frl.user_account_id = #{userAccountId}
WHERE WHERE
dynamic_id = #{dynamicId} fr.dynamic_id = #{dynamicId}
AND pid =0 AND fr.pid = 0
ORDER BY ORDER BY
create_time DESC fr.create_time DESC
limit #{pageNo}, #{pageSize} limit #{pageNo}, #{pageSize}
</select> </select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论