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
d331d1a9
Commit
d331d1a9
authored
Jul 09, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user
parent
abce67be
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
35 deletions
+9
-35
OfficePerformanceService.php
application/api_broker/service/OfficePerformanceService.php
+2
-2
PerformanceService.php
application/api_broker/service/PerformanceService.php
+2
-2
UserAgentModel.php
application/model/UserAgentModel.php
+0
-25
Users.php
application/model/Users.php
+5
-6
No files found.
application/api_broker/service/OfficePerformanceService.php
View file @
d331d1a9
...
...
@@ -601,7 +601,7 @@ class OfficePerformanceService
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.user_name,a.user_phone,a.user_nick,a.create_time,a.agent_id"
;
$addUserList
=
$this
->
user
Agent
Model
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
$addUserList
=
$this
->
userModel
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
foreach
(
$addUserList
as
$key
=>
$val
)
{
if
(
$val
[
"agent_id"
]
==
$agent_id
)
{
$addUserList
[
$key
][
"is_my"
]
=
1
;
...
...
@@ -798,7 +798,7 @@ class OfficePerformanceService
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.user_name,a.user_phone,a.user_nick,a.create_time,a.agent_id,a.user_status,a.source,a.industry_type,a.area_demand,b.name"
;
$addUserList
=
$this
->
user
Agent
Model
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
$addUserList
=
$this
->
userModel
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
foreach
(
$addUserList
as
$key
=>
$val
)
{
if
(
$val
[
"agent_id"
]
==
$id
)
{
$addUserList
[
$key
][
"is_my"
]
=
1
;
...
...
application/api_broker/service/PerformanceService.php
View file @
d331d1a9
...
...
@@ -534,7 +534,7 @@ class PerformanceService
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.user_name,a.user_phone,a.user_nick,a.create_time,a.agent_id"
;
$addUserList
=
$this
->
user
Agent
Model
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
$addUserList
=
$this
->
userModel
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
foreach
(
$addUserList
as
$key
=>
$val
)
{
if
(
$val
[
"agent_id"
]
==
$agent_id
)
{
$addUserList
[
$key
][
"is_my"
]
=
1
;
...
...
@@ -757,7 +757,7 @@ class PerformanceService
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.user_name,a.user_phone,a.user_nick,a.create_time,a.agent_id,a.user_status,a.source,a.industry_type,a.area_demand,b.name"
;
$addUserList
=
$this
->
user
Agent
Model
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
$addUserList
=
$this
->
userModel
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
foreach
(
$addUserList
as
$key
=>
$val
)
{
if
(
$val
[
"agent_id"
]
==
$id
)
{
$addUserList
[
$key
][
"is_my"
]
=
1
;
...
...
application/model/UserAgentModel.php
View file @
d331d1a9
...
...
@@ -102,31 +102,6 @@ class UserAgentModel extends Model
->
select
();
}
/**
* 获取新增用户数据
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
$result
=
$this
->
db_
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"u_user_agent c"
,
"a.id=c.user_id"
,
"left"
)
->
join
(
"a_agents b"
,
"c.agent_id=b.id"
,
"left"
)
->
where
(
$where_
)
->
limit
(
$page_size
)
->
page
(
$page_no
)
->
select
();
return
$result
;
}
public
function
moveHouseInsertAll
(
$data
)
{
$result
=
Db
::
table
(
$this
->
table
)
...
...
application/model/Users.php
View file @
d331d1a9
...
...
@@ -598,7 +598,7 @@ class Users extends Model
}
/**
* 获取新增用户数据
(废弃)
* 获取新增用户数据
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
...
...
@@ -606,20 +606,19 @@ class Users extends Model
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.agent_id"
]
=
$params
[
"agent_id"
];
$where_
[
"a.agent_id"
]
=
$
where_
[
"c.agent_id"
]
=
$
params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
$result
=
$this
->
db_
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"a_agents b"
,
"a.agent_id=b.id"
,
"left"
)
->
join
(
"u_user_agent c"
,
"a.id=c.user_id"
,
"left"
)
->
join
(
"a_agents b"
,
"c.agent_id=b.id"
,
"left"
)
->
where
(
$where_
)
->
limit
(
$page_size
)
->
page
(
$page_no
)
->
select
();
// echo Db::table($this->table)->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