配置全量更新时的异常处理增加服务端的异常状态,增加国际化参数。

This commit is contained in:
zhangwei
2018-12-03 11:48:16 +08:00
parent 388f2d3c0b
commit 90a64dfbb2
9 changed files with 70 additions and 60 deletions

View File

@@ -427,8 +427,8 @@ public class ConfigSynchronizationService extends BaseService{
}
}else {
//调用服务接口配置全量更新
FileUtils.writeToFile("/home/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
FileUtils.writeToFile("/home/ceiec/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
}
}
return hasData;
@@ -595,8 +595,8 @@ public class ConfigSynchronizationService extends BaseService{
}
}else {
//调用服务接口配置全量更新
FileUtils.writeToFile("/home/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
FileUtils.writeToFile("/home/ceiec/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
}
}
return hasData;
@@ -774,8 +774,8 @@ public class ConfigSynchronizationService extends BaseService{
}
}else {
//调用服务接口配置全量更新
FileUtils.writeToFile("/home/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
FileUtils.writeToFile("/home/ceiec/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
}
}
return hasData;
@@ -934,8 +934,8 @@ public class ConfigSynchronizationService extends BaseService{
}
}else {
//调用服务接口配置全量更新
FileUtils.writeToFile("/home/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
FileUtils.writeToFile("/home/ceiec/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
}
}
return hasData;
@@ -1143,8 +1143,8 @@ public class ConfigSynchronizationService extends BaseService{
}
}else {
//调用服务接口配置全量更新
FileUtils.writeToFile("/home/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
FileUtils.writeToFile("/home/ceiec/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
}
}
@@ -1326,8 +1326,8 @@ public class ConfigSynchronizationService extends BaseService{
}
}else {
//调用服务接口配置全量更新
FileUtils.writeToFile("/home/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
FileUtils.writeToFile("/home/ceiec/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
}
}
@@ -1444,8 +1444,8 @@ public class ConfigSynchronizationService extends BaseService{
}
}else {
//调用服务接口配置全量更新
FileUtils.writeToFile("/home/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
// JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
FileUtils.writeToFile("/home/ceiec/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
JSONObject result = ConfigServiceUtil.configSync(json,1,entity.getServiceId(),null,(hasData?null:"FINISHED"));
}
}
@@ -1569,9 +1569,9 @@ public class ConfigSynchronizationService extends BaseService{
logger.info("配置批量下发响应信息:"+result.getMsg());
}
}else {
FileUtils.writeToFile("/home/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
FileUtils.writeToFile("/home/ceiec/configSync/"+DateUtils.getDate("yyyy-MM-dd")+"/"+entity.getServiceId()+"_"+page.getPageNo()+"_"+System.currentTimeMillis()+".json", json, false);
//调用服务接口同步回调类配置
// JSONObject result = ConfigServiceUtil.configSync(json,2,entity.getServiceId(),entity.getTableName(),(hasData?null:"FINISHED"));
JSONObject result = ConfigServiceUtil.configSync(json,2,entity.getServiceId(),entity.getTableName(),(hasData?null:"FINISHED"));
}
}