| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | 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); |
| | | } |