Commit 978d5384 authored by zhuwei's avatar zhuwei

商铺详情盘方

parent a9388187
......@@ -260,13 +260,13 @@ class Shop extends Basic
public function getShopDetail()
{
header('Access-Control-Allow-Origin:*');
/* $params = array(
"id" => 3084,
"site_area" => 3, //1.c端 3.b端 4.pc端
//"user_id" => 2 //if c端 用户登录后传入user_id
);*/
$params = $this->params;
$params = $this->params;
/*$params = array(
"id" => 3084,
"site_area" => 3, //1.c端 3.b端 4.pc端
//"user_id" => 2 //if c端 用户登录后传入user_id
);*/
$conditions = [];
if (empty($params['id'])) {
return $this->response("101", "详情id不能为空");
......@@ -305,7 +305,7 @@ class Shop extends Basic
$conditions['a.id'] = array( "eq", $params["id"] );
$field .= ',b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee';
$field .= ',b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee,c.agents_id';
$result = $this->gHousesModel->getHouseDetailById($field, $conditions);
if (count($result) <= 0) {
return $this->response("101", '此楼盘不存在');
......
......@@ -677,6 +677,7 @@ class GHouses extends BaseModel
->field($field)
->alias("a")
->join('g_houses_ext b', 'a.id=b.house_id', 'left')
->join('g_houses_to_agents c', 'a.id=c.houses_id and c.type=2 and c.is_del=0', 'left')
->where($params)
->find($params["a.id"]);
//echo Db::table($this->table)->getLastSql();
......
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