// TotalCountByStore counts the total count by store
TotalCountByStore counts the total count by store
// TotalCountByStore counts the total count by store
func (s *selectedStores) TotalCountByStore(storeID uint64) uint64 {
	s.mu.RLock()
	defer s.mu.RUnlock()
	groups := s.groupDistribution.GetAllID()
	totalCount := uint64(0)
	for _, group := range groups {
		storeDistribution, ok := s.getDistributionByGroupLocked(group)
		if !ok {
			continue
		}
		count, ok := storeDistribution[storeID]
		if !ok {
			continue
		}
		totalCount += count
	}
	return totalCount
}
func ( s * selectedStores ) TotalCountByStore ( storeID uint64 ) uint64 { s . mu . RLock ( ) defer s . mu . RUnlock ( ) groups := s . groupDistribution . GetAllID ( ) totalCount := uint64 ( 0 ) for _ , group := range groups { storeDistribution , ok := s . getDistributionByGroupLocked ( group ) if ! ok { continue } count , ok := storeDistribution [ storeID ] if ! ok { continue } totalCount += count } return totalCount }
TotalCountByStore counts the total count by store
TotalCountByStore counts the total count by store