diff --git a/src/main/java/com/nis/web/service/restful/ConfigJedisServiceimpl.java b/src/main/java/com/nis/web/service/restful/ConfigJedisServiceimpl.java index 1662339..38af07a 100644 --- a/src/main/java/com/nis/web/service/restful/ConfigJedisServiceimpl.java +++ b/src/main/java/com/nis/web/service/restful/ConfigJedisServiceimpl.java @@ -1507,7 +1507,8 @@ public class ConfigJedisServiceimpl implements ConfigRedisService { groupId = Long.parseLong( groupRegion.replace("GROUPREGION:", ""));// 获取真实的groupid } - if (!keepGroupIdList.contains(groupId)) {// 如果不是需要保留的groupid则失效(公共组不失效[如需失效使用公共组失效接口],非公共组则失效) + if (keepGroupIdList == null || keepGroupIdList.size() == 0 + || !keepGroupIdList.contains(groupId)) {// 如果不是需要保留的groupid则失效(公共组不失效[如需失效使用公共组失效接口],非公共组则失效) groupRegionVal = groupRegionVal .replace("EFFECTIVE_RULE", "OBSOLETE_RULE"); String[] split = org.apache.commons.lang.StringUtils @@ -1536,10 +1537,10 @@ public class ConfigJedisServiceimpl implements ConfigRedisService { } } catch (Exception e) { - throw new ServiceRuntimeException("从" + idRelaRedisDBIndex - + "号redis库中删除" + groupRegion - + "失败,redis中不存在该值,请联系开发人员检查删除逻辑是否正确或redis数据是否出现了异常", - RestBusinessCode.KeyNotExistsInRedis.getValue()); + throw new ServiceRuntimeException( + "从" + idRelaRedisDBIndex + "号redis库中删除" + groupRegion + + "失败,失败原因:" + ExceptionUtil.getExceptionMsg(e), + RestBusinessCode.DeleteDataInError.getValue()); } } // @@ -1773,9 +1774,9 @@ public class ConfigJedisServiceimpl implements ConfigRedisService { updateMaatInfo(expressionList, obsoleteKey, transaction, maatVersion, everyDb, true); } } - }else { - throw new ServiceRuntimeException("修改公共组域配置时,无法获取到groupid="+groupId+"的公共组,请检查配置参数是否正确", - RestBusinessCode.ConfigSourceIsNull.getValue()); + } else { + throw new ServiceRuntimeException("修改公共组域配置时,无法获取到groupid=" + groupId + "的公共组,请检查配置参数是否正确", + RestBusinessCode.ConfigSourceIsNull.getValue()); } }