Commit 75913f36 authored by zhuwei's avatar zhuwei

查询收藏数据

parent fd5c223a
......@@ -9,6 +9,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\api_broker\service\LookShopService;
use app\model\ACollectHouse;
use think\Request;
......@@ -87,26 +88,49 @@ class CollectHouse extends Basic
{
$params = $this->params;
/*$params = array(
$params = array(
"agents_id" => 2,
);*/
);
if (!isset($params["agents_id"])) {
return $this->response("101", "请求参数错误");
}
/**
* id : 4
* title : vvvv
* business_district_id : 0
* status : 1
* industry_type : 百货零售,其他
* shop_area_start : 6
* shop_area_end : 7
* shop_type : 0
* shop_sign : 办公室配套,5A景区游客量大,超高佣金,居民区十字路口
* rent_type : 2
* rent_price : 11
* is_look : true
*/
$field = 'CollectUser.id,';
$field .= 'Houses.id as house_id,';
$field .= 'Houses.internal_title,';
$field .= 'Houses.market_area,';
$field .= 'Houses.rent_type,';
$field .= 'Houses.rent_price,';
$field .= 'Houses.business_district_id,';
$field .= 'Houses.status,';
$field .= 'Houses.industry_type,';
$field .= 'Houses.shop_area_start,';
$field .= 'Houses.shop_area_end,';
$field .= 'Houses.shop_sign';
$field .= 'Houses.shop_type,';
$field .= 'Houses.shop_sign,';
$field .= 'Houses.rent_type,';
$field .= 'Houses.rent_price';
$get_params['agents_id'] = $params["agents_id"];
$res = $this->aCollectHouse->getCollectList($field,$get_params);
$look_shop_service = new LookShopService();
foreach ($res as $key => $val) {
$isLook = $look_shop_service->isLooked($params["agents_id"], $val["house_id"]);
$res[$key]["is_look"] = $isLook;
}
//dump($res);
if ($res) {
......
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