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
52045725
Commit
52045725
authored
Feb 24, 2022
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
帖子正文是否管理员
parent
2e06b1ce
Show 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 @
52045725
...
@@ -762,6 +762,9 @@ public class ThemeManager {
...
@@ -762,6 +762,9 @@ public class ThemeManager {
if
(
StringUtils
.
isNotEmpty
(
userId
))
{
if
(
StringUtils
.
isNotEmpty
(
userId
))
{
buildThemeExtraInfoByUser
(
userId
,
themeQo
);
buildThemeExtraInfoByUser
(
userId
,
themeQo
);
}
}
// 是否管理员
topicService
.
checkManager
(
themeQo
.
getTopicId
(),
themeQo
);
return
CommonResp
.
success
(
themeQo
);
return
CommonResp
.
success
(
themeQo
);
}
}
...
...
community-service/src/main/java/com/tanpu/community/service/TopicService.java
View file @
52045725
...
@@ -29,6 +29,7 @@ import com.tanpu.community.dao.mapper.community.TopicSubjectMapper;
...
@@ -29,6 +29,7 @@ import com.tanpu.community.dao.mapper.community.TopicSubjectMapper;
import
com.tanpu.community.util.ConvertUtil
;
import
com.tanpu.community.util.ConvertUtil
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -54,6 +55,8 @@ public class TopicService {
...
@@ -54,6 +55,8 @@ public class TopicService {
private
FeignService
feignService
;
private
FeignService
feignService
;
@Resource
@Resource
private
TopicSubjectMapper
topicSubjectMapper
;
private
TopicSubjectMapper
topicSubjectMapper
;
@Value
(
"${msg.kefu.telephone:021-65681889}"
)
private
String
kefuTelephone
;
public
List
<
TopicEntity
>
queryAll
()
{
public
List
<
TopicEntity
>
queryAll
()
{
...
@@ -196,9 +199,7 @@ public class TopicService {
...
@@ -196,9 +199,7 @@ public class TopicService {
public
String
getPermissionToast
(
String
topicId
)
{
public
String
getPermissionToast
(
String
topicId
)
{
String
permission
=
"专业版会员"
;
return
"暂无权限参与此话题~您可联系官方客服"
+
kefuTelephone
+
"了解详情"
;
return
"暂无权限参与此话题~您可联系官方客服 021- 了解详情"
;
// return "该话题仅限" + permission + "可参与哦~";
// return "该话题仅限" + permission + "可参与哦~";
}
}
...
@@ -287,6 +288,10 @@ public class TopicService {
...
@@ -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
)
{
public
List
<
TopicManagerEntity
>
getManagersByTopic
(
String
topicId
)
{
return
topicManagerMapper
.
selectList
(
new
LambdaQueryWrapper
<
TopicManagerEntity
>().
eq
(
TopicManagerEntity:
:
getTopicId
,
topicId
));
return
topicManagerMapper
.
selectList
(
new
LambdaQueryWrapper
<
TopicManagerEntity
>().
eq
(
TopicManagerEntity:
:
getTopicId
,
topicId
));
}
}
...
...
community-service/src/main/resources/application-test.yml
View file @
52045725
...
@@ -143,3 +143,7 @@ pagehelper:
...
@@ -143,3 +143,7 @@ pagehelper:
reasonable
:
true
reasonable
:
true
supportMethodsArguments
:
true
supportMethodsArguments
:
true
params
:
count=countSql
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