Commit 4f508e59 authored by hujun's avatar hujun

商铺收藏

parent 8d5e2f32
...@@ -10,7 +10,9 @@ namespace app\api_broker\controller; ...@@ -10,7 +10,9 @@ 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\VipService;
use app\model\ACollectHouse; use app\model\ACollectHouse;
use app\model\GHousesToAgents;
use think\Request; use think\Request;
class CollectHouse extends Basic class CollectHouse extends Basic
...@@ -113,6 +115,8 @@ class CollectHouse extends Basic ...@@ -113,6 +115,8 @@ class CollectHouse extends Basic
$field .= 'Houses.shop_sign,'; $field .= 'Houses.shop_sign,';
$field .= 'Houses.rent_type,'; $field .= 'Houses.rent_type,';
$field .= 'Houses.rent_price'; $field .= 'Houses.rent_price';
$field .= 'Houses.is_lock';
$field .= 'Houses.is_vip';
$get_params['agents_id'] = $params["agents_id"]; $get_params['agents_id'] = $params["agents_id"];
$get_params['CollectUser.status'] = 1; $get_params['CollectUser.status'] = 1;
...@@ -125,6 +129,28 @@ class CollectHouse extends Basic ...@@ -125,6 +129,28 @@ class CollectHouse extends Basic
$res[$key]["is_look"] = $isLook; $res[$key]["is_look"] = $isLook;
$res[$key]["rent_price"] = $val["rent_price"] * 0.01; $res[$key]["rent_price"] = $val["rent_price"] * 0.01;
$res[$key]["rent_price"] = $val["rent_price"] * 0.01; $res[$key]["rent_price"] = $val["rent_price"] * 0.01;
//锁盘后,盘方、独家方、有权限的可以查看
$res[$key]["look_lock"] = 0;
if (isset($val['is_lock']) && $val['is_lock'] == 1) {
$vip = new VipService();
if (!$vip->vip($this->agentId, 'index/lockHouse')) {
$res[$key]["look_lock"] = 1;
}
$m_agent = new GHousesToAgents();
$agent_where['a.agents_id'] = $this->agentId;
$agent_where['a.type'] = ['in', '2,3'];
$agent_where['a.houses_id'] = $val['id'];
$agent_where['a.is_del'] = 0;
$agent_data = $m_agent->getAgentsHouseField('a.id', $agent_where);
foreach ($agent_data as $vvv) {
if ($vvv > 0) {
$res[$key]["look_lock"] = 1;
}
}
}
} }
//这里为了将APP跟后台区分开来,pc后台需要total,app不需要 //这里为了将APP跟后台区分开来,pc后台需要total,app不需要
......
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