Commit 4c76ae89 by wang_jiaxing

修改全国ES接口工具类,增加实体类的父类,用于限制范型类型

parent 27473e3e
package org.springblade.founder.utils.Entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 全国案件ES接口案事件实体类
......@@ -9,7 +10,8 @@ import lombok.Data;
* @date 2022/5/6 15:22
*/
@Data
public class QgEsAsj {
@EqualsAndHashCode(callSuper = true)
public class QgEsAsj extends QgEsEntity{
//案事件编号
private String asjbh;
//案件名称
......
package org.springblade.founder.utils.Entity;
/**
* 全国ES接口实体类夫类,用于限制范型类型
*
* @author create by lystar
* @date 2022/5/7 11:27
*/
public class QgEsEntity {
}
package org.springblade.founder.utils.Entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 全国案件ES接口嫌疑人实体类
......@@ -8,8 +9,9 @@ import lombok.Data;
* @author create by lystar
* @date 2022/5/6 16:08
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class QgEsXyr {
public class QgEsXyr extends QgEsEntity{
//姓名
private String xm;
//证件号码
......
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springblade.founder.utils.Entity.QgEsAsj;
import org.springblade.founder.utils.Entity.QgEsEntity;
import org.springblade.founder.utils.Entity.QgEsEnum;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
......@@ -74,7 +75,7 @@ public class QgEsUtil {
* @author lystar
* 2022/5/6 16:26
*/
public static <T> List<T> getQgEsListByTypeAndParam(QgEsEnum qgEsEnum, String bh) {
public static <T extends QgEsEntity> List<T> getQgEsListByTypeAndParam(QgEsEnum qgEsEnum, String bh) {
try {
Map<String, Object> jsonMap = new HashMap<>();
if (QgEsEnum.GET_ASJ_BY_ZJHM == qgEsEnum) {
......
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