Quellcode durchsuchen

客户结账下单

shish vor 4 Jahren
Ursprung
Commit
c3dd29f415
1 geänderte Dateien mit 9 neuen und 2 gelöschten Zeilen
  1. 9 2
      biz-hd/purchase/classes/PurchaseClearClass.php

+ 9 - 2
biz-hd/purchase/classes/PurchaseClearClass.php

@@ -33,6 +33,11 @@ class PurchaseClearClass extends BaseClass
             util::fail('没有找到客户');
             util::fail('没有找到客户');
         }
         }
 
 
+        $ghsShopId = $ghs->shopId ?? 0;
+        $ghsShop = ShopClass::getById($ghsShopId, true);
+        $ghsShopName = $ghsShop->shopName ?? '';
+        $ghsShopName = $ghsShopName == '首店' ? '总店' : $ghsShopName;
+
         $orderSn = orderSn::getPurchaseClearSn();
         $orderSn = orderSn::getPurchaseClearSn();
         $purchaseIds = $data['purchaseIds'];
         $purchaseIds = $data['purchaseIds'];
         $arr = explode(',', $purchaseIds);
         $arr = explode(',', $purchaseIds);
@@ -70,7 +75,7 @@ class PurchaseClearClass extends BaseClass
         $validTime = dict::getDict('order_pay_has_time');
         $validTime = dict::getDict('order_pay_has_time');
         $deadTime = time() + $validTime;
         $deadTime = time() + $validTime;
         $data['deadline'] = date("Y-m-d H:i:s", $deadTime);
         $data['deadline'] = date("Y-m-d H:i:s", $deadTime);
-        $arr = [
+        $params = [
             'ghsId' => $ghsId,
             'ghsId' => $ghsId,
             'ghsName' => $ghs['name'] ?? '',
             'ghsName' => $ghs['name'] ?? '',
             'ghsMobile' => $ghs['mobile'] ?? '',
             'ghsMobile' => $ghs['mobile'] ?? '',
@@ -81,8 +86,10 @@ class PurchaseClearClass extends BaseClass
             'customAvatar' => $custom['avatar'] ?? '',
             'customAvatar' => $custom['avatar'] ?? '',
             'customMobile' => $custom['mobile'] ?? '',
             'customMobile' => $custom['mobile'] ?? '',
             'customAddress' => $custom['address'] ?? '',
             'customAddress' => $custom['address'] ?? '',
+            'num' => count($arr),
+            'ghsShopName' => $ghsShopName,
         ];
         ];
-        $data = array_merge($data, $arr);
+        $data = array_merge($data, $params);
         return self::add($data);
         return self::add($data);
     }
     }