Commit e9b39316 authored by H2T's avatar H2T

BUG15586相似警情筛选问题

parent e1474646
......@@ -307,18 +307,12 @@ public class AlertCalledController extends BaseController {
* </pre>
*
* @param
* @param current
* @param size
* @return
* @throws Exception
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "相似警情分页查询")
@PostMapping(value = "/page/similar")
public ResponseModel<Page<ESAlertCalledDto>> pageBySimilar(@RequestBody ESAlertCalledRequestDto alertCalledVo,
@RequestParam(value = "current") int current, @RequestParam(value = "size") int size) throws Exception {
Page<ESAlertCalledDto> esAlertCalledDtoPage = eSAlertCalledService.queryByKeys(alertCalledVo, current, size);
public ResponseModel<Page<ESAlertCalledDto>> pageBySimilar(@RequestBody ESAlertCalledRequestDto alertCalledVo) {
Page<ESAlertCalledDto> esAlertCalledDtoPage = eSAlertCalledService.queryByKeys(alertCalledVo);
return ResponseHelper.buildResponse(esAlertCalledDtoPage);
}
......
......@@ -130,14 +130,12 @@ public class ESAlertCalledService {
* 根据关键字查询文档,关键字不为空时按相关性从大到小排序
*
* @param alertCalledVo 关键字
* @param current 当前页码
* @param size 页面大小
* @return
*/
@SuppressWarnings({ "rawtypes" })
public Page<ESAlertCalledDto> queryByKeys(ESAlertCalledRequestDto alertCalledVo, int current, int size)
public Page<ESAlertCalledDto> queryByKeys(ESAlertCalledRequestDto alertCalledVo)
{
Page<ESAlertCalledDto> result = new Page<ESAlertCalledDto>(current, size);
Page<ESAlertCalledDto> result = new Page<ESAlertCalledDto>();
String[] alertStatus = alertCalledVo.getAlertStatus();
if (ValidationUtil.isEmpty(alertStatus))
{
......@@ -234,7 +232,7 @@ public class ESAlertCalledService {
// 创建查询构造器
NativeSearchQueryBuilder queryBuilder = new NativeSearchQueryBuilder()
// 分页
.withPageable(PageRequest.of(current, size))
// .withPageable(PageRequest.of(current, size))
// 排序
// .withSort(SortBuilders.fieldSort("callTimeLong").order(SortOrder.DESC))
//过滤条件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment