调用接口公共方法加入pageSize,pageNo,orderBy,fields
This commit is contained in:
@@ -10,8 +10,8 @@ package com.nis.domain.log;
|
|||||||
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import javax.ws.rs.client.WebTarget;
|
|
||||||
import javax.ws.rs.client.Invocation.Builder;
|
import javax.ws.rs.client.Invocation.Builder;
|
||||||
|
import javax.ws.rs.client.WebTarget;
|
||||||
import javax.ws.rs.core.MediaType;
|
import javax.ws.rs.core.MediaType;
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
@@ -82,6 +82,18 @@ public class ReportResultLog<T extends BaseReportLog> extends RestfulResult{
|
|||||||
if(StringUtils.isNotBlank(searchCondition.getSearchReportEndTime())){
|
if(StringUtils.isNotBlank(searchCondition.getSearchReportEndTime())){
|
||||||
url.append("&searchReportEndTime=").append(searchCondition.getSearchReportEndTime());
|
url.append("&searchReportEndTime=").append(searchCondition.getSearchReportEndTime());
|
||||||
}
|
}
|
||||||
|
if(searchCondition.getPageNo()!=null){
|
||||||
|
url.append("&pageNo=").append(searchCondition.getPageNo());
|
||||||
|
}
|
||||||
|
if(searchCondition.getPageSize()!=null){
|
||||||
|
url.append("&pageSize=").append(searchCondition.getPageSize());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(searchCondition.getOrderBy())){
|
||||||
|
url.append("&orderBy=").append(searchCondition.getOrderBy());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(searchCondition.getFields())){
|
||||||
|
url.append("&fields=").append(searchCondition.getFields());
|
||||||
|
}
|
||||||
//创建连接
|
//创建连接
|
||||||
WebTarget wt = ClientUtil.getWebTarger(url.toString());
|
WebTarget wt = ClientUtil.getWebTarger(url.toString());
|
||||||
Builder header = wt.request(MediaType.APPLICATION_JSON);
|
Builder header = wt.request(MediaType.APPLICATION_JSON);
|
||||||
|
|||||||
@@ -40,7 +40,67 @@ public class SearchReport extends BaseEntity<SearchReport>{
|
|||||||
private HashMap<String,Object> searchCondition;
|
private HashMap<String,Object> searchCondition;
|
||||||
public static final String searchConditionSplitor=",";
|
public static final String searchConditionSplitor=",";
|
||||||
public int searchConditionLimit;
|
public int searchConditionLimit;
|
||||||
|
private Integer pageNo;
|
||||||
|
private Integer pageSize;
|
||||||
|
private String orderBy;
|
||||||
|
private String fields;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pageNo
|
||||||
|
* @return pageNo
|
||||||
|
*/
|
||||||
|
|
||||||
|
public Integer getPageNo() {
|
||||||
|
return pageNo;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param pageNo the pageNo to set
|
||||||
|
*/
|
||||||
|
public void setPageNo(Integer pageNo) {
|
||||||
|
this.pageNo = pageNo;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* pageSize
|
||||||
|
* @return pageSize
|
||||||
|
*/
|
||||||
|
|
||||||
|
public Integer getPageSize() {
|
||||||
|
return pageSize;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param pageSize the pageSize to set
|
||||||
|
*/
|
||||||
|
public void setPageSize(Integer pageSize) {
|
||||||
|
this.pageSize = pageSize;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* orderBy
|
||||||
|
* @return orderBy
|
||||||
|
*/
|
||||||
|
|
||||||
|
public String getOrderBy() {
|
||||||
|
return orderBy;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param orderBy the orderBy to set
|
||||||
|
*/
|
||||||
|
public void setOrderBy(String orderBy) {
|
||||||
|
this.orderBy = orderBy;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* fields
|
||||||
|
* @return fields
|
||||||
|
*/
|
||||||
|
|
||||||
|
public String getFields() {
|
||||||
|
return fields;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param fields the fields to set
|
||||||
|
*/
|
||||||
|
public void setFields(String fields) {
|
||||||
|
this.fields = fields;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* reportBusinessType
|
* reportBusinessType
|
||||||
* @return reportBusinessType
|
* @return reportBusinessType
|
||||||
|
|||||||
@@ -342,6 +342,8 @@ public final class Constants {
|
|||||||
public static final String CONFIG_ID_SOURCES=Configurations.getStringProperty("configIdSources","configPzIdSources");
|
public static final String CONFIG_ID_SOURCES=Configurations.getStringProperty("configIdSources","configPzIdSources");
|
||||||
//日志查询接口URL
|
//日志查询接口URL
|
||||||
public static final String LOG_BASE_URL = Configurations.getStringProperty("logBaseUrl","");
|
public static final String LOG_BASE_URL = Configurations.getStringProperty("logBaseUrl","");
|
||||||
|
public static final String NTC_SERVICE_REPORT=Configurations.getStringProperty("ntcServiceReport","ntcServiceReport");
|
||||||
|
public static final String NTC_TAG_REPORT=Configurations.getStringProperty("ntcTagReport","ntcTagReport");
|
||||||
public static final String NTC_PZ_REPORT=Configurations.getStringProperty("ntcPzReport","ntcPzReport");
|
public static final String NTC_PZ_REPORT=Configurations.getStringProperty("ntcPzReport","ntcPzReport");
|
||||||
public static final String NTC_IP_LOG = Configurations.getStringProperty("ntcIpLog","");
|
public static final String NTC_IP_LOG = Configurations.getStringProperty("ntcIpLog","");
|
||||||
public static final String NTC_HTTP_LOG = Configurations.getStringProperty("ntcHttpLog","");
|
public static final String NTC_HTTP_LOG = Configurations.getStringProperty("ntcHttpLog","");
|
||||||
|
|||||||
@@ -228,6 +228,8 @@ configIdSources=configPzIdSources
|
|||||||
#logBaseUrl=http://10.0.6.242:8080/galaxy/service/log/v1/
|
#logBaseUrl=http://10.0.6.242:8080/galaxy/service/log/v1/
|
||||||
logBaseUrl=http://10.0.6.242:8080/galaxy/service/log/v1/
|
logBaseUrl=http://10.0.6.242:8080/galaxy/service/log/v1/
|
||||||
ntcPzReport=ntcPzReport
|
ntcPzReport=ntcPzReport
|
||||||
|
ntcServiceReport=ntcServiceReport
|
||||||
|
ntcTagReport=ntcTagReport
|
||||||
ntcIpLog=ntcIpLogs
|
ntcIpLog=ntcIpLogs
|
||||||
ntcHttpLog=ntcHttpLogs
|
ntcHttpLog=ntcHttpLogs
|
||||||
ntcDnsLog=ntcDnsLogs
|
ntcDnsLog=ntcDnsLogs
|
||||||
|
|||||||
Reference in New Issue
Block a user