Quellcode durchsuchen

付款声音提示

shish vor 5 Jahren
Ursprung
Commit
bdc58d6972
2 geänderte Dateien mit 22 neuen und 0 gelöschten Zeilen
  1. 17 0
      biz/shop/classes/ShopAdminClass.php
  2. 5 0
      common/services/xhPayToolService.php

+ 17 - 0
biz/shop/classes/ShopAdminClass.php

@@ -2,6 +2,7 @@
 
 namespace biz\shop\classes;
 
+use bizGhs\ws\services\WsService;
 use bizHd\user\classes\UserClass;
 use common\components\util;
 use Yii;
@@ -121,4 +122,20 @@ class ShopAdminClass extends BaseClass
         return self::addShopAdmin($data);
     }
 
+
+    public static function incomeNotice($shopId, $money, $payWay = 0)
+    {
+        $list = self::getAllByCondition(['shopId' => $shopId, 'delStatus' => 0, 'status' => 1]);
+        if (empty($list)) {
+            return false;
+        }
+        foreach ($list as $key => $val) {
+            if ($val['remind'] == 1) {
+                $id = $val['id'];
+                Yii::info("income notice shopAdminId:{$id} " . $money);
+                WsService::arrivalNotice($id, $money, $payWay);
+            }
+        }
+    }
+
 }

+ 5 - 0
common/services/xhPayToolService.php

@@ -2,6 +2,7 @@
 
 namespace common\services;
 
+use biz\shop\classes\ShopAdminClass;
 use bizGhs\order\classes\OrderSendClass;
 use bizHd\coupon\classes\CouponClass;
 use bizHd\merchant\classes\ShopClass;
@@ -385,6 +386,10 @@ class xhPayToolService
 
             $transaction->commit();
 
+            $shopId = $order['shopId'] ?? 0;
+            $money = $order['actPrice'] ?? 0.00;
+            ShopAdminClass::incomeNotice($shopId, $money, 0);
+
             //如果是小程序支付可以获取unionId并进行更新关联
             if ($payWay == $wxWay && $wxPayType == 1) {
                 //OrderClass::payToUpdateUnionId($merchant, $merchantExtend, $orderSn, $user);