Commit a933f22a authored by fangliyan's avatar fangliyan

base_id 取消收藏

parent fe5e84f8
...@@ -873,8 +873,9 @@ class Esf_center_api extends MY_Controller { ...@@ -873,8 +873,9 @@ class Esf_center_api extends MY_Controller {
$city = $this->input->get('city'); $city = $this->input->get('city');
$tbl=$kind==3?'sell':'rent'; $tbl=$kind==3?'sell':'rent';
$id = $this->user_model->getCollectHouseIdByBaseID($base_id,$kind,$rowid,$city); $id = $this->user_model->getCollectHouseIdByBaseID($base_id,$kind,$rowid,$city);
print_r($id);exit;
if($id==0) if(empty($id))
{ {
$return = 'N_COL'; $return = 'N_COL';
}else{ }else{
......
...@@ -883,12 +883,15 @@ class User_model extends MY_Model ...@@ -883,12 +883,15 @@ class User_model extends MY_Model
* @param type $base_id * @param type $base_id
* @return string * @return string
*/ */
function getCollectHouseIdByBaseID($base_id,$kind,$houseid,$city=GB_CITY){ function getCollectHouseIdByBaseID($base_id,$kind,$houseid,$city=GB_CITY,$all=0){
$base_id = explode(',',$base_id); $base_id = explode(',',$base_id);
$return = $this->get_data(array('form_name' => 'personal_collection','where_in'=>array('base_id'=>$base_id),'where'=>array('collect_id'=>$houseid,'city_name'=>$city,'kind'=>$kind),'select'=>array('id')),'esf'); $return = $this->get_data(array('form_name' => 'personal_collection','where_in'=>array('base_id'=>$base_id),'where'=>array('collect_id'=>$houseid,'city_name'=>$city,'kind'=>$kind),'select'=>array('id')),'esf');
if(!empty($return[0])) if(!empty($return[0]))
{ {
if($all){
return $all;
}
return $return[0]; return $return[0];
}else{ }else{
return 0; return 0;
......
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