Browse Source

会员升级

Kirin 7 tháng trước cách đây
mục cha
commit
8a052c31c9

+ 6 - 0
app/services/supplier/finance/SupplierFlowingWaterServices.php

@@ -21,6 +21,7 @@ use app\services\order\StoreOrderCartInfoServices;
 use app\services\order\StoreOrderRefundServices;
 use app\services\order\StoreOrderServices;
 use app\services\pay\PayServices;
+use app\services\supplier\SystemSupplierServices;
 
 /**
  * 供应商流水
@@ -140,11 +141,16 @@ class SupplierFlowingWaterServices extends BaseServices
         $storeOrderServices = app()->make(StoreOrderServices::class);
         /** @var StoreOrderRefundServices $storeOrderRefundServices */
         $storeOrderRefundServices = app()->make(StoreOrderRefundServices::class);
+
+        /** @var SystemSupplierServices $supplierServices */
+        $supplierServices = app()->make(SystemSupplierServices::class);
         $order = $storeOrderServices->get($oid);
         if (!$order) {
             return true;
         }
         if ($order['supplier_id'] <= 0) return true;
+        $supplier = $supplierServices->get($order['supplier_id']);
+        if (!$supplier->status || !$supplier->is_show || ($supplier->valid_time > 0 && $supplier->valid_time < time())) return true;
         if ($type == 1) {
             $res = $this->search([
                 'type' => 1,