|
|
@@ -28,14 +28,14 @@ import java.util.List;
|
|
|
@RequiredArgsConstructor
|
|
|
public class StorePlatformDiscussionController {
|
|
|
|
|
|
- private final StorePlatformDiscussionService storeDiscussionService;
|
|
|
+ private final StorePlatformDiscussionService storePlatformDiscussionService;
|
|
|
|
|
|
@ApiOperation("发布一级问答讨论 (主贴)")
|
|
|
@PostMapping("/postTopic")
|
|
|
public R<Boolean> postTopic(@RequestBody StorePlatformDiscussion discussion) {
|
|
|
log.info("StorePlatformDiscussionController.postTopic?discussion={}", discussion);
|
|
|
try {
|
|
|
- boolean success = storeDiscussionService.postTopic(discussion);
|
|
|
+ boolean success = storePlatformDiscussionService.postTopic(discussion);
|
|
|
return success ? R.success("发布成功") : R.fail("发布失败");
|
|
|
} catch (Exception e) {
|
|
|
log.error("发布讨论失败", e);
|
|
|
@@ -48,7 +48,7 @@ public class StorePlatformDiscussionController {
|
|
|
public R<Boolean> postReply(@RequestBody StorePlatformDiscussion discussion) {
|
|
|
log.info("StorePlatformDiscussionController.postReply?discussion={}", discussion);
|
|
|
try {
|
|
|
- boolean success = storeDiscussionService.postReply(discussion);
|
|
|
+ boolean success = storePlatformDiscussionService.postReply(discussion);
|
|
|
return success ? R.success("回复成功") : R.fail("回复失败");
|
|
|
} catch (Exception e) {
|
|
|
log.error("回复讨论失败", e);
|
|
|
@@ -63,7 +63,7 @@ public class StorePlatformDiscussionController {
|
|
|
@ApiParam(value = "页码", defaultValue = "1") @RequestParam(defaultValue = "1") Integer pageNum,
|
|
|
@ApiParam(value = "每页数量", defaultValue = "10") @RequestParam(defaultValue = "10") Integer pageSize) {
|
|
|
log.info("StorePlatformDiscussionController.pageRoot?storeId={}, pageNum={}, pageSize={}", storeId, pageNum, pageSize);
|
|
|
- return R.data(storeDiscussionService.pageRootDiscussions(storeId, pageNum, pageSize));
|
|
|
+ return R.data(storePlatformDiscussionService.pageRootDiscussions(storeId, pageNum, pageSize));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("分页获取某条一级问答讨论下的所有回复")
|
|
|
@@ -73,21 +73,21 @@ public class StorePlatformDiscussionController {
|
|
|
@ApiParam(value = "页码", defaultValue = "1") @RequestParam(defaultValue = "1") Integer pageNum,
|
|
|
@ApiParam(value = "每页数量", defaultValue = "10") @RequestParam(defaultValue = "10") Integer pageSize) {
|
|
|
log.info("StorePlatformDiscussionController.pageReplies?rootId={}, pageNum={}, pageSize={}", rootId, pageNum, pageSize);
|
|
|
- return R.data(storeDiscussionService.pageRepliesByRootId(rootId, pageNum, pageSize));
|
|
|
+ return R.data(storePlatformDiscussionService.pageRepliesByRootId(rootId, pageNum, pageSize));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("获取店铺问答讨论列表")
|
|
|
@GetMapping("/list")
|
|
|
public R<List<StorePlatformDiscussionUserVo>> list(@ApiParam(value = "店铺ID", required = true) @RequestParam Integer storeId) {
|
|
|
log.info("StorePlatformDiscussionController.list?storeId={}", storeId);
|
|
|
- return R.data(storeDiscussionService.listByStoreId(storeId));
|
|
|
+ return R.data(storePlatformDiscussionService.listByStoreId(storeId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("删除问答讨论")
|
|
|
@DeleteMapping("/delete/{id}")
|
|
|
public R<Boolean> delete(@PathVariable Integer id) {
|
|
|
log.info("StorePlatformDiscussionController.delete?id={}", id);
|
|
|
- boolean success = storeDiscussionService.removeById(id);
|
|
|
+ boolean success = storePlatformDiscussionService.removeById(id);
|
|
|
return success ? R.success("删除成功") : R.fail("删除失败");
|
|
|
}
|
|
|
}
|