public Mono<List<GroupMember>> queryGroupMembers(
            @Nullable Set<Long> groupIds,
            @Nullable Set<Long> userIds,
            @Nullable Set<@ValidGroupMemberRole GroupMemberRole> roles,
            @Nullable DateRange joinDateRange,
            @Nullable DateRange muteEndDateRange,
            @Nullable Integer page,
            @Nullable Integer size) {
        if (roles != null) {
            try {
                for (GroupMemberRole role : roles) {
                    DataValidator.validGroupMemberRole(role);
                }
            } catch (ResponseException e) {
                return Mono.error(e);
            }
        }
        Flux<GroupMember> groupsMemberFlux = groupMemberRepository.findGroupsMembers(groupIds,
                userIds,
                roles,
                joinDateRange,
                muteEndDateRange,
                page,
                size);
        if (isMemberCacheEnabled
                && CollectionUtil.isNotEmpty(groupIds)
                && userIds == null
                && roles == null
                && joinDateRange == null
                && muteEndDateRange == null) {
            return groupsMemberFlux.collect(CollectorUtil.toChunkedList())
                    .doOnNext(members -> {
                        if ((page != null && page != 0)
                                || (size != null && size <= members.size())) {
                            return;
                        }
                        int groupCount = groupIds.size();
                        if (groupCount == 1) {
                            cacheMembers(groupIds.iterator()
                                    .next(), members);
                        } else {
                            Map<Long, List<GroupMember>> groupIdToMembers =
                                    CollectionUtil.newMapWithExpectedSize(groupCount);
                            for (GroupMember member : members) {
                                Long groupId = member.getKey()
                                        .getGroupId();
                                List<GroupMember> groupMembers = groupIdToMembers.get(groupId);
                                if (groupMembers == null) {
                                    groupMembers = new ChunkedArrayList<>();
                                    groupIdToMembers.put(groupId, groupMembers);
                                }
                                groupMembers.add(member);
                            }
                            for (Map.Entry<Long, List<GroupMember>> entry : groupIdToMembers
                                    .entrySet()) {
                                cacheMembers(entry.getKey(), entry.getValue());
                            }
                        }
                    });
        }
        return groupsMemberFlux.collect(CollectorUtil.toChunkedList());
    }
@return Possible codes: {@link ResponseStatusCode#OK}
        {@link ResponseStatusCode#SEND_MESSAGE_TO_MUTED_GROUP}
        {@link ResponseStatusCode#SEND_MESSAGE_TO_INACTIVE_GROUP}
        {@link ResponseStatusCode#MUTED_GROUP_MEMBER_SEND_MESSAGE}
turms-service/src/main/java/im/turms/service/domain/group/service/GroupMemberService.java