Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
tanpu-community
Commits
f732e407
Commit
f732e407
authored
Jul 14, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户信息源修改
parent
0a67e598
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
CommentController.java
...ava/com/tanpu/community/controller/CommentController.java
+2
-0
ThemeController.java
.../java/com/tanpu/community/controller/ThemeController.java
+11
-2
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+1
-4
No files found.
community-service/src/main/java/com/tanpu/community/controller/CommentController.java
View file @
f732e407
...
@@ -52,6 +52,7 @@ public class CommentController {
...
@@ -52,6 +52,7 @@ public class CommentController {
@ApiOperation
(
"点赞评论"
)
@ApiOperation
(
"点赞评论"
)
@PostMapping
(
value
=
"/likeComment"
)
@PostMapping
(
value
=
"/likeComment"
)
@AuthLogin
@ResponseBody
@ResponseBody
public
CommonResp
<
Void
>
likeComment
(
@RequestBody
LikeCommentReq
req
)
{
public
CommonResp
<
Void
>
likeComment
(
@RequestBody
LikeCommentReq
req
)
{
String
userId
=
userHolder
.
getUserId
();
String
userId
=
userHolder
.
getUserId
();
...
@@ -61,6 +62,7 @@ public class CommentController {
...
@@ -61,6 +62,7 @@ public class CommentController {
@ApiOperation
(
"举报评论"
)
@ApiOperation
(
"举报评论"
)
@GetMapping
(
value
=
"/reportComment"
)
@GetMapping
(
value
=
"/reportComment"
)
@AuthLogin
@ResponseBody
@ResponseBody
public
CommonResp
<
Void
>
reportComment
(
@RequestParam
String
commentId
)
{
public
CommonResp
<
Void
>
reportComment
(
@RequestParam
String
commentId
)
{
//todo
//todo
...
...
community-service/src/main/java/com/tanpu/community/controller/ThemeController.java
View file @
f732e407
...
@@ -2,6 +2,7 @@ package com.tanpu.community.controller;
...
@@ -2,6 +2,7 @@ package com.tanpu.community.controller;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.common.auth.AuthLogin
;
import
com.tanpu.common.auth.UserHolder
;
import
com.tanpu.common.auth.UserHolder
;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.community.api.beans.qo.ThemeQo
;
import
com.tanpu.community.api.beans.qo.ThemeQo
;
...
@@ -27,6 +28,7 @@ public class ThemeController {
...
@@ -27,6 +28,7 @@ public class ThemeController {
@Resource
@Resource
private
UserHolder
userHolder
;
private
UserHolder
userHolder
;
@AuthLogin
@ApiOperation
(
"发表主题"
)
@ApiOperation
(
"发表主题"
)
@PostMapping
(
value
=
"/publish"
)
@PostMapping
(
value
=
"/publish"
)
@ResponseBody
@ResponseBody
...
@@ -39,7 +41,7 @@ public class ThemeController {
...
@@ -39,7 +41,7 @@ public class ThemeController {
return
CommonResp
.
success
();
return
CommonResp
.
success
();
}
}
@AuthLogin
@ApiOperation
(
"圈子首页-推荐/关注/热门/最新"
)
@ApiOperation
(
"圈子首页-推荐/关注/热门/最新"
)
@PostMapping
(
value
=
"/list"
)
@PostMapping
(
value
=
"/list"
)
@ResponseBody
@ResponseBody
...
@@ -52,7 +54,7 @@ public class ThemeController {
...
@@ -52,7 +54,7 @@ public class ThemeController {
return
CommonResp
.
success
(
result
);
return
CommonResp
.
success
(
result
);
}
}
@AuthLogin
@ApiOperation
(
"主题正文"
)
@ApiOperation
(
"主题正文"
)
@GetMapping
(
value
=
"/detail"
)
@GetMapping
(
value
=
"/detail"
)
@ResponseBody
@ResponseBody
...
@@ -62,6 +64,7 @@ public class ThemeController {
...
@@ -62,6 +64,7 @@ public class ThemeController {
return
CommonResp
.
success
(
themeQo
);
return
CommonResp
.
success
(
themeQo
);
}
}
@AuthLogin
@ApiOperation
(
"转发主题"
)
@ApiOperation
(
"转发主题"
)
@PostMapping
(
value
=
"/forward"
)
@PostMapping
(
value
=
"/forward"
)
@ResponseBody
@ResponseBody
...
@@ -71,6 +74,7 @@ public class ThemeController {
...
@@ -71,6 +74,7 @@ public class ThemeController {
return
CommonResp
.
success
();
return
CommonResp
.
success
();
}
}
@AuthLogin
@ApiOperation
(
"点赞/取消点赞主题"
)
@ApiOperation
(
"点赞/取消点赞主题"
)
@PostMapping
(
value
=
"/like"
)
@PostMapping
(
value
=
"/like"
)
@ResponseBody
@ResponseBody
...
@@ -80,6 +84,7 @@ public class ThemeController {
...
@@ -80,6 +84,7 @@ public class ThemeController {
return
CommonResp
.
success
();
return
CommonResp
.
success
();
}
}
@AuthLogin
@ApiOperation
(
"用户删除自有主题"
)
@ApiOperation
(
"用户删除自有主题"
)
@GetMapping
(
value
=
"/delete"
)
@GetMapping
(
value
=
"/delete"
)
@ResponseBody
@ResponseBody
...
@@ -89,6 +94,7 @@ public class ThemeController {
...
@@ -89,6 +94,7 @@ public class ThemeController {
return
CommonResp
.
success
();
return
CommonResp
.
success
();
}
}
@AuthLogin
@ApiOperation
(
"收藏/取消收藏主题"
)
@ApiOperation
(
"收藏/取消收藏主题"
)
@PostMapping
(
value
=
"/collect"
)
@PostMapping
(
value
=
"/collect"
)
@ResponseBody
@ResponseBody
...
@@ -98,6 +104,7 @@ public class ThemeController {
...
@@ -98,6 +104,7 @@ public class ThemeController {
return
CommonResp
.
success
();
return
CommonResp
.
success
();
}
}
@AuthLogin
@ApiOperation
(
"举报主题"
)
@ApiOperation
(
"举报主题"
)
@PostMapping
(
value
=
"/report"
)
@PostMapping
(
value
=
"/report"
)
@ResponseBody
@ResponseBody
...
@@ -106,6 +113,7 @@ public class ThemeController {
...
@@ -106,6 +113,7 @@ public class ThemeController {
return
CommonResp
.
failed
(
"功能暂未开放"
);
return
CommonResp
.
failed
(
"功能暂未开放"
);
}
}
@AuthLogin
@ApiOperation
(
"分享主题"
)
@ApiOperation
(
"分享主题"
)
@GetMapping
(
value
=
"/share"
)
@GetMapping
(
value
=
"/share"
)
@ResponseBody
@ResponseBody
...
@@ -113,6 +121,7 @@ public class ThemeController {
...
@@ -113,6 +121,7 @@ public class ThemeController {
return
CommonResp
.
failed
(
"功能暂未开放"
);
return
CommonResp
.
failed
(
"功能暂未开放"
);
}
}
@AuthLogin
@ApiOperation
(
"屏蔽"
)
@ApiOperation
(
"屏蔽"
)
@GetMapping
(
value
=
"/block"
)
@GetMapping
(
value
=
"/block"
)
@ResponseBody
@ResponseBody
...
...
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
f732e407
...
@@ -215,15 +215,12 @@ public class ThemeManager {
...
@@ -215,15 +215,12 @@ public class ThemeManager {
//附件列表
//附件列表
String
themeId
=
themeQo
.
getThemeId
();
String
themeId
=
themeQo
.
getThemeId
();
//迄今时间
//迄今时间
themeQo
.
setUpToNowTime
(
calUpToNowTime
(
themeQo
.
getCreateTime
()));
themeQo
.
setUpToNowTime
(
calUpToNowTime
(
themeQo
.
getCreateTime
()));
//是否关注作者
//是否关注作者
String
authorId
=
themeQo
.
getAuthorId
();
String
authorId
=
themeQo
.
getAuthorId
();
Set
<
String
>
fansSet
=
new
HashSet
<>(
followRelService
.
queryFansByFollowerId
(
userId
));
Set
<
String
>
fansSet
=
new
HashSet
<>(
followRelService
.
queryFansByFollowerId
(
userId
));
if
(
fansSet
!=
null
){
themeQo
.
setFollow
(
fansSet
.
contains
(
authorId
));
themeQo
.
setFollow
(
fansSet
.
contains
(
authorId
));
}
//是否点赞
//是否点赞
CollectionEntity
likeEntity
=
collectionService
.
getNotDeleteTargetCollection
(
themeId
,
userId
,
CollectionTypeEnum
.
LIKE_THEME
);
CollectionEntity
likeEntity
=
collectionService
.
getNotDeleteTargetCollection
(
themeId
,
userId
,
CollectionTypeEnum
.
LIKE_THEME
);
themeQo
.
setHasLiked
(
likeEntity
!=
null
);
themeQo
.
setHasLiked
(
likeEntity
!=
null
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment