|
|
@@ -8,6 +8,7 @@ use biz\sj\classes\MerchantClass;
|
|
|
use biz\sj\classes\SjClass;
|
|
|
use common\components\business;
|
|
|
use common\components\imgUtil;
|
|
|
+use common\components\stringUtil;
|
|
|
use common\components\util;
|
|
|
use Yii;
|
|
|
use bizHd\base\classes\BaseClass;
|
|
|
@@ -47,15 +48,19 @@ class CustomClass extends BaseClass
|
|
|
if (empty($ghsShop)) {
|
|
|
util::fail('没有找到门店');
|
|
|
}
|
|
|
-
|
|
|
$ghs = GhsClass::getByCondition(['ownSjId' => $sjId, 'sjId' => $ghsShop['merchantId'], 'shopId' => $ghsShop['id']]);
|
|
|
if (empty($ghs)) {
|
|
|
+ $name = $ghsShop['shopName'] ?? '';
|
|
|
+ $py = stringUtil::py($name);
|
|
|
+ $mobile = $ghsShop['mobile'] ?? '';
|
|
|
$ghsData = [
|
|
|
'sjId' => $ghsShop['merchantId'],
|
|
|
'shopId' => $ghsShop['id'],
|
|
|
'ownSjId' => $sjId,
|
|
|
'ownShopId' => $sjId,
|
|
|
- 'mobile' => $ghsShop['mobile'] ?? '',
|
|
|
+ 'name' => $name,
|
|
|
+ 'py' => $py,
|
|
|
+ 'mobile' => $mobile,
|
|
|
'province' => $ghsShop['province'] ?? '',
|
|
|
'city' => $ghsShop['city'] ?? '',
|
|
|
'dist' => $ghsShop['dist'] ?? '',
|
|
|
@@ -101,14 +106,18 @@ class CustomClass extends BaseClass
|
|
|
util::fail('没有找到门店');
|
|
|
}
|
|
|
$ghs = GhsClass::getByCondition(['ownSjId' => $introSjId, 'sjId' => $sjId, 'shopId' => $shopId]);
|
|
|
- dd($ghs);
|
|
|
if (empty($ghs)) {
|
|
|
+ $name = $ghsShop['shopName'] ?? '';
|
|
|
+ $py = stringUtil::py($name);
|
|
|
+ $mobile = $ghsShop['mobile'] ?? '';
|
|
|
$ghsData = [
|
|
|
'sjId' => $sjId,
|
|
|
'shopId' => $shopId,
|
|
|
'ownSjId' => $introSjId,
|
|
|
'ownShopId' => $introShopId,
|
|
|
- 'mobile' => $ghsShop['mobile'] ?? '',
|
|
|
+ 'name' => $name,
|
|
|
+ 'py' => $py,
|
|
|
+ 'mobile' => $mobile,
|
|
|
'province' => $ghsShop['province'] ?? '',
|
|
|
'city' => $ghsShop['city'] ?? '',
|
|
|
'dist' => $ghsShop['dist'] ?? '',
|