修改回调类配置状态更新处理逻辑

This commit is contained in:
zhangdongxu
2018-08-21 19:38:18 +08:00
parent fa58b0b584
commit af7767a3d0
7 changed files with 91 additions and 34 deletions

View File

@@ -179,9 +179,15 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
} catch (Exception e) {
transaction.discard();
String error = "保存非maat类配置发生了异常," + e.getMessage();
// logger.error(error);
throw new ServiceRuntimeException(error, RestBusinessCode.SaveDataInError.getValue());
if (e instanceof ServiceRuntimeException) {
throw e;
}else {
String error = "保存非maat类配置发生了异常," + e.getMessage();
// logger.error(error);
throw new ServiceRuntimeException(error, RestBusinessCode.SaveDataInError.getValue());
}
} finally {
// 释放连接到连接池
JedisUtils.returnResource(resource);
@@ -525,9 +531,13 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
throw new ServiceRuntimeException(error, RestBusinessCode.CannotConnectionRedis.getValue());
} catch (Exception e) {
transaction.discard();
String error = "保存maat类配置发生了异常" + e.getMessage();
logger.error(error);
throw new ServiceRuntimeException(error, RestBusinessCode.SaveDataInError.getValue());
if (e instanceof ServiceRuntimeException) {
throw e;
}else {
String error = "保存maat类配置发生了异常" + e.getMessage();
logger.error(error);
throw new ServiceRuntimeException(error, RestBusinessCode.SaveDataInError.getValue());
}
} finally {
// 释放连接到连接池
JedisUtils.returnResource(resource);
@@ -942,7 +952,13 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
transaction.discard();
String error = "删除非maat类配置发生了异常," + e.getMessage();
// logger.error(error);
throw new ServiceRuntimeException(error, RestBusinessCode.DeleteDataInError.getValue());
if (e instanceof ServiceRuntimeException) {
throw e;
}else {
throw new ServiceRuntimeException(error, RestBusinessCode.DeleteDataInError.getValue());
}
} finally {
// 释放连接到连接池
JedisUtils.returnResource(resource);