shish 5 лет назад
Родитель
Сommit
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->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;
-        $event = "客户下单{$amount}元";
+        $event = $customName . "下单{$amount}元";
         $tx = dict::getDict('yeTx', 'can');
         $change = [
             'relateId' => $id,