商品列表返回规格

This commit is contained in:
luofei 2023-07-06 10:38:30 +08:00
parent 514d308123
commit e7d94907f8

View File

@ -871,7 +871,7 @@ class ProductRepository extends BaseRepository
*/ */
public function getList(?int $merId, array $where, int $page, int $limit) public function getList(?int $merId, array $where, int $page, int $limit)
{ {
$query = $this->dao->search($merId, $where)->with(['merCateId.category', 'storeCategory', 'brand']); $query = $this->dao->search($merId, $where)->with(['merCateId.category', 'storeCategory', 'brand', 'attrValue']);
$count = $query->count(); $count = $query->count();
$data = $query->page($page, $limit)->setOption('field', [])->field($this->filed)->select(); $data = $query->page($page, $limit)->setOption('field', [])->field($this->filed)->select();