Commit 31af31ed authored by hujun's avatar hujun

代码调整

parent b0424090
......@@ -3,7 +3,7 @@
namespace app\model;
use Think\Db;
use think\Model;
class GHousesToAgents extends BaseModel
{
......@@ -12,7 +12,7 @@ class GHousesToAgents extends BaseModel
/**
* @param $agents_id
* @param $houses_id
* @param $type 案场权限人:0,盘方:1,独家:2
* @param $type //案场权限人:0,盘方:1,独家:2
* @return array|false
* @throws \Exception
* @throws \think\db\exception\DataNotFoundException
......@@ -22,7 +22,7 @@ class GHousesToAgents extends BaseModel
public function addAgents($agents_id, $houses_id, $type){
$agent_arr = array();
$agents_id = array_unique(explode(',',$agents_id));
$del_agents_id = $record_agents_id = [];
$where['type'] = $type;
$where['houses_id'] = $houses_id;
$where['is_del'] = 0;
......@@ -103,6 +103,7 @@ class GHousesToAgents extends BaseModel
* 解除经纪人和楼盘关系
*
* @param $id
* @param $houses_id
* @return bool|false|int
*/
public function del($id, $houses_id) {
......@@ -143,6 +144,9 @@ class GHousesToAgents extends BaseModel
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getHouseByAgentId($field,$params){
$result = Db::name($this->table)
......
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