From a92ebef23cf1370a1a4efa9a8a020a8ea8b5209a Mon Sep 17 00:00:00 2001 From: ztt <835303992@qq.com> Date: Mon, 3 Jun 2024 09:35:52 +0800 Subject: [PATCH] 1 --- app/common/service/GoodsEs.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/common/service/GoodsEs.php b/app/common/service/GoodsEs.php index aa5aabf2..6861720b 100644 --- a/app/common/service/GoodsEs.php +++ b/app/common/service/GoodsEs.php @@ -10,6 +10,8 @@ class GoodsEs private string $index_name = 'goods_list'; + private string $field = 'goods_id,goods_type,goods_no,goods_name'; + public function __construct() { $this->esService = Client::setEs($this->index_name); @@ -23,6 +25,7 @@ class GoodsEs public function list($params = [],$page = 1, $limit = 10) { return $this->esService + ->select($this->field) // ->setDebug() ->like($params) ->from($page)