完成评论回复列表和评论商家详情列表,用户验证暂时等下次增加点赞接口以后加上
This commit is contained in:
@@ -2,8 +2,10 @@ package cn.iocoder.mall.order.application.controller.users;
|
||||
|
||||
import cn.iocoder.common.framework.constant.MallConstants;
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.order.api.OrderCommentReplyService;
|
||||
import cn.iocoder.mall.order.api.OrderCommentService;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentCreateBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentInfoAndMerchantReplyBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentPageBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentCreateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentPageDTO;
|
||||
@@ -31,6 +33,9 @@ public class OrderCommentController {
|
||||
@Reference(validation = "true", version = "${dubbo.provider.OrderCommentService.version}")
|
||||
private OrderCommentService orderCommentService;
|
||||
|
||||
@Reference(validation = "true", version = "${dubbo.provider.OrderCommentReplyService.version}")
|
||||
private OrderCommentReplyService orderCommentReplyService;
|
||||
|
||||
|
||||
@PostMapping("create_order_comment")
|
||||
//@RequiresLogin
|
||||
@@ -39,11 +44,21 @@ public class OrderCommentController {
|
||||
return success(orderCommentService.createOrderComment(orderCommentCreateDTO));
|
||||
}
|
||||
|
||||
@GetMapping("getOrderCommentPage")
|
||||
@GetMapping("order_comment_page")
|
||||
//@RequiresLogin
|
||||
@ApiOperation(value = "获取评论分页")
|
||||
public CommonResult<OrderCommentPageBO> getOrderCommentPage(@Validated OrderCommentPageDTO orderCommentPageDTO){
|
||||
return success(orderCommentService.getOrderCommentPage(orderCommentPageDTO));
|
||||
}
|
||||
|
||||
@GetMapping("order_comment_info_merchant_reply")
|
||||
//@RequiresLogin
|
||||
@ApiOperation(value = "获取评论和商家回复")
|
||||
public CommonResult<OrderCommentInfoAndMerchantReplyBO> geOrderCommentInfoAndMerchantReply(@RequestParam("commentId") Integer commentId){
|
||||
OrderCommentInfoAndMerchantReplyBO orderCommentInfoAndMerchantReplyBO=new OrderCommentInfoAndMerchantReplyBO();
|
||||
orderCommentInfoAndMerchantReplyBO.setOrderCommentInfoBO(orderCommentService.getOrderCommentInfo(commentId));
|
||||
orderCommentInfoAndMerchantReplyBO.setOrderCommentMerchantReplyBOS(orderCommentReplyService.getOrderCommentMerchantReply(commentId));
|
||||
return success(orderCommentInfoAndMerchantReplyBO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,17 +3,15 @@ package cn.iocoder.mall.order.application.controller.users;
|
||||
import cn.iocoder.common.framework.constant.MallConstants;
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.order.api.OrderCommentReplyService;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentCreateBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentReplyCreateBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentReplyPageBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentReplyCreateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentReplyPageDTO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.dubbo.config.annotation.Reference;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import static cn.iocoder.common.framework.vo.CommonResult.success;
|
||||
|
||||
@@ -33,10 +31,17 @@ public class OrderCommentReplyController {
|
||||
@Reference(validation = "true", version = "${dubbo.provider.OrderCommentService.version}")
|
||||
private OrderCommentReplyService orderCommentReplyService;
|
||||
|
||||
@PostMapping("create_order_comment")
|
||||
@PostMapping("create_order_comment_reply")
|
||||
//@RequiresLogin
|
||||
@ApiOperation(value = "创建订单")
|
||||
@ApiOperation(value = "创建订单回复")
|
||||
public CommonResult<OrderCommentReplyCreateBO> createOrderCommentReply(@RequestBody @Validated OrderCommentReplyCreateDTO orderCommentReplyCreateDTO){
|
||||
return success(orderCommentReplyService.createOrderCommentReply(orderCommentReplyCreateDTO));
|
||||
}
|
||||
|
||||
@GetMapping("order_comment_reply_page")
|
||||
//@RequiresLogin
|
||||
@ApiOperation(value = "分页获取评论回复")
|
||||
public CommonResult<OrderCommentReplyPageBO> getOrderCommentReplyPage(@Validated OrderCommentReplyPageDTO orderCommentReplyCreateDTO){
|
||||
return success(orderCommentReplyService.getOrderCommentReplyPage(orderCommentReplyCreateDTO));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user