Commit a20c600c authored by 王亚雷's avatar 王亚雷

游客权限

parent c59d6916
......@@ -11,7 +11,6 @@ import com.tanpu.community.api.beans.req.comment.QueryCommentReq;
import com.tanpu.community.api.beans.req.comment.ReportCommentReq;
import com.tanpu.community.api.beans.req.page.Page;
import com.tanpu.community.manager.CommentManager;
import com.tanpu.community.util.HttpServletHelper;
import com.tanpu.community.util.PageUtils;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
......@@ -33,9 +32,6 @@ public class CommentController {
@Resource
private UserHolder userHolder;
@Resource
HttpServletHelper httpServletHelper;
@ApiOperation("发表评论")
@AuthLogin
@PostMapping(value = "/publishComment")
......@@ -49,7 +45,7 @@ public class CommentController {
@PostMapping(value = "/queryComment")
@ResponseBody
public CommonResp<Page<CommentQo>> queryComment(@Validated @RequestBody QueryCommentReq req) {
String selfUserId = httpServletHelper.getCurrentUserId();
String selfUserId = userHolder.getUserId();
List<CommentQo> result = commentManager.queryComments(req.getThemeId(), selfUserId);
return CommonResp.success(PageUtils.page(req.getPage(), result));
}
......
......@@ -46,14 +46,12 @@ public class HomePageController {
@Resource
private UserHolder userHolder;
@Resource
HttpServletHelper httpServletHelper;
// 用户信息查询 (供圈子服务调用)
@ApiOperation(value = "个人中心 查询")
@GetMapping(value = "/queryUserInfoNew")
public CommonResp<UserInfoResp> queryUsersListNew(@RequestParam(value = "userId") String userId) {
String selfUserId = httpServletHelper.getCurrentUserId();
String selfUserId = userHolder.getUserId();
return CommonResp.success(homePageManager.queryUsersInfo(selfUserId, userId));
}
......@@ -77,7 +75,7 @@ public class HomePageController {
@ApiOperation("查询关注/粉丝列表")
@ResponseBody
public CommonResp<Page<FollowQo>> queryFollowList(@RequestBody QueryFollowReq req) {
String selfUserId = httpServletHelper.getCurrentUserId();
String selfUserId = userHolder.getUserId();
return CommonResp.success(homePageManager.queryFollow(req, selfUserId));
}
......@@ -95,7 +93,7 @@ public class HomePageController {
@ApiOperation("用户的帖子列表")
@ResponseBody
public CommonResp<List<ThemeQo>> likeList(@Validated @RequestBody QueryRecordThemeReq req) {
String selfUserId = httpServletHelper.getCurrentUserId();
String selfUserId = userHolder.getUserId();
return CommonResp.success(themeManager.queryThemesByUser(req, selfUserId));
}
......
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