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
192d1954
Commit
192d1954
authored
Feb 24, 2022
by
刘基明
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2.3.1' into 'dev'
帖子正文是否管理员 See merge request
!77
parents
89548911
52045725
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+3
-0
TopicService.java
...c/main/java/com/tanpu/community/service/TopicService.java
+8
-3
application-test.yml
community-service/src/main/resources/application-test.yml
+5
-1
No files found.
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
192d1954
...
...
@@ -762,6 +762,9 @@ public class ThemeManager {
if
(
StringUtils
.
isNotEmpty
(
userId
))
{
buildThemeExtraInfoByUser
(
userId
,
themeQo
);
}
// 是否管理员
topicService
.
checkManager
(
themeQo
.
getTopicId
(),
themeQo
);
return
CommonResp
.
success
(
themeQo
);
}
...
...
community-service/src/main/java/com/tanpu/community/service/TopicService.java
View file @
192d1954
...
...
@@ -29,6 +29,7 @@ import com.tanpu.community.dao.mapper.community.TopicSubjectMapper;
import
com.tanpu.community.util.ConvertUtil
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.stereotype.Service
;
...
...
@@ -54,6 +55,8 @@ public class TopicService {
private
FeignService
feignService
;
@Resource
private
TopicSubjectMapper
topicSubjectMapper
;
@Value
(
"${msg.kefu.telephone:021-65681889}"
)
private
String
kefuTelephone
;
public
List
<
TopicEntity
>
queryAll
()
{
...
...
@@ -196,9 +199,7 @@ public class TopicService {
public
String
getPermissionToast
(
String
topicId
)
{
String
permission
=
"专业版会员"
;
return
"暂无权限参与此话题~您可联系官方客服 021- 了解详情"
;
return
"暂无权限参与此话题~您可联系官方客服"
+
kefuTelephone
+
"了解详情"
;
// return "该话题仅限" + permission + "可参与哦~";
}
...
...
@@ -287,6 +288,10 @@ public class TopicService {
}
}
public
void
checkManager
(
String
topicId
,
ThemeQo
theme
)
{
checkManager
(
topicId
,
Collections
.
singletonList
(
theme
));
}
public
List
<
TopicManagerEntity
>
getManagersByTopic
(
String
topicId
)
{
return
topicManagerMapper
.
selectList
(
new
LambdaQueryWrapper
<
TopicManagerEntity
>().
eq
(
TopicManagerEntity:
:
getTopicId
,
topicId
));
}
...
...
community-service/src/main/resources/application-test.yml
View file @
192d1954
...
...
@@ -142,4 +142,8 @@ pagehelper:
helperDialect
:
mysql
reasonable
:
true
supportMethodsArguments
:
true
params
:
count=countSql
\ No newline at end of file
params
:
count=countSql
msg
:
kefu
:
telephone
:
021-65681889
\ No newline at end of file
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