Commit d26cf800 authored by zhuwei's avatar zhuwei

bug

parent ed439d69
......@@ -88,9 +88,9 @@ class CollectHouse extends Basic
{
$params = $this->params;
$params = array(
/*$params = array(
"agents_id" => 2,
);
);*/
if (!isset($params["agents_id"])) {
return $this->response("101", "请求参数错误");
......@@ -114,9 +114,9 @@ class CollectHouse extends Basic
* is_look : true
*/
$field = 'CollectUser.id,';
$field .= 'Houses.id as house_id,';
$field .= 'Houses.internal_title,';
$field = 'CollectUser.id as collect_user_id,';
$field .= 'Houses.id,';
$field .= 'Houses.internal_title as title,';
$field .= 'Houses.business_district_id,';
$field .= 'Houses.status,';
$field .= 'Houses.industry_type,';
......@@ -128,19 +128,16 @@ class CollectHouse extends Basic
$field .= 'Houses.rent_price';
$get_params['agents_id'] = $params["agents_id"];
$get_params['CollectUser.status'] = 1;
$res = $this->aCollectHouse->getCollectList($pageNo,$pageSize,$field,$get_params);
$look_shop_service = new LookShopService();
foreach ($res as $key => $val) {
$isLook = $look_shop_service->isLooked($params["agents_id"], $val["house_id"]);
$isLook = $look_shop_service->isLooked($params["agents_id"], $val["id"]);
$res[$key]["is_look"] = $isLook;
}
//dump($res);
if ($res) {
return $this->response("200", "成功",$res);
} else {
return $this->response("101", "失败");
}
return $this->response("200", "成功",$res);
}
}
\ No newline at end of file
......@@ -113,7 +113,9 @@ class CollectUser extends Basic
$field .= 'Users.vip,';
$field .= 'Users.area_demand';
$get_params['agents_id'] = $params["agents_id"];
$get_params['agents_id'] = $params["agents_id"];
$get_params['CollectUser.status'] = 1;
$res = $this->aCollectUser->getCollectList($pageNo,$pageSize,$field,$get_params);
foreach($res as $k=>$v)
{
......@@ -128,17 +130,14 @@ class CollectUser extends Basic
}
}
$data['list']=$res;
$data['user_date']=$res;
//dump($res);
$vip_services = new VipService();
$data['examine_vip'] = $vip_services->vip($params['agents_id']);
if ($res) {
return $this->response("200", "成功",$data);
} else {
return $this->response("101", "失败");
}
return $this->response("200", "成功",$data);
}
}
\ No newline at end of file
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