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
9d323c74
Commit
9d323c74
authored
Jul 08, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getAddUserList
parent
330f075c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
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
+26
-0
Users.php
application/model/Users.php
+1
-1
No files found.
application/api_broker/service/OfficePerformanceService.php
View file @
9d323c74
...
@@ -601,7 +601,7 @@ class OfficePerformanceService
...
@@ -601,7 +601,7 @@ class OfficePerformanceService
if
(
!
$params
)
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.user_name,a.user_phone,a.user_nick,a.create_time,a.agent_id"
;
$field
=
"a.id,a.user_name,a.user_phone,a.user_nick,a.create_time,a.agent_id"
;
$addUserList
=
$this
->
userModel
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
$addUserList
=
$this
->
user
Agent
Model
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
foreach
(
$addUserList
as
$key
=>
$val
)
{
foreach
(
$addUserList
as
$key
=>
$val
)
{
if
(
$val
[
"agent_id"
]
==
$agent_id
)
{
if
(
$val
[
"agent_id"
]
==
$agent_id
)
{
$addUserList
[
$key
][
"is_my"
]
=
1
;
$addUserList
[
$key
][
"is_my"
]
=
1
;
...
@@ -798,7 +798,7 @@ class OfficePerformanceService
...
@@ -798,7 +798,7 @@ class OfficePerformanceService
if
(
!
$params
)
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
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"
;
$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
->
userModel
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
$addUserList
=
$this
->
user
Agent
Model
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
foreach
(
$addUserList
as
$key
=>
$val
)
{
foreach
(
$addUserList
as
$key
=>
$val
)
{
if
(
$val
[
"agent_id"
]
==
$id
)
{
if
(
$val
[
"agent_id"
]
==
$id
)
{
$addUserList
[
$key
][
"is_my"
]
=
1
;
$addUserList
[
$key
][
"is_my"
]
=
1
;
...
...
application/api_broker/service/PerformanceService.php
View file @
9d323c74
...
@@ -534,7 +534,7 @@ class PerformanceService
...
@@ -534,7 +534,7 @@ class PerformanceService
if
(
!
$params
)
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.user_name,a.user_phone,a.user_nick,a.create_time,a.agent_id"
;
$field
=
"a.id,a.user_name,a.user_phone,a.user_nick,a.create_time,a.agent_id"
;
$addUserList
=
$this
->
userModel
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
$addUserList
=
$this
->
user
Agent
Model
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
foreach
(
$addUserList
as
$key
=>
$val
)
{
foreach
(
$addUserList
as
$key
=>
$val
)
{
if
(
$val
[
"agent_id"
]
==
$agent_id
)
{
if
(
$val
[
"agent_id"
]
==
$agent_id
)
{
$addUserList
[
$key
][
"is_my"
]
=
1
;
$addUserList
[
$key
][
"is_my"
]
=
1
;
...
@@ -757,7 +757,7 @@ class PerformanceService
...
@@ -757,7 +757,7 @@ class PerformanceService
if
(
!
$params
)
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
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"
;
$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
->
userModel
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
$addUserList
=
$this
->
user
Agent
Model
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
foreach
(
$addUserList
as
$key
=>
$val
)
{
foreach
(
$addUserList
as
$key
=>
$val
)
{
if
(
$val
[
"agent_id"
]
==
$id
)
{
if
(
$val
[
"agent_id"
]
==
$id
)
{
$addUserList
[
$key
][
"is_my"
]
=
1
;
$addUserList
[
$key
][
"is_my"
]
=
1
;
...
...
application/model/UserAgentModel.php
View file @
9d323c74
...
@@ -102,4 +102,30 @@ class UserAgentModel extends Model
...
@@ -102,4 +102,30 @@ class UserAgentModel extends Model
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
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
=
Db
::
table
(
$this
->
table
)
->
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
;
}
}
}
application/model/Users.php
View file @
9d323c74
...
@@ -629,7 +629,7 @@ class Users extends Model
...
@@ -629,7 +629,7 @@ class Users extends Model
}
}
/**
/**
* 获取新增用户数据
* 获取新增用户数据
(废弃)
* @param $params
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
*/
*/
...
...
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