Commit d67a8687 authored by hujun's avatar hujun

返回是否独家字段

parent 60fc7091
......@@ -303,7 +303,7 @@ class GHouses extends BaseModel
* @throws \think\exception\DbException
*/
public function getExclusive($data, $houses_id) {
$result = $this->field('id')->where('id',$houses_id)->where('status','<>',3)->find();
$result = $this->field('id,is_exclusive_type')->where('id',$houses_id)->where('status','<>',3)->find();
if ($result->id) {
$house_ext = $this->table('g_houses_ext')->where('house_id',$houses_id)->field('agent_start_time,agent_end_time')->find();
$agents = $this->table('g_houses_to_agents')->field('b.id,b.name,b.phone')->alias('a')
......@@ -320,6 +320,7 @@ class GHouses extends BaseModel
$return['agent_start_time'] = $house_ext['agent_start_time'];
$return['agent_end_time'] = $house_ext['agent_end_time'];
$return['exclusive_img'] = $img;
$return['is_exclusive_type'] = $result->is_exclusive_type;
} else {
$return = false;
}
......
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