diff --git a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/service/impl/GroupConfigServiceImpl.java b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/service/impl/GroupConfigServiceImpl.java index d4025450..2240b757 100644 --- a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/service/impl/GroupConfigServiceImpl.java +++ b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/service/impl/GroupConfigServiceImpl.java @@ -174,7 +174,7 @@ public class GroupConfigServiceImpl implements GroupConfigService { groupConfig.setGroupPartition(HashUtil.bkdrHash(groupConfigRequestVO.getGroupName()) % totalPartition); } else { Assert.isTrue(totalPartition > groupConfigRequestVO.getGroupPartition(), () -> new EasyRetryServerException("分区超过最大分区. [{}]", totalPartition-1)); - Assert.isTrue(groupConfigRequestVO.getGroupPartition() > 0, () -> new EasyRetryServerException("分区不能是负数.")); + Assert.isTrue(groupConfigRequestVO.getGroupPartition() >= 0, () -> new EasyRetryServerException("分区不能是负数.")); } Assert.isTrue(1 == groupConfigMapper.insert(groupConfig), () -> new EasyRetryServerException("新增组异常异常 groupConfigVO[{}]", groupConfigRequestVO));