Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
31af31ed
Commit
31af31ed
authored
Mar 26, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码调整
parent
b0424090
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
GHousesToAgents.php
application/model/GHousesToAgents.php
+7
-3
No files found.
application/model/GHousesToAgents.php
View file @
31af31ed
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment