From 25c3b3cb89e9156fb1e043c0521e536bc5b2e636 Mon Sep 17 00:00:00 2001 From: xiaofeng Date: Mon, 1 Jun 2020 23:57:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=AF=84=E8=AE=BA=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../convert/comment/OrderCommentConvert.java | 8 ++++ .../service/comment/OrderCommentService.java | 43 +++++++++++++++++++ .../comment/OrderCommentServiceImpl.java | 32 +++++++++++++- 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/convert/comment/OrderCommentConvert.java b/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/convert/comment/OrderCommentConvert.java index 221e9319e..9a9dd849f 100644 --- a/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/convert/comment/OrderCommentConvert.java +++ b/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/convert/comment/OrderCommentConvert.java @@ -1,5 +1,6 @@ package cn.iocoder.mall.order.biz.convert.comment; +import cn.iocoder.mall.order.biz.bo.comment.OrderCommentInfoBO; import cn.iocoder.mall.order.biz.bo.comment.OrderCommentPageBO; import cn.iocoder.mall.order.biz.dataobject.comment.OrderCommentDO; import cn.iocoder.mall.order.biz.dto.comment.OrderCommentAddDTO; @@ -35,4 +36,11 @@ public interface OrderCommentConvert { */ List convert(List orderCommentList); + /** + * + * @param orderCommentDO + * @return + */ + OrderCommentInfoBO convert(OrderCommentDO orderCommentDO); + } diff --git a/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/service/comment/OrderCommentService.java b/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/service/comment/OrderCommentService.java index 54497090f..e5e4d4888 100644 --- a/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/service/comment/OrderCommentService.java +++ b/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/service/comment/OrderCommentService.java @@ -1,9 +1,15 @@ package cn.iocoder.mall.order.biz.service.comment; import cn.iocoder.common.framework.vo.PageResult; +import cn.iocoder.mall.order.biz.bo.comment.OrderCommentInfoBO; import cn.iocoder.mall.order.biz.bo.comment.OrderCommentPageBO; +import cn.iocoder.mall.order.biz.bo.comment.OrderCommentStateInfoPageBO; +import cn.iocoder.mall.order.biz.bo.comment.OrderCommentTimeOutBO; import cn.iocoder.mall.order.biz.dto.comment.OrderCommentAddDTO; import cn.iocoder.mall.order.biz.dto.comment.OrderCommentPageDTO; +import cn.iocoder.mall.order.biz.dto.comment.OrderCommentStateInfoPageDTO; +import cn.iocoder.mall.order.biz.dto.comment.OrderCommentTimeOutPageDTO; +import java.util.List; import javax.validation.Valid; import org.springframework.validation.annotation.Validated; @@ -32,4 +38,41 @@ public interface OrderCommentService { * @return */ PageResult page(OrderCommentPageDTO orderCommentPageDTO); + + /** + * 获取订单评论信息 + * + * @param commentId + * @return + */ + OrderCommentInfoBO getOrderCommentInfo(Integer commentId); + + + /** + * 获取订单评论状态详情 + * + * @param orderCommentStateInfoPageDTO + * @return + */ + OrderCommentStateInfoPageBO getOrderCommentStateInfoPage( + OrderCommentStateInfoPageDTO orderCommentStateInfoPageDTO); + + /** + * 获取订单评论超时分页 + * + * @param orderCommentTimeOutPageDTO + * @return + */ + List getOrderCommentTimeOutPage( + OrderCommentTimeOutPageDTO orderCommentTimeOutPageDTO); + + + /** + * 批量更新订单评论状态 + * + * @param orderCommentTimeOutBOList + */ + void updateBatchOrderCommentState(List orderCommentTimeOutBOList); + + } diff --git a/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/service/comment/OrderCommentServiceImpl.java b/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/service/comment/OrderCommentServiceImpl.java index c5e320be3..2d434e54c 100644 --- a/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/service/comment/OrderCommentServiceImpl.java +++ b/order/order-biz/src/main/java/cn/iocoder/mall/order/biz/service/comment/OrderCommentServiceImpl.java @@ -2,12 +2,16 @@ package cn.iocoder.mall.order.biz.service.comment; import cn.iocoder.common.framework.util.CollectionUtil; import cn.iocoder.common.framework.vo.PageResult; +import cn.iocoder.mall.order.biz.bo.comment.OrderCommentInfoBO; import cn.iocoder.mall.order.biz.bo.comment.OrderCommentPageBO; +import cn.iocoder.mall.order.biz.bo.comment.OrderCommentStateInfoPageBO; +import cn.iocoder.mall.order.biz.bo.comment.OrderCommentTimeOutBO; import cn.iocoder.mall.order.biz.convert.comment.OrderCommentConvert; import cn.iocoder.mall.order.biz.dataobject.comment.OrderCommentDO; import cn.iocoder.mall.order.biz.dto.comment.OrderCommentAddDTO; import cn.iocoder.mall.order.biz.dto.comment.OrderCommentPageDTO; -import java.util.Collection; +import cn.iocoder.mall.order.biz.dto.comment.OrderCommentStateInfoPageDTO; +import cn.iocoder.mall.order.biz.dto.comment.OrderCommentTimeOutPageDTO; import java.util.Collections; import java.util.List; import javax.validation.Valid; @@ -71,4 +75,30 @@ public class OrderCommentServiceImpl implements OrderCommentService { pageResult.setList(OrderCommentConvert.INSTANCE.convert(orderCommentList)); return pageResult; } + + @Override + public OrderCommentInfoBO getOrderCommentInfo( + Integer commentId) { + OrderCommentDO orderCommentDO = mongoTemplate + .findOne(new Query(Criteria.where("_id").is(commentId)), OrderCommentDO.class); + return OrderCommentConvert.INSTANCE.convert(orderCommentDO); + } + + @Override + public OrderCommentStateInfoPageBO getOrderCommentStateInfoPage( + OrderCommentStateInfoPageDTO orderCommentStateInfoPageDTO) { + return null; + } + + @Override + public List getOrderCommentTimeOutPage( + OrderCommentTimeOutPageDTO orderCommentTimeOutPageDTO) { + return null; + } + + @Override + public void updateBatchOrderCommentState( + List orderCommentTimeOutBOList) { + + } }