Commit a933f22a authored by fangliyan's avatar fangliyan

base_id 取消收藏

parent fe5e84f8
......@@ -873,8 +873,9 @@ class Esf_center_api extends MY_Controller {
$city = $this->input->get('city');
$tbl=$kind==3?'sell':'rent';
$id = $this->user_model->getCollectHouseIdByBaseID($base_id,$kind,$rowid,$city);
print_r($id);exit;
if($id==0)
if(empty($id))
{
$return = 'N_COL';
}else{
......
......@@ -883,12 +883,15 @@ class User_model extends MY_Model
* @param type $base_id
* @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);
$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($all){
return $all;
}
return $return[0];
}else{
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