From da1a5ead936791e9a9494067da7980f7e5144693 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 15 一月 2025 15:03:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
index 1fd2ef1..4857a74 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -337,8 +337,7 @@
                 orderPageListVo.setUserName(appUser.getName());
                 orderPageListVo.setPhone(appUser.getPhone());
             }
-//            RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1"));
-            RefundPass one = refundPassService.lambdaQuery().eq(RefundPass::getOrderId, orderPageListVo.getId()).one();
+            RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1"));
             orderPageListVo.setRefundPassId(null != one ? one.getId().toString() : null);
 
             // 平台分佣
@@ -434,7 +433,7 @@
         if(Arrays.asList(5, 6, 7).contains(order.getOrderStatus())){
             return R.fail("无效的操作");
         }
-        if(LocalDateTime.now().isAfter(order.getAfterSaleTime())){
+        if(null != order.getAfterSaleTime() && LocalDateTime.now().isAfter(order.getAfterSaleTime())){
             return R.fail("订单取消失败");
         }
         order.setOrderStatus(5);
@@ -854,8 +853,8 @@
      * @return
      */
     @Override
-    public Integer getGoodsSaleNum(Integer goodsId, Integer type) {
-        return this.baseMapper.getGoodsSaleNum(goodsId, type);
+    public Integer getGoodsSaleNum(Integer goodsId, Integer type, Long userId) {
+        return this.baseMapper.getGoodsSaleNum(goodsId, type, userId);
     }
 
 

--
Gitblit v1.7.1