ASN 版本恢复1月4号之版本

This commit is contained in:
wangxin
2019-01-18 16:21:20 +08:00
parent ed77da00c4
commit de8496e003
32 changed files with 322 additions and 1203 deletions

View File

@@ -356,7 +356,7 @@ public class ConfigServiceUtil {
}else if(type==2){
url = url+Constants.CALLBACK_CFG;
}else if(type==3) {
url = url+Constants.DELETE_COMMON_REIGON;
url = url+Constants.GROUP_REUSE_SOURCES;
}
//创建连接
WebTarget wt = ClientUtil.getWebTarger(url);
@@ -400,9 +400,9 @@ public class ConfigServiceUtil {
url = url+Constants.MAAT_CFG;
}else if(type==2){
url = url+Constants.CALLBACK_CFG;
}/*else if(type==3) {
}else if(type==3) {
url = url+Constants.GROUP_REUSE_SOURCES;
}*/
}
logger.info("put url:"+url);
//创建连接
try {
@@ -463,43 +463,26 @@ public class ConfigServiceUtil {
return bean;
}
/**
* 分组复用域配置新增,修改,删除
* 分组复用域配置新增
* @param params
* @return
* @throws MaatConvertException
*/
public static ToMaatResult auditCommonGroupRegionSources(String params,Integer action) throws MaatConvertException{
public static ToMaatResult postGroupReuseSources(String params) throws MaatConvertException{
ToMaatResult bean = null;
Response response=null;
try {
logger.warn("postGroupReuseSources start");
long start=System.currentTimeMillis();
String result = null;
String url = "";
if(action.equals(Constants.OPACTION_POST)){
url=Constants.SERVICE_URL+Constants.ADD_COMMON_REGION;
}
if(action.equals(Constants.OPACTION_PUT)){
url=Constants.SERVICE_URL+Constants.UPDATE_COMMON_REIGON;
}
if(action.equals(Constants.OPACTION_DELETE)){
url=Constants.SERVICE_URL+Constants.DELETE_COMMON_REIGON;
}
String url = Constants.SERVICE_URL+Constants.GROUP_REUSE_SOURCES;
//创建连接
WebTarget wt = ClientUtil.getWebTarger(url);
logger.info("auditCommonGroupRegionSources url:"+url);
logger.info("postGroupReuseSources url:"+url);
//获取响应结果
Builder header = wt.request(MediaType.APPLICATION_JSON).header("Content-Type", MediaType.APPLICATION_JSON);
try {
if(action.equals(Constants.OPACTION_POST)){
response= header.post(Entity.entity(params, MediaType.APPLICATION_JSON));
}
if(action.equals(Constants.OPACTION_PUT)){
response= header.put(Entity.entity(params, MediaType.APPLICATION_JSON));
}
if(action.equals(Constants.OPACTION_DELETE)){
response= header.put(Entity.entity(params, MediaType.APPLICATION_JSON));
}
response= header.post(Entity.entity(params, MediaType.APPLICATION_JSON));
if(response != null) {
result=response.readEntity(String.class);
}
@@ -515,7 +498,7 @@ public class ConfigServiceUtil {
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+result);
}
long end=System.currentTimeMillis();
logger.warn("auditCommonGroupRegionSources end,cost:"+(end-start));
logger.warn("postGroupReuseSources end,cost:"+(end-start));
} catch (Exception e) {
throw e;
} finally {
@@ -525,7 +508,6 @@ public class ConfigServiceUtil {
}
return bean;
}
/**
*
* getReport(配置日志总量统计查询)