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
f6427d26
Commit
f6427d26
authored
Jul 10, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3c5daea3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
User.php
application/api_broker/controller/User.php
+30
-1
UserAgentModel.php
application/model/UserAgentModel.php
+11
-0
No files found.
application/api_broker/controller/User.php
View file @
f6427d26
...
...
@@ -15,6 +15,7 @@ use app\model\GOperatingRecords;
use
app\model\ULabels
;
use
app\model\UPhoneFollowPp
;
use
app\model\UPhoneFollowUp
;
use
app\model\UserAgentModel
;
use
app\model\Users
;
use
think\Log
;
use
think\Request
;
...
...
@@ -139,7 +140,13 @@ class User extends Basic
break
;
case
2
:
$conditions
[
'agent_id'
]
=
$params
[
'agent_id'
];
$user_id_str
=
$this
->
getUserIDList
(
$params
[
'agent_id'
]);
if
(
$user_id_str
){
$conditions
[
'agent_id'
]
=
array
(
'in'
,
$user_id_str
);
}
else
{
$conditions
[
'agent_id'
]
=
$params
[
'agent_id'
];
}
if
(
isset
(
$params
[
'user_status'
]))
{
$conditions
[
'user_status'
]
=
$params
[
'user_status'
];
}
...
...
@@ -878,5 +885,26 @@ class User extends Basic
}
public
function
getUserIDList
(
$agent_id
)
{
//查询总监下面门店的所有经纪人
$params
=
[];
$params
[
"agent_id"
]
=
$agent_id
;
$params
[
"is_del"
]
=
0
;
$m_user_agent
=
new
UserAgentModel
();
$field
=
'user_id'
;
$res
=
$m_user_agent
->
selectUser
(
$field
,
$params
);
$user_id_str
=
""
;
if
(
count
(
$res
)
>
0
)
{
foreach
(
$res
as
$k
=>
$v
)
{
$user_id_str
.=
$v
[
"user_id"
]
.
","
;
}
$user_id_str
=
rtrim
(
$user_id_str
,
","
);
}
return
$user_id_str
;
}
}
\ No newline at end of file
application/model/UserAgentModel.php
View file @
f6427d26
...
...
@@ -56,6 +56,17 @@ class UserAgentModel extends Model
//echo $this->getLastSql();
return
$result
;
}
public
function
selectUser
(
$field
,
$params
)
{
$params
[
"is_del"
]
=
0
;
$result
=
$this
->
db_
->
field
(
$field
)
->
where
(
$params
)
->
select
();
//echo $this->getLastSql();
return
$result
;
}
/**
* 更新数据
*/
...
...
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