|
|
@@ -6,6 +6,7 @@ use biz\shop\classes\ShopExtClass;
|
|
|
use biz\sj\services\MerchantExtendService;
|
|
|
use biz\sj\services\MerchantService;
|
|
|
use bizHd\custom\classes\CustomClass;
|
|
|
+use bizHd\custom\classes\HdClass;
|
|
|
use bizHd\goods\classes\GoodsClass;
|
|
|
use bizHd\merchant\services\ShopService;
|
|
|
use bizHd\order\classes\OrderClass;
|
|
|
@@ -387,16 +388,20 @@ class OrderController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $customId = isset($post['customId']) && $post['customId'] > 0 ? $post['customId'] : 0;
|
|
|
- if (empty($customId)) {
|
|
|
- $customId = $this->shop->defaultCustomId ?? 0;
|
|
|
+ $hdId = $post['hdId'] ?? 0;
|
|
|
+ $hd = HdClass::getById($hdId, true);
|
|
|
+ if (empty($hd)) {
|
|
|
+ util::fail('客户信息缺失');
|
|
|
}
|
|
|
- $custom = CustomClass::getById($customId);
|
|
|
+ $hdName = $hd->name ?? '';
|
|
|
+ $post['hdName'] = $hdName;
|
|
|
+ $customId = $hd->customId ?? 0;
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
if (empty($custom)) {
|
|
|
util::fail('没有找到客户哦');
|
|
|
}
|
|
|
$post['customId'] = $customId;
|
|
|
- $customName = $custom['name'] ?? '';
|
|
|
+ $customName = $custom->name ?? '';
|
|
|
$post['customName'] = $customName;
|
|
|
$post['customNamePy'] = stringUtil::py($customName);
|
|
|
|
|
|
@@ -510,7 +515,7 @@ class OrderController extends BaseController
|
|
|
$shop = $this->shop->attributes;
|
|
|
$freight = MerchantExtendService::getFreight($this->sjExtend);
|
|
|
$mapKey = 'OFWBZ-2NTHP-EHNDD-LKWQY-GANM7-PXBJH';
|
|
|
- $out = ['freight' => $freight, 'shop' => $shop, 'region' => $regionTree, 'txMapKey' => $mapKey, 'merchant' => $shop];
|
|
|
+ $out = ['freight' => $freight, 'shop' => $shop, 'region' => $regionTree, 'thirdMapKey' => $mapKey, 'merchant' => $shop];
|
|
|
util::success($out);
|
|
|
}
|
|
|
|