Kirin 1 vuosi sitten
vanhempi
commit
b8877dbf8f
2 muutettua tiedostoa jossa 9 lisäystä ja 7 poistoa
  1. 9 6
      app/jobs/order/OrderJob.php
  2. 0 1
      app/services/order/StoreOrderTakeServices.php

+ 9 - 6
app/jobs/order/OrderJob.php

@@ -11,6 +11,7 @@
 
 namespace app\jobs\order;
 
+use app\jobs\integral\IntegralJob;
 use app\services\activity\discounts\StoreDiscountsServices;
 use app\services\activity\bargain\StoreBargainServices;
 use app\services\activity\combination\StoreCombinationServices;
@@ -78,6 +79,8 @@ class OrderJob extends BaseJobs
             }
         }
 
+        IntegralJob::dispatchDo('dealOrderIntegral', [$order]);
+
         return true;
     }
 
@@ -150,12 +153,12 @@ class OrderJob extends BaseJobs
             if (!$labelIds) {
                 return true;
             }
-			$store_id = $order['store_id'] ?? 0;
-			$type = $store_id ? 1 : 0;
+            $store_id = $order['store_id'] ?? 0;
+            $type = $store_id ? 1 : 0;
             $labelIds = array_unique($labelIds);
             /** @var UserLabelRelationServices $labelServices */
             $labelServices = app()->make(UserLabelRelationServices::class);
-			$labelServices->setUserLable([$order['uid']], $labelIds, $type, $store_id);
+            $labelServices->setUserLable([$order['uid']], $labelIds, $type, $store_id);
         } catch (\Throwable $e) {
             Log::error('用户标签添加失败,失败原因:' . $e->getMessage());
         }
@@ -351,8 +354,8 @@ class OrderJob extends BaseJobs
     }
 
 
-	public function setWriteValid()
-	{
+    public function setWriteValid()
+    {
 
-	}
+    }
 }

+ 0 - 1
app/services/order/StoreOrderTakeServices.php

@@ -155,7 +155,6 @@ class StoreOrderTakeServices extends BaseServices
                 if (!($res1 && $res2 && $res3)) {
                     throw new ValidateException('收货失败!');
                 }
-                IntegralJob::dispatchDo('dealOrderIntegral', [$order]);
                 return true;
             }, $isTran);
         }