|
|
@@ -282,11 +282,12 @@ class CustomController extends Controller
|
|
|
$shopId = $shopIdArr[0];
|
|
|
$defaultShopId = $shopIdArr[1];
|
|
|
|
|
|
- $customers = CustomClass::getByCondition(['ownShopId' => $defaultShopId], true);
|
|
|
+ Yii::$app->params['ptStyle'] = 2; // 后继代码,要用到此参数
|
|
|
+ $customers = CustomClass::getAllByCondition(['ownShopId' => $defaultShopId], null, ['shopId']);
|
|
|
foreach($customers as $customer) {
|
|
|
- $exist = CustomClass::exists(['ownShopId'=> $shopId, 'shopId'=>$customer->shopId]);
|
|
|
+ $exist = CustomClass::exists(['ownShopId'=> $shopId, 'shopId'=>$customer['shopId']]);
|
|
|
if (!$exist) {
|
|
|
- CustomClass::build($shopId, $customer->shopId);
|
|
|
+ CustomClass::build($shopId, $customer['shopId']);
|
|
|
}
|
|
|
}
|
|
|
}
|