|
|
@@ -22,12 +22,12 @@ class CustomClass extends BaseClass
|
|
|
{
|
|
|
if ($applyData['style'] == SjClass::STYLE_RETAIL) {
|
|
|
if ($applyData['introStyle'] == SjClass::STYLE_SUPPLIER) {
|
|
|
- $has = CustomClass::getByCondition(['sjId' => $applyData['introSjId'], 'customSjId' => $sjId, 'customShopId' => $shopId]);
|
|
|
+ $has = CustomClass::getByCondition(['ownSjId' => $applyData['introSjId'], 'sjId' => $sjId, 'shopId' => $shopId]);
|
|
|
if (empty($has)) {
|
|
|
$customData = [
|
|
|
- 'customSjId' => $sjId,//零售商家id
|
|
|
- 'customShopId' => $shopId,//零售门店id
|
|
|
- 'sjId' => $applyData['introSjId'],//供货商id
|
|
|
+ 'sjId' => $sjId,//零售商家id
|
|
|
+ 'shopId' => $shopId,//零售门店id
|
|
|
+ 'ownSjId' => $applyData['introSjId'],//供货商id
|
|
|
'name' => $applyData['name'],
|
|
|
'mobile' => $applyData['mobile'],
|
|
|
'province' => $applyData['province'] ?? '',
|
|
|
@@ -45,10 +45,10 @@ class CustomClass extends BaseClass
|
|
|
util::fail('没有找到门店');
|
|
|
}
|
|
|
$ghsData = [
|
|
|
- 'ghsSjId' => $ghsShop['merchantId'],
|
|
|
- 'ghsShopId' => $ghsShop['id'],
|
|
|
- 'sjId' => $sjId,
|
|
|
- 'shopId' => $sjId,
|
|
|
+ 'sjId' => $ghsShop['merchantId'],
|
|
|
+ 'shopId' => $ghsShop['id'],
|
|
|
+ 'ownSjId' => $sjId,
|
|
|
+ 'ownShopId' => $sjId,
|
|
|
'mobile' => $ghsShop['mobile'] ?? '',
|
|
|
'province' => $ghsShop['province'] ?? '',
|
|
|
'city' => $ghsShop['city'] ?? '',
|
|
|
@@ -65,7 +65,7 @@ class CustomClass extends BaseClass
|
|
|
}
|
|
|
if ($applyData['style'] == SjClass::STYLE_SUPPLIER) {
|
|
|
if ($applyData['introStyle'] == SjClass::STYLE_RETAIL) {
|
|
|
- $has = CustomClass::getByCondition(['sjId' => $sjId, 'customSjId' => $applyData['introSjId'], 'customShopId' => $applyData['introShopId']]);
|
|
|
+ $has = CustomClass::getByCondition(['ownSjId' => $sjId, 'sjId' => $applyData['introSjId'], 'shopId' => $applyData['introShopId']]);
|
|
|
if (empty($has)) {
|
|
|
$introSjId = $applyData['introSjId'] ?? 0;
|
|
|
$introShopId = $applyData['introShopId'] ?? 0;
|
|
|
@@ -74,9 +74,9 @@ class CustomClass extends BaseClass
|
|
|
$super = ShopClass::getSuper($introShopId);
|
|
|
$mobile = $super['mobile'] ?? '';
|
|
|
$customData = [
|
|
|
- 'customSjId' => $introSjId,//零售商id
|
|
|
- 'customShopId' => $introShopId,//零售门店id
|
|
|
- 'sjId' => $sjId,//供货商id
|
|
|
+ 'sjId' => $introSjId,//零售商id
|
|
|
+ 'shopId' => $introShopId,//零售门店id
|
|
|
+ 'ownSjId' => $sjId,//供货商id
|
|
|
'name' => $name,
|
|
|
'mobile' => $mobile,
|
|
|
'isOpen' => 1,
|
|
|
@@ -96,10 +96,10 @@ class CustomClass extends BaseClass
|
|
|
}
|
|
|
|
|
|
$ghsData = [
|
|
|
- 'ghsSjId' => $sjId,
|
|
|
- 'ghsShopId' => $shopId,
|
|
|
- 'sjId' => $introSjId,
|
|
|
- 'shopId' => $introShopId,
|
|
|
+ 'sjId' => $sjId,
|
|
|
+ 'shopId' => $shopId,
|
|
|
+ 'ownSjId' => $introSjId,
|
|
|
+ 'ownShopId' => $introShopId,
|
|
|
'mobile' => $ghsShop['mobile'] ?? '',
|
|
|
'province' => $ghsShop['province'] ?? '',
|
|
|
'city' => $ghsShop['city'] ?? '',
|