Browse Source

储值卡产品、订单

gorden 20 hours ago
parent
commit
6ca284c4cb
1 changed files with 8 additions and 0 deletions
  1. 8 0
      app/admin/controller/order/CardController.php

+ 8 - 0
app/admin/controller/order/CardController.php

@@ -329,6 +329,10 @@ class CardController extends Curd
             $this->insertPayDetail($params);
             $this->insertPayDetail($params);
             Db::commit();
             Db::commit();
             if ($params['order_status_payment'] == 'SUCCESS') {
             if ($params['order_status_payment'] == 'SUCCESS') {
+                // 订单完成
+                Event::dispatch('order.complete', $params);
+                // 上级提成
+                Event::dispatch('commission.order', $params);
                 // 入收支明细表
                 // 入收支明细表
                 $params['inout_category'] = '购买储值卡';
                 $params['inout_category'] = '购买储值卡';
                 Event::dispatch('statistics.inout.in', $params);
                 Event::dispatch('statistics.inout.in', $params);
@@ -553,6 +557,10 @@ class CardController extends Curd
                 OrderSheetService::addGoodsSales($params['orderId']);
                 OrderSheetService::addGoodsSales($params['orderId']);
             }
             }
             if ($order->order_status_payment == 'SUCCESS') {
             if ($order->order_status_payment == 'SUCCESS') {
+                // 订单完成
+                Event::dispatch('order.complete', $params);
+                // 上级提成
+                Event::dispatch('commission.order', $params);
                 // 入收支明细表
                 // 入收支明细表
                 $params['inout_category'] = '购买储值卡';
                 $params['inout_category'] = '购买储值卡';
                 Event::dispatch('statistics.inout.in', $params);
                 Event::dispatch('statistics.inout.in', $params);