提交 7ce872c4 作者: 张小凤

DynamicMa(update)

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