package com.central.log.controller; import com.central.common.model.PageResult; import com.central.search.client.service.IQueryService; import com.central.search.model.SearchDto; import com.fasterxml.jackson.databind.JsonNode; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; /** * 系统日志 * * @author zlt */ @RestController public class SysLogController { @Autowired private IQueryService queryService; @ApiOperation(value = "系统日志全文搜索列表") @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "分页起始位置", required = true, dataType = "Integer"), @ApiImplicitParam(name = "limit", value = "分页结束位置", required = true, dataType = "Integer"), @ApiImplicitParam(name = "queryStr", value = "搜索关键字", dataType = "String") }) @GetMapping(value = "/sysLog") public PageResult getPage(SearchDto searchDto) { searchDto.setIsHighlighter(true); searchDto.setSortCol("timestamp"); return queryService.strQuery("sys-log-*", searchDto); } }