@@ -28,14 +28,12 @@ class CpClass extends BaseClass
if ($shop->id == $masterShop->id) {
continue;
}
- $shopName = $shop->shopName ?? '';
$chainMainId = $shop->mainId ?? 0;
$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();