新建package report,所有报表的pojo放入其中

This commit is contained in:
wangxin
2018-07-10 09:30:56 +08:00
parent bdc2a88d5b
commit 7b915cb717
12 changed files with 35 additions and 37 deletions

View File

@@ -17,9 +17,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.nis.domain.log.ReportLog;
import com.nis.domain.log.ReportResultLog;
import com.nis.domain.maat.ToMaatResult;
import com.nis.domain.report.LogReport;
import com.nis.domain.report.ReportResult;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.httpclient.ClientUtil;
@@ -309,12 +309,12 @@ public class ConfigServiceUtil {
* @exception
* @since 1.0.0
*/
public static ReportResultLog<ReportLog> getReport(int type,String ids,String serviceIds,String searchReportStartTime,String searchReportEndTime) throws MaatConvertException{
public static ReportResult<LogReport> getReport(int type,String ids,String serviceIds,String searchReportStartTime,String searchReportEndTime) throws MaatConvertException{
if(StringUtils.isBlank(ids)||StringUtils.isBlank(serviceIds)){
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
}
String result = null;
ReportResultLog<ReportLog> bean = null;
ReportResult<LogReport> bean = null;
StringBuffer url=new StringBuffer(Constants.SERVICE_URL+Constants.NTC_PZ_REPORT+"?");
url.append("searchBusinessType=").append(type)
.append("&searchService=").append(serviceIds).append("&searchCfgId=").append(ids);
@@ -331,7 +331,7 @@ public class ConfigServiceUtil {
if( response.getStatus() == 200){
result= response.readEntity(String.class);
Gson gson=Constants.gsonbuilder.create();
bean = gson.fromJson(result, new TypeToken<ReportResultLog<ReportLog>>(){
bean = gson.fromJson(result, new TypeToken<ReportResult<LogReport>>(){
private static final long serialVersionUID = 7963055764864141968L;}.getType());
}else{
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+response.readEntity(String.class));