|
|
@@ -3,16 +3,23 @@
|
|
|
namespace bizGhs\jh\classes;
|
|
|
|
|
|
use bizGhs\base\classes\BaseClass;
|
|
|
+use bizGhs\product\classes\ProductClass;
|
|
|
|
|
|
class JhItemClass extends BaseClass
|
|
|
{
|
|
|
|
|
|
public static $baseFile = '\bizGhs\jh\models\JhItem';
|
|
|
|
|
|
-
|
|
|
public static function getItemList($where)
|
|
|
{
|
|
|
$data = self::getList('*', $where, 'addTime DESC');
|
|
|
+ $list = $data['list'] ?? [];
|
|
|
+ $infoList = [];
|
|
|
+ if (!empty($list)) {
|
|
|
+ $ids = array_column($list, 'productId');
|
|
|
+ $infoList = ProductClass::getAllByCondition(['id' => ['in', $ids]], null, '*', 'id');
|
|
|
+ }
|
|
|
+ $data['infoList'] = $infoList;
|
|
|
return $data;
|
|
|
}
|
|
|
|