فهرست منبع

客户下单增加余额

shish 5 سال پیش
والد
کامیت
b98ecd40ca
1فایلهای تغییر یافته به همراه11 افزوده شده و 1 حذف شده
  1. 11 1
      biz/shop/classes/ShopClass.php

+ 11 - 1
biz/shop/classes/ShopClass.php

@@ -263,9 +263,19 @@ class ShopClass extends BaseClass
         $shop->txBalance = $currentTx;
         $shop->txBalance = $currentTx;
         $shop->save();
         $shop->save();
 
 
+        $ptStyle = $shop->ptStyle ?? dict::getDict('ptStyle', 'hd');
+        $customName = '客户';
+        if ($ptStyle == dict::getDict('ptStyle', 'ghs')) {
+            $customId = $order->customId ?? 0;
+            $custom = CustomClass::getById($customId, true);
+            if (isset($custom->name) && !empty($custom->name)) {
+                $customName = $custom->name;
+            }
+        }
+
         //增加余额变动记录
         //增加余额变动记录
         $id = $order->id;
         $id = $order->id;
-        $event = "客户下单{$amount}元";
+        $event = $customName . "下单{$amount}元";
         $tx = dict::getDict('yeTx', 'can');
         $tx = dict::getDict('yeTx', 'can');
         $change = [
         $change = [
             'relateId' => $id,
             'relateId' => $id,