Commit 31af31ed authored by hujun's avatar hujun

代码调整

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