Commit 52045725 authored by 刘基明's avatar 刘基明

帖子正文是否管理员

parent 2e06b1ce
...@@ -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);
} }
......
...@@ -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));
} }
......
...@@ -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
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