|
|
@@ -220,7 +220,7 @@ class CustomController extends Controller
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //从首店同步客户
|
|
|
+ //批发端分店从首店同步客户
|
|
|
private function copyCustomers()
|
|
|
{
|
|
|
$cachedKey = 'copy_firstShop_customers';
|
|
|
@@ -237,14 +237,15 @@ class CustomController extends Controller
|
|
|
foreach ($shopIdList as $shopIdData) {
|
|
|
$shopIdArr = explode('_', $shopIdData);
|
|
|
if (count($shopIdArr) != 2) {
|
|
|
- Yii::info('copyCustomers 数据出错:' . json_encode($shopIdArr));
|
|
|
+ Yii::info('copyCustomers 数据出错:' . $shopIdData);
|
|
|
+ noticeUtil::push("分店从首店同步客户出错了:" . $shopIdData, '15280215347');
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
$shopId = $shopIdArr[0];
|
|
|
$defaultShopId = $shopIdArr[1];
|
|
|
+ Yii::$app->params['ptStyle'] = dict::getDict('ptStyle', 'ghs'); //指定当前环境为批发商
|
|
|
|
|
|
- Yii::$app->params['ptStyle'] = 2; // 后继代码,要用到此参数
|
|
|
$customers = CustomClass::getAllByCondition(['ownShopId' => $defaultShopId], null, ['shopId']);
|
|
|
foreach ($customers as $customer) {
|
|
|
$exist = CustomClass::exists(['ownShopId' => $shopId, 'shopId' => $customer['shopId']]);
|