|
@@ -45,7 +45,7 @@ public class OpenTopicController {
|
|
|
* @date 2023/11/23 22:29
|
|
|
*/
|
|
|
@PostMapping("/contentPage/{sortType}")
|
|
|
- public Page<TopicContentVo> contentPage(TopicContentSelectDto dto, @PathVariable String sortType) {
|
|
|
+ public Page<TopicContentVo> contentPage(@RequestBody TopicContentSelectDto dto, @PathVariable String sortType) {
|
|
|
dto.setType("1");
|
|
|
Page<TopicContentVo> page = topicContentService.contentPage(dto, sortType);
|
|
|
page.getRecords().forEach(topicContentVo -> {
|
|
@@ -121,7 +121,7 @@ public class OpenTopicController {
|
|
|
* @date 2023/11/23 22:30
|
|
|
*/
|
|
|
@PostMapping("/detail/{topicId}")
|
|
|
- public OpenTopicContentVO detail(@PathVariable Long topicId,@RequestBody TopicRepliesDto topicRepliesDto) {
|
|
|
+ public OpenTopicContentVO detail(@PathVariable Long topicId,@RequestBody TopicRepliesSelectDto dto) {
|
|
|
TopicContent topicContent = topicContentService.getById(topicId);
|
|
|
if (ObjectUtil.isNull(topicContent)) {
|
|
|
throw new RuntimeException("主题不存在");
|
|
@@ -132,7 +132,6 @@ public class OpenTopicController {
|
|
|
OpenTopicContentVO openTopicContentVO = BeanUtil.copyProperties(topicContent, OpenTopicContentVO.class);
|
|
|
openTopicContentVO.setAuthorName(websiteUsersService.getAuthorName(topicContent.getAuthor()));
|
|
|
|
|
|
- TopicRepliesSelectDto dto = new TopicRepliesSelectDto();
|
|
|
dto.setTopicId(topicId);
|
|
|
Page<TopicRepliesVo> page = topicRepliesService.getPageByOpen(dto);
|
|
|
List<TopicRepliesVo> records = page.getRecords();
|