shish 2 yıl önce
ebeveyn
işleme
4f4af83580
1 değiştirilmiş dosya ile 3 ekleme ve 5 silme
  1. 3 5
      biz-ghs/cp/classes/CpClass.php

+ 3 - 5
biz-ghs/cp/classes/CpClass.php

@@ -28,14 +28,12 @@ class CpClass extends BaseClass
                     if ($shop->id == $masterShop->id) {
                     if ($shop->id == $masterShop->id) {
                         continue;
                         continue;
                     }
                     }
-                    $shopName = $shop->shopName ?? '';
                     $chainMainId = $shop->mainId ?? 0;
                     $chainMainId = $shop->mainId ?? 0;
                     $has = self::getByCondition(['mainId' => $chainMainId, 'ptCpId' => $ptCpId, 'delStatus' => 0], true);
                     $has = self::getByCondition(['mainId' => $chainMainId, 'ptCpId' => $ptCpId, 'delStatus' => 0], true);
-                    if (empty($has)) {
-                        util::fail($shopName . '的产品没有找到');
+                    if (!empty($has)) {
+                        $has->delStatus = 0;
+                        $has->save();
                     }
                     }
-                    $has->delStatus = 0;
-                    $has->save();
                 }
                 }
             }
             }
         }
         }