shish před 2 roky
rodič
revize
85996c20f4
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      app-pt/controllers/ItemController.php

+ 4 - 4
app-pt/controllers/ItemController.php

@@ -24,11 +24,11 @@ class ItemController extends BaseController
         }
         if (!empty($cpId) && $cpId > 0) {
             $ptCpItemList = PtCpItemClass::getAllByCondition(['cpId' => $cpId], null, 'itemId');
-            print_r($ptCpItemList);die;
-            if (!empty($ptCpItemList)) {
-                $ids = array_column($ptCpItemList, 'itemId');
-                $where['id'] = ['in', $ids];
+            if (empty($ptCpItemList)) {
+                util::fail('没有数据');
             }
+            $ids = array_column($ptCpItemList, 'itemId');
+            $where['id'] = ['in', $ids];
         }
         if ($cpClassStyle == 0) {
             $where['hasCpId'] = 0;