Proyectos de Subversion LeadersLinked - Services

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 175
Línea 9... Línea 9...
9
use LeadersLinked\Model\DiscoveryContactInteraction;
9
use LeadersLinked\Model\DiscoveryContactInteraction;
10
use LeadersLinked\Hydrator\ObjectPropertyHydrator;
10
use LeadersLinked\Hydrator\ObjectPropertyHydrator;
11
use Laminas\Db\ResultSet\HydratingResultSet;
11
use Laminas\Db\ResultSet\HydratingResultSet;
12
use Laminas\Paginator\Adapter\DbSelect;
12
use Laminas\Paginator\Adapter\DbSelect;
13
use Laminas\Paginator\Paginator;
13
use Laminas\Paginator\Paginator;
-
 
14
use Laminas\Db\Sql\Expression;
Línea 14... Línea 15...
14
 
15
 
15
 
16
 
16
class DiscoveryContactInteractionMapper extends MapperCommon
17
class DiscoveryContactInteractionMapper extends MapperCommon
Línea 120... Línea 121...
120
        
121
        
121
        
122
        
Línea -... Línea 123...
-
 
123
        return $paginator;
-
 
124
    }
-
 
125
    
-
 
126
    /**
-
 
127
     * 
-
 
128
     * @param int $company_id
-
 
129
     * @return int[]
-
 
130
     */
-
 
131
    public function fetchAllUserIdsForCompanyId($company_id)
-
 
132
    {
-
 
133
        //SELECT DISTINCT(user_id) AS user_id FROM tbl_discovery_contact_interactions;
-
 
134
        
-
 
135
        $user_ids = [];
-
 
136
        
-
 
137
        $select = $this->sql->select(self::_TABLE);
-
 
138
        $select->columns(['user_id' => new Expression('DISTINCT(user_id)')]);
-
 
139
        $select->where->equalTo('company_id', $company_id);
-
 
140
        
-
 
141
        $records = $this->executeFetchAllArray($select);
-
 
142
        foreach($records as $record)
-
 
143
        {
-
 
144
            array_push($user_ids, $record['user_id']);
-
 
145
        }
-
 
146
        return $user_ids;
Línea 122... Línea 147...
122
        return $paginator;
147
        
123
    }
148
    }
124
    
149
    
125
    
150