@@ -255,8 +255,13 @@ public class UserManagementService {
}
} else {
int ugId = RandomUtils.nextInt(userGroupCountDTOList.size());
+ int i = 10;
while (userGroupCountDTOList.get(ugId).getCount() >= gzhUserGroupPerCount) {
ugId = RandomUtils.nextInt(userGroupCountDTOList.size());
+ i--;
+ if (i <= 0) {
+ break;
+ }
return ugId;