Browse Source

退款控制

shish 1 year ago
parent
commit
6f4484dfdb
1 changed files with 6 additions and 0 deletions
  1. 6 0
      app-ghs/controllers/RefundController.php

+ 6 - 0
app-ghs/controllers/RefundController.php

@@ -37,6 +37,12 @@ class RefundController extends BaseController
         if ($order->mainId != $this->mainId) {
             util::fail('不是你的订单');
         }
+        $addTime = $order->addTime;
+        $addTime = strtotime($addTime);
+        $earTime = strtotime('2025-05-01 00:00:00');
+        if ($addTime < $earTime) {
+            util::fail('2025.5.1号前的订单,不能退款');
+        }
         $shop = $this->shop;
         $purchaseId = $order->purchaseId ?? 0;
         $cg = PurchaseClass::getById($purchaseId, true);