Skip to content

Commit

Permalink
订单自动好评,订单自动好评条件判定问题处理
Browse files Browse the repository at this point in the history
  • Loading branch information
chopper711 committed Oct 21, 2021
1 parent 18f6e27 commit c61bcfa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,14 @@ public void execute() {
*/
private void completedOrder(OrderSetting orderSetting) {


//订单自动收货时间 = 当前时间 - 自动收货时间天数
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getAutoReceive());
LambdaQueryWrapper<Order> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(Order::getOrderStatus, OrderStatusEnum.DELIVERED.name());

//订单发货时间 >= 订单自动收货时间
queryWrapper.ge(Order::getLogisticsTime, receiveTime);
queryWrapper.le(Order::getLogisticsTime, receiveTime);
List<Order> list = orderService.list(queryWrapper);

//判断是否有符合条件的订单,进行订单完成处理
Expand All @@ -128,7 +129,7 @@ private void memberEvaluation(OrderSetting orderSetting) {

//订单完成时间 <= 订单自动好评时间
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.ge("o.complete_time", receiveTime);
queryWrapper.le("o.complete_time", receiveTime);
queryWrapper.eq("oi.comment_status", CommentStatusEnum.UNFINISHED.name());
List<OrderItem> orderItems = orderItemMapper.waitOperationOrderItem(queryWrapper);

Expand Down

0 comments on commit c61bcfa

Please sign in to comment.