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

Merge remote-tracking branch 'origin/v2.2.7' into dev

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