|
|
@@ -21,7 +21,8 @@ class CpClassClass extends BaseClass
|
|
|
{
|
|
|
self::add($data);
|
|
|
if (isset($masterShop->default) && $masterShop->default == 1) {
|
|
|
- $shopList = ShopClass::getAllByCondition(['sjId' => $data['sjId']], null, '*', null, true);
|
|
|
+ $sjId = $masterShop->sjId ?? 0;
|
|
|
+ $shopList = ShopClass::getAllByCondition(['sjId' => $sjId], null, '*', null, true);
|
|
|
foreach ($shopList as $shop) {
|
|
|
$shopId = $shop->id ?? 0;
|
|
|
if ($shopId == $masterShop->id) {
|