47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
package com.cmeim.template.elastic.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.cmeim.common.core.domain.R;
|
|
import com.cmeim.template.elastic.po.PagingQuery;
|
|
import com.cmeim.template.elastic.service.ElasticQueryService;
|
|
import com.cmeim.template.po.TpTemplate;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import javax.validation.Valid;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* @author 高峻枫
|
|
* @version 1.0
|
|
* @date 2021/12/30 9:09
|
|
*/
|
|
|
|
|
|
@Api(value = "elasticQuery")
|
|
@RestController
|
|
@RequestMapping("elastic/query")
|
|
public class ElasticQueryController {
|
|
|
|
@Autowired
|
|
private ElasticQueryService elasticQueryService;
|
|
|
|
@ApiOperation(value = "分页查询dataJSON数据")
|
|
@PostMapping(value = "getDataJsonList")
|
|
public R<List<Map<String, Object>>> getDataJsonList(@Valid @RequestBody PagingQuery pagingQuery) {
|
|
return R.ok(elasticQueryService.getDataJsonList(pagingQuery));
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|