封装Es商品搜索

main
ztt 8 months ago
parent e04861703c
commit 7e1b996c21
  1. 4
      app/api/controller/GoodsNew.php
  2. 1
      app/common/service/GoodsEs.php

@ -25,9 +25,9 @@ class GoodsNew extends Controller
}
$params = ['goods_name' => $keyword];
$goodsService = new GoodsEs();
$data = $goodsService->list($params, $page, $limit);
$list = $goodsService->list($params, $page, $limit);
$data['list'] = $list;
$data['total'] = $goodsService->count();
$data['list'] = $data;
return $this->renderSuccess($data);
}

@ -38,7 +38,6 @@ class GoodsEs
->like($params)
->from($page)
->size($limit)
->order(['goods_id' => 'desc'])
->query(true);
}

Loading…
Cancel
Save