|
|
@@ -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;
|