|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace pt\controllers;
|
|
|
|
|
|
+use biz\cp\classes\PtCpItemClass;
|
|
|
use common\components\stringUtil;
|
|
|
use Yii;
|
|
|
use common\components\util;
|
|
|
@@ -22,7 +23,11 @@ class ItemController extends BaseController
|
|
|
$where['classId'] = $classId;
|
|
|
}
|
|
|
if (!empty($cpId) && $cpId > 0) {
|
|
|
- $where['cpId'] = $cpId;
|
|
|
+ $ptCpItemList = PtCpItemClass::getAllByCondition(['cpId' => $cpId], null, 'itemId');
|
|
|
+ if (!empty($ptCpItemList)) {
|
|
|
+ $ids = array_column($ptCpItemList, 'itemId');
|
|
|
+ $where['id'] = ['in', $ids];
|
|
|
+ }
|
|
|
}
|
|
|
if ($cpClassStyle == 0) {
|
|
|
$where['hasCpId'] = 0;
|