Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 3454 | Rev 4842 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3454 Rev 3639
Línea 126... Línea 126...
126
            
126
            
127
 
127
 
128
            if($isJson) {
128
            if($isJson) {
129
                $currentUserPlugin = $this->plugin('currentUserPlugin');
-
 
Línea 130... Línea 129...
130
                $currentUser = $currentUserPlugin->getUser();
129
                $currentUserPlugin = $this->plugin('currentUserPlugin');
131
                
130
                $currentUser = $currentUserPlugin->getUser();
Línea 149... Línea 148...
149
                        $select->columns(['id', 'user_uuid' => 'uuid', 'first_name','last_name','image']);
148
                        $select->columns(['id', 'user_uuid' => 'uuid', 'first_name','last_name','image']);
150
                        $select->from(['u' => UserMapper::_TABLE]);
149
                        $select->from(['u' => UserMapper::_TABLE]);
151
                        $select->join(['ue' => UserExperienceMapper::_TABLE], 'u.id = ue.user_id',[ 'industry_id'] , Select::JOIN_LEFT);
150
                        $select->join(['ue' => UserExperienceMapper::_TABLE], 'u.id = ue.user_id',[ 'industry_id'] , Select::JOIN_LEFT);
152
                        $select->join(['up' => UserProfileMapper::_TABLE], "u.id = up.user_id ", ['user_profile_uuid' => 'uuid', 'user_profile_id' => 'id', 'description'] );
151
                        $select->join(['up' => UserProfileMapper::_TABLE], "u.id = up.user_id ", ['user_profile_uuid' => 'uuid', 'user_profile_id' => 'id', 'description'] );
153
                        $select->join(['l' => LocationMapper::_TABLE], "u.location_id = l.id" ,['country', 'state', 'city1', 'city2'], Select::JOIN_LEFT);
152
                        $select->join(['l' => LocationMapper::_TABLE], "u.location_id = l.id" ,['country', 'state', 'city1', 'city2'], Select::JOIN_LEFT);
-
 
153
                        $select->where->equalTo('u.network_id', $currentUser->network_id);
154
                        $select->where->equalTo('up.public', UserProfile::PUBLIC_YES);
154
                        $select->where->equalTo('up.public', UserProfile::PUBLIC_YES);
155
                        
-
 
156
                      
155
  
157
                        
-
 
Línea 158... Línea 156...
158
                        
156
                        
159
                        if($country) {
157
                        if($country) {
160
                            $select->where->equalTo('country', $country);
158
                            $select->where->equalTo('country', $country);
161
                        }
159
                        }
Línea 277... Línea 275...
277
                        $select->from(['c' => CompanyMapper::_TABLE]);
275
                        $select->from(['c' => CompanyMapper::_TABLE]);
278
                        $select->join(['cl' => CompanyLocationMapper::_TABLE], 'c.id = cl.company_id', ['location_id', 'is_main'], Select::JOIN_LEFT);
276
                        $select->join(['cl' => CompanyLocationMapper::_TABLE], 'c.id = cl.company_id', ['location_id', 'is_main'], Select::JOIN_LEFT);
279
                        $select->join(['l' => LocationMapper::_TABLE], 'cl.location_id = l.id' ,['formatted_address', 'country', 'state', 'city1', 'city2'], Select::JOIN_LEFT);
277
                        $select->join(['l' => LocationMapper::_TABLE], 'cl.location_id = l.id' ,['formatted_address', 'country', 'state', 'city1', 'city2'], Select::JOIN_LEFT);
280
                        $select->join(['cu' => CompanyUserMapper::_TABLE], 'c.id = cu.company_id', ['user_id', 'owner']);
278
                        $select->join(['cu' => CompanyUserMapper::_TABLE], 'c.id = cu.company_id', ['user_id', 'owner']);
281
                        //$select->where->equalTo('cl.is_main', CompanyLocation::IS_MAIN_YES);
279
                        //$select->where->equalTo('cl.is_main', CompanyLocation::IS_MAIN_YES);
-
 
280
                        $select->where->equalTo('c.network_id', $currentUser->network_id);
282
                        $select->where->equalTo('cu.owner', CompanyUser::OWNER_YES);
281
                        $select->where->equalTo('cu.owner', CompanyUser::OWNER_YES);
283
                        $select->where->equalTo('c.status', Company::STATUS_ACTIVE);
282
                        $select->where->equalTo('c.status', Company::STATUS_ACTIVE);
Línea 360... Línea 359...
360
                        
359
                        
361
                        $queryMapper = QueryMapper::getInstance($this->adapter);
360
                        $queryMapper = QueryMapper::getInstance($this->adapter);
362
                        $select = $queryMapper->getSql()->select();
361
                        $select = $queryMapper->getSql()->select();
363
                        $select->columns(['id', 'group_uuid' => 'uuid',  'name', 'description','image','type_id', 'industry_id', 'user_id' ]);
362
                        $select->columns(['id', 'group_uuid' => 'uuid',  'name', 'description','image','type_id', 'industry_id', 'user_id' ]);
-
 
363
                        $select->from(['g' => GroupMapper::_TABLE]);
Línea 364... Línea 364...
364
                        $select->from(['g' => GroupMapper::_TABLE]);
364
                        $select->where->equalTo('g.network_id', $currentUser->network_id);
365
                        
365
                        
366
                        if($group_type_ids) {
366
                        if($group_type_ids) {
Línea 441... Línea 441...
441
                        $select->columns(['id', 'job_uuid' => 'uuid', 'company_id','title','description','employment_type','location_id','last_date_of_application','experience_visible','experience_min','experience_max']);
441
                        $select->columns(['id', 'job_uuid' => 'uuid', 'company_id','title','description','employment_type','location_id','last_date_of_application','experience_visible','experience_min','experience_max']);
442
                        $select->from(['j' => JobMapper::_TABLE]);
442
                        $select->from(['j' => JobMapper::_TABLE]);
443
                        $select->join(['c' => CompanyMapper::_TABLE] , 'c.id = j.company_id', ['company_uuid' => 'uuid', 'company_name' => 'name', 'image', 'industry_id', 'company_size_id']);
443
                        $select->join(['c' => CompanyMapper::_TABLE] , 'c.id = j.company_id', ['company_uuid' => 'uuid', 'company_name' => 'name', 'image', 'industry_id', 'company_size_id']);
444
                        $select->join(['l' => LocationMapper::_TABLE], 'j.location_id = l.id' ,['formatted_address', 'country', 'state', 'city1', 'city2'] );
444
                        $select->join(['l' => LocationMapper::_TABLE], 'j.location_id = l.id' ,['formatted_address', 'country', 'state', 'city1', 'city2'] );
445
                        $select->join(['cu' => CompanyUserMapper::_TABLE], 'c.id = cu.company_id', ['user_id', 'owner']);
445
                        $select->join(['cu' => CompanyUserMapper::_TABLE], 'c.id = cu.company_id', ['user_id', 'owner']);
-
 
446
                        $select->where->equalTo('j.network_id', $currentUser->network_id);
446
                        $select->where->equalTo('cu.owner', CompanyUser::OWNER_YES);
447
                        $select->where->equalTo('cu.owner', CompanyUser::OWNER_YES);
447
                        $select->where->equalTo('c.status', Company::STATUS_ACTIVE);
448
                        $select->where->equalTo('c.status', Company::STATUS_ACTIVE);
Línea 448... Línea 449...
448
                        
449
                        
449
                        if($user_blocked_ids) {
450
                        if($user_blocked_ids) {