|
|
@@ -12,6 +12,7 @@ use app\common\model\goods\Goods;
|
|
|
use app\common\lists\ListsSearchInterface;
|
|
|
use app\common\model\goods_category\GoodsCategory;
|
|
|
use app\common\service\FileService;
|
|
|
+use think\db\Query;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -75,6 +76,9 @@ class FirmGoodLists extends BaseApiDataLists implements ListsSearchInterface
|
|
|
public function lists(): array
|
|
|
{
|
|
|
$lists = Goods::order(['id' => 'desc'])
|
|
|
+ ->with(['goods_category' => function (Query $query) {
|
|
|
+ $query->visible(['name']);
|
|
|
+ }])
|
|
|
->where($this->searchWhere)
|
|
|
->where($this->queryWhere())
|
|
|
->limit($this->limitOffset, $this->limitLength)
|