|
|
@@ -67,12 +67,6 @@ class MerchantService extends BaseService
|
|
|
foreach ($deleteExtend as $delExtend) {
|
|
|
unset($extend[$delExtend]);
|
|
|
}
|
|
|
-
|
|
|
- //设置计算方式
|
|
|
- $freight = $extend['freight'];
|
|
|
- $freightList = explode('_', $freight);
|
|
|
- $extend['freightFirst'] = isset($freightList[0]) && is_numeric($freightList[0]) ? $freightList[0] : 5;
|
|
|
- $extend['freightAdd'] = isset($freightList[1]) && is_numeric($freightList[1]) ? $freightList[1] : 2;
|
|
|
$merchant['extend'] = $extend;
|
|
|
return $merchant;
|
|
|
}
|
|
|
@@ -164,7 +158,7 @@ class MerchantService extends BaseService
|
|
|
if (empty($hasMenu)) {
|
|
|
xhWxMenuService::applyInit($merchant);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//微信客户初始化
|
|
|
$hasUser = UserService::getByCondition(['merchantId' => $merchantId]);
|
|
|
if (empty($hasUser)) {
|
|
|
@@ -174,14 +168,14 @@ class MerchantService extends BaseService
|
|
|
}
|
|
|
|
|
|
//模板消息
|
|
|
- $hasMessage = TMessageService::getByCondition(['merchantId'=>$merchantId]);
|
|
|
- if(empty($hasMessage)){
|
|
|
+ $hasMessage = TMessageService::getByCondition(['merchantId' => $merchantId]);
|
|
|
+ if (empty($hasMessage)) {
|
|
|
xhTMessageService::init($merchant);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//完成初始化标识
|
|
|
MerchantExtendClass::updateByCondition(['merchantId' => $merchantId], ['init' => 1]);
|
|
|
-
|
|
|
+
|
|
|
$transaction->commit();
|
|
|
return true;
|
|
|
} catch (Exception $e) {
|