From 7c6fd1d806bec9791247ab84803420efe45ccd06 Mon Sep 17 00:00:00 2001 From: zqy <2522236926@qq.com> Date: 星期二, 29 四月 2025 21:32:43 +0800 Subject: [PATCH] 修改家谱中搜索时一页显示条数与实际不符 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java index 1a57cd7..6826295 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java @@ -3,13 +3,10 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.entity.EsModel; import com.ruoyi.service.EsService; -import org.springframework.data.elasticsearch.core.SearchHits; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.websocket.server.PathParam; import java.util.List; /** @@ -26,7 +23,7 @@ EsService esService; @GetMapping() - public AjaxResult search(String keyword){ + public AjaxResult search(@PathParam("keyword") String keyword){ List<EsModel> byCondition = esService.findByCondition(keyword); return AjaxResult.success(byCondition); } -- Gitblit v1.9.1