shish 2 年 前
コミット
0bd6b5dba8
1 ファイル変更2 行追加1 行削除
  1. 2 1
      biz-ghs/cp/classes/CpClassClass.php

+ 2 - 1
biz-ghs/cp/classes/CpClassClass.php

@@ -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) {