Commit 4f684d9a authored by fangliyan's avatar fangliyan

PC收藏相关

parent 10aa85f0
...@@ -4651,7 +4651,33 @@ if($searcharr['infotype']==4){ ...@@ -4651,7 +4651,33 @@ if($searcharr['infotype']==4){
if( empty($block) ) if( empty($block) )
{ {
$block_array = $this->get_data(array('form_name' => 'personal_collection','where'=>array('uid'=>$uid,'city_name'=>$city,'collect_id <>'=>0,'kind'=>2),'select'=>array('collect_id')),'esfbak'); $user_array = $this->get_data(array('form_name' => 'personal_user','where'=>array('id'=>$uid),'select'=>array('passport_uid')),'esfbak');
$base_id = '';
if(!empty($user_array)){
$passport_uid = $user_array[0]['passport_uid'];
$base_id_url = 'http://localnewrent.house365.com/api/tf-app/get-base-id?keyword='.$passport_uid;
$base_id = curl_get_contents($base_id_url);
}
$base_id_where = "'".$base_id."'";
if($base_id){
$base_id = explode(',',$base_id);
if(count($base_id)>1){
$base_id_where = '';
foreach ($base_id as $key => $value) {
$base_id_where .= "'".$value."',";
}
$base_id_where = rtrim($base_id_where,',');
}
}
if($base_id){
$sql = "select collect_id from personal_collection where base_id in ($base_id_where) and city_name = '$city' and kind = 2 and collect_id <> 0
order by collect_time desc limit $offset,$pagesize";
$query = $this->db_esfbak->query($sql);
$block_array = $query->result_array();
}else{
$block_array = $this->get_data(array('form_name' => 'personal_collection','where'=>array('uid'=>$uid,'city_name'=>$city,'collect_id <>'=>0,'kind'=>2),'select'=>array('collect_id')),'esfbak');
}
if(is_array($block_array) && !empty($block_array)) if(is_array($block_array) && !empty($block_array))
{ {
...@@ -4661,7 +4687,16 @@ if($searcharr['infotype']==4){ ...@@ -4661,7 +4687,16 @@ if($searcharr['infotype']==4){
} }
} }
$sell_array = $this->get_data(array('form_name' => 'personal_collection','where'=>array('uid'=>$uid,'city_name'=>$city,'collect_id <>'=>0,'kind'=>3),'select'=>array('collect_id')),'esfbak'); if($base_id){
$sql = "select collect_id from personal_collection where base_id in ($base_id_where) and city_name = '$city' and kind = 3 and collect_id <> 0
order by collect_time desc limit $offset,$pagesize";
$query = $this->db_esfbak->query($sql);
$sell_array = $query->result_array();
}else{
$sell_array = $this->get_data(array('form_name' => 'personal_collection','where'=>array('uid'=>$uid,'city_name'=>$city,'collect_id <>'=>0,'kind'=>3),'select'=>array('collect_id')),'esfbak');
}
if(is_array($sell_array) && !empty($sell_array)) if(is_array($sell_array) && !empty($sell_array))
{ {
...@@ -4683,7 +4718,16 @@ if($searcharr['infotype']==4){ ...@@ -4683,7 +4718,16 @@ if($searcharr['infotype']==4){
} }
} }
$rent_array = $this->get_data(array('form_name' => 'personal_collection','where'=>array('uid'=>$uid,'city_name'=>$city,'collect_id <>'=>0,'kind'=>4),'select'=>array('collect_id')),'esfbak'); if($base_id){
$sql = "select collect_id from personal_collection where base_id in ($base_id_where) and city_name = '$city' and kind = 4 and collect_id <> 0
order by collect_time desc limit $offset,$pagesize";
$query = $this->db_esfbak->query($sql);
$rent_array = $query->result_array();
}else{
$rent_array = $this->get_data(array('form_name' => 'personal_collection','where'=>array('uid'=>$uid,'city_name'=>$city,'collect_id <>'=>0,'kind'=>4),'select'=>array('collect_id')),'esfbak');
}
if(is_array($rent_array) && !empty($rent_array)) if(is_array($rent_array) && !empty($rent_array))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment