From 15a25ba5f72d39f478f6da213c87681692e1bf8a Mon Sep 17 00:00:00 2001 From: wangtongzhou Date: Thu, 16 May 2019 20:18:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=84=E4=BB=B7=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/order/api/OrderCommentService.java | 51 ++++++++++ .../order/api/bo/OrderCommentCreateBO.java | 23 +++++ .../mall/order/api/bo/OrderCommentInfoBO.java | 2 +- ...entPageBo.java => OrderCommentPageBO.java} | 2 +- .../api/bo/OrderCommentReplyCreateBO.java | 16 +++ .../order/api/dto/OrderCommentCreateDTO.java | 98 +++++++++++++++++++ .../api/dto/OrderCommentReplyCreateDTO.java | 65 ++++++++++++ 7 files changed, 255 insertions(+), 2 deletions(-) create mode 100644 order/order-service-api/src/main/java/cn/iocoder/mall/order/api/OrderCommentService.java create mode 100644 order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentCreateBO.java rename order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/{OrderCommentPageBo.java => OrderCommentPageBO.java} (96%) create mode 100644 order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentReplyCreateBO.java create mode 100644 order/order-service-api/src/main/java/cn/iocoder/mall/order/api/dto/OrderCommentCreateDTO.java create mode 100644 order/order-service-api/src/main/java/cn/iocoder/mall/order/api/dto/OrderCommentReplyCreateDTO.java diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/OrderCommentService.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/OrderCommentService.java new file mode 100644 index 000000000..b1836d136 --- /dev/null +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/OrderCommentService.java @@ -0,0 +1,51 @@ +package cn.iocoder.mall.order.api; + +import cn.iocoder.common.framework.vo.CommonResult; +import cn.iocoder.mall.order.api.bo.OrderCommentCreateBO; +import cn.iocoder.mall.order.api.bo.OrderCommentInfoBO; +import cn.iocoder.mall.order.api.bo.OrderCommentPageBO; +import cn.iocoder.mall.order.api.bo.OrderCommentReplyCreateBO; +import cn.iocoder.mall.order.api.dto.OrderCommentCreateDTO; +import cn.iocoder.mall.order.api.dto.OrderCommentReplyCreateDTO; + +/** + * 订单评论模块 + * + * @author wtz + * @time 2019-05-14 22:10 + */ +public interface OrderCommentService { + + /** + * 评论创建 + * @param orderCommentCreateDTO + * @return + */ + CommonResult createOrderComment(OrderCommentCreateDTO orderCommentCreateDTO); + + + /** + * 评论回复创建 + * @param orderCommentReplyCreateDTO + * @return + */ + CommonResult createOrderCommentReply(OrderCommentReplyCreateDTO orderCommentReplyCreateDTO); + + /** + * 获取评论列表的分页 + * @param productSpuId + * @return + */ + CommonResult getOrderCommentPage(Integer productSpuId); + + + /** + * 获取评论详情 + * @param commentId + * @return + */ + CommonResult getOrderCommentInfo(Integer commentId); + + + +} diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentCreateBO.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentCreateBO.java new file mode 100644 index 000000000..0f02a2837 --- /dev/null +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentCreateBO.java @@ -0,0 +1,23 @@ +package cn.iocoder.mall.order.api.bo; + +import lombok.Data; +import lombok.experimental.Accessors; + + +/** + * + * 订单评论创建 + * + * @author wtz + * @time 2019-05-15 20:35 + * + */ +@Data +@Accessors(chain = true) +public class OrderCommentCreateBO { + + /** + * 评论id + */ + private Integer id; +} diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentInfoBO.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentInfoBO.java index ffad53638..5069def1f 100644 --- a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentInfoBO.java +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentInfoBO.java @@ -8,7 +8,7 @@ import java.util.List; /** * - * 订单回复评价 + * 订单回复评价详情 * * @author wtz * @time 2019-05-16 18:40 diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentPageBo.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentPageBO.java similarity index 96% rename from order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentPageBo.java rename to order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentPageBO.java index 0547cafb6..b7b090251 100644 --- a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentPageBo.java +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentPageBO.java @@ -17,7 +17,7 @@ import java.util.List; */ @Data @Accessors(chain = true) -public class OrderCommentPageBo implements Serializable { +public class OrderCommentPageBO implements Serializable { /** * 总条数 diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentReplyCreateBO.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentReplyCreateBO.java new file mode 100644 index 000000000..506d10c47 --- /dev/null +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderCommentReplyCreateBO.java @@ -0,0 +1,16 @@ +package cn.iocoder.mall.order.api.bo; + +/** + * + * 评论回复创建 + * + * @author wtz + * @time 2019-05-16 18:00:00 + */ +public class OrderCommentReplyCreateBO { + + /** + * 评论回复的id + */ + private Integer id; +} diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/dto/OrderCommentCreateDTO.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/dto/OrderCommentCreateDTO.java new file mode 100644 index 000000000..c69dcb576 --- /dev/null +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/dto/OrderCommentCreateDTO.java @@ -0,0 +1,98 @@ +package cn.iocoder.mall.order.api.dto; + +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 订单评论创建 + * + * @author wtz + * @time 2019-05-15 20:42 + * + */ +@Data +@Accessors(chain = true) +public class OrderCommentCreateDTO implements Serializable { + + /** + * 订单id + */ + private int orderId; + + /** + * 订单编号 + */ + private String orderNo; + + /** + * 商品SPU id + */ + private int productSpuId; + + /** + * 商品SPU 名字 SPU 这两个属性待考量我认为加入进去以后后期一些分析可能好做一些 + */ + private String productSpuName; + + /** + * 商品SKU id + */ + private int productSkuId; + + /** + * 商品SKU属性 + */ + private String productSkuAttrs; + + /** + * 商品SKU价格 + */ + private int productSkuPrice; + + /** + * 商品SKU地址 + */ + private String productSkuPicUrl; + + /** + * 用户id + */ + private Integer userId; + + /** + * 用户头像 + */ + private String userAvatar; + + /** + * 用户昵称 + */ + private String userNickName; + + /** + * 星 + */ + private Integer star; + + /** + * 产品描述 + */ + private Integer productDescriptionStar; + + /** + * 物流评价 + */ + private Integer logisticsStar; + + /** + * 商家评价 + */ + private Integer merchantStar; + + /** + * 评论内容 + */ + private String commentContent; +} diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/dto/OrderCommentReplyCreateDTO.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/dto/OrderCommentReplyCreateDTO.java new file mode 100644 index 000000000..6200f2d50 --- /dev/null +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/dto/OrderCommentReplyCreateDTO.java @@ -0,0 +1,65 @@ +package cn.iocoder.mall.order.api.dto; + +import java.io.Serializable; + +/** + * + * 订单回复评论创建 + * + * @author wtz + * @time 2019-05-16 19:07 + * + */ +public class OrderCommentReplyCreateDTO implements Serializable { + + /** + * 评论id + */ + private Integer commentId; + + /** + * 评论目标对象id + */ + private Integer parentId; + + /** + * 评论目标用户id + */ + private Integer parentUserId; + + /** + * 评论目标用户昵称 + */ + private String parentUserNickName; + + /** + * 评论目标用户头像 + */ + private String parentUserAvatar; + + /** + * 回复内容 + */ + private String replyContent; + + /** + * 回复用户id + */ + private Integer replyUserId; + + /** + * 回复用户昵称 + */ + private String replyUserNickName; + + /** + * 回复用户头像 + */ + private String replyUserAvatar; + + /** + * 回复用户类型 + */ + private Integer replyUserType; + +}