Commit 2b5dbe24 authored by zhuwei's avatar zhuwei

商铺详情新增是否被收藏字段

parent c4f4c356
...@@ -5,6 +5,7 @@ namespace app\api_broker\controller; ...@@ -5,6 +5,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\LookShopService; use app\api_broker\service\LookShopService;
use app\api_broker\service\VerifyService; use app\api_broker\service\VerifyService;
use app\model\ACollectHouse;
use app\model\AttentionModel; use app\model\AttentionModel;
use app\model\GHouses; use app\model\GHouses;
use app\model\GHousesFollowUp; use app\model\GHousesFollowUp;
...@@ -13,6 +14,7 @@ use app\model\OBargainModel; ...@@ -13,6 +14,7 @@ use app\model\OBargainModel;
use app\model\Regions; use app\model\Regions;
use think\Log; use think\Log;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
* User : zw * User : zw
...@@ -338,6 +340,20 @@ class Shop extends Basic ...@@ -338,6 +340,20 @@ class Shop extends Basic
} }
} }
//是否被收藏
$result["is_collect"] = 2;
if ($params['site_area'] == 3) {
//先判断是否已经存在数据
$field = 'id,status';
$get_params['agents_id'] = $params["user_id"];
$get_params['house_id'] = $params["id"];
$collect_house = new ACollectHouse();
$res = $collect_house->getCollectHouse($field,$get_params);
if($res && ($res[0]['status'] == 1)){//如果存在
$result["is_collect"] = 1;
}
}
return $this->response("200", 'request success', $result); return $this->response("200", 'request success', $result);
} }
......
...@@ -47,4 +47,8 @@ class VipService ...@@ -47,4 +47,8 @@ class VipService
} }
} }
} }
\ 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