|
@@ -54,17 +54,20 @@ class GhsClass extends BaseClass
|
|
|
}
|
|
}
|
|
|
$ghsShop = ShopClass::getShopInfo($ghsShopId);
|
|
$ghsShop = ShopClass::getShopInfo($ghsShopId);
|
|
|
$ghsSjId = $ghsShop['sjId'] ?? 0;
|
|
$ghsSjId = $ghsShop['sjId'] ?? 0;
|
|
|
|
|
+ $ghsMainId = $ghsShop['mainId'] ?? 0;
|
|
|
$ghsDefault = $ghsShop['default'] ?? 0;
|
|
$ghsDefault = $ghsShop['default'] ?? 0;
|
|
|
$name = $ghsDefault == 1 ? $ghsShop['merchantName'] : $ghsShop['merchantName'] . ' ' . $ghsShop['shopName'];
|
|
$name = $ghsDefault == 1 ? $ghsShop['merchantName'] : $ghsShop['merchantName'] . ' ' . $ghsShop['shopName'];
|
|
|
$py = stringUtil::py($name);
|
|
$py = stringUtil::py($name);
|
|
|
- $ghShop = ShopClass::getShopInfo($hdShopId);
|
|
|
|
|
- $hdSjId = $ghShop['sjId'] ?? 0;
|
|
|
|
|
|
|
+ $hdShopInfo = ShopClass::getShopInfo($hdShopId);
|
|
|
|
|
+ $hdSjId = $hdShopInfo['sjId'] ?? 0;
|
|
|
|
|
+ $hdMainId = $hdShopInfo['mainId'] ?? 0;
|
|
|
|
|
|
|
|
$data = [
|
|
$data = [
|
|
|
'sjId' => $ghsSjId,
|
|
'sjId' => $ghsSjId,
|
|
|
'shopId' => $ghsShopId,
|
|
'shopId' => $ghsShopId,
|
|
|
'ownSjId' => $hdSjId,
|
|
'ownSjId' => $hdSjId,
|
|
|
'ownShopId' => $hdShopId,
|
|
'ownShopId' => $hdShopId,
|
|
|
|
|
+ 'ownMainId' => $hdMainId,
|
|
|
'name' => $name,
|
|
'name' => $name,
|
|
|
'py' => $py,
|
|
'py' => $py,
|
|
|
'mobile' => $ghsShop['mobile'] ?? '',
|
|
'mobile' => $ghsShop['mobile'] ?? '',
|
|
@@ -91,6 +94,7 @@ class GhsClass extends BaseClass
|
|
|
'shopId' => $hdShopId,
|
|
'shopId' => $hdShopId,
|
|
|
'ownSjId' => $ghsSjId,
|
|
'ownSjId' => $ghsSjId,
|
|
|
'ownShopId' => $ghsShopId,
|
|
'ownShopId' => $ghsShopId,
|
|
|
|
|
+ 'ownMainId' => $ghsMainId,
|
|
|
'name' => $name,
|
|
'name' => $name,
|
|
|
'py' => $py,
|
|
'py' => $py,
|
|
|
'mobile' => $mobile,
|
|
'mobile' => $mobile,
|
|
@@ -114,24 +118,19 @@ class GhsClass extends BaseClass
|
|
|
if (!empty($parentShopId)) {
|
|
if (!empty($parentShopId)) {
|
|
|
$introduce = CustomClass::getByCondition(['ownShopId' => $ghsShopId, 'shopId' => $parentShopId], true);
|
|
$introduce = CustomClass::getByCondition(['ownShopId' => $ghsShopId, 'shopId' => $parentShopId], true);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
//有新客户提醒供货商
|
|
//有新客户提醒供货商
|
|
|
WxMessageClass::newGhsCustomInform($ghsShop, $custom, $introduce);
|
|
WxMessageClass::newGhsCustomInform($ghsShop, $custom, $introduce);
|
|
|
//新客户加入app通知
|
|
//新客户加入app通知
|
|
|
NoticeClass::newCustomNotice($ghsShop, $custom);
|
|
NoticeClass::newCustomNotice($ghsShop, $custom);
|
|
|
-
|
|
|
|
|
if ($type == 1) {
|
|
if ($type == 1) {
|
|
|
return $ghs;
|
|
return $ghs;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return $custom;
|
|
return $custom;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//增加供应商 ssh 2021.3.29
|
|
//增加供应商 ssh 2021.3.29
|
|
|
public static function addGhs($data)
|
|
public static function addGhs($data)
|
|
|
{
|
|
{
|
|
|
- //供应商客户+1
|
|
|
|
|
- ShopService::totalUserPlus($data['shopId']);
|
|
|
|
|
return self::add($data);
|
|
return self::add($data);
|
|
|
}
|
|
}
|
|
|
|
|
|