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
b79786c4
Commit
b79786c4
authored
Aug 04, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc后台控制
parent
4f4a74cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
Member.php
application/index/controller/Member.php
+17
-13
No files found.
application/index/controller/Member.php
View file @
b79786c4
<?php
<?php
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\api_broker\service\ClientService
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\GOperatingRecords
;
use
app\model\GOperatingRecords
;
...
@@ -90,16 +91,13 @@ class Member extends Basic{
...
@@ -90,16 +91,13 @@ class Member extends Basic{
//创建开始时间
//创建开始时间
if
(
!
empty
(
$params
[
'start_date'
])
&&
empty
(
$params
[
'end_date'
]))
{
if
(
!
empty
(
$params
[
'start_date'
])
&&
empty
(
$params
[
'end_date'
]))
{
$where
[
'a.create_time'
]
=
[
'> time'
,
$params
[
'start_date'
]
.
'00:00:00'
];
$where
[
'a.create_time'
]
=
[
'> time'
,
$params
[
'start_date'
]
.
'00:00:00'
];
}
}
elseif
(
!
empty
(
$params
[
'end_date'
])
&&
empty
(
$params
[
'start_date'
]))
{
//创建结束时间
if
(
!
empty
(
$params
[
'end_date'
])
&&
empty
(
$params
[
'start_date'
]))
{
$where
[
'a.create_time'
]
=
[
'< time'
,
$params
[
'end_date'
]
.
'23:59:59'
];
$where
[
'a.create_time'
]
=
[
'< time'
,
$params
[
'end_date'
]
.
'23:59:59'
];
}
}
elseif
(
!
empty
(
$params
[
'start_date'
])
&&
!
empty
(
$params
[
'end_date'
]))
{
//创建开始时间
if
(
!
empty
(
$params
[
'start_date'
])
&&
!
empty
(
$params
[
'end_date'
]))
{
$where
[
'a.create_time'
]
=
[
'between time'
,
[
$params
[
'start_date'
]
.
' 00:00:00'
,
$params
[
'end_date'
]
.
' 23:59:59'
]];
$where
[
'a.create_time'
]
=
[
'between time'
,
[
$params
[
'start_date'
]
.
' 00:00:00'
,
$params
[
'end_date'
]
.
' 23:59:59'
]];
}
else
{
$time_
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
"-1 day"
));
$where
[
'a.create_time'
]
=
array
(
'lt'
,
$time_
);
}
}
//跟进结束时间
//跟进结束时间
...
@@ -261,13 +259,19 @@ class Member extends Basic{
...
@@ -261,13 +259,19 @@ class Member extends Basic{
a.user_name,a.status,a.first_login_time,a.last_login_time,a.agent_id,a.vip,a.price_demand,a.industry_type,a.area_demand,a.user_status,a.source'
;
a.user_name,a.status,a.first_login_time,a.last_login_time,a.agent_id,a.vip,a.price_demand,a.industry_type,a.area_demand,a.user_status,a.source'
;
try
{
try
{
$data
[
'list'
]
=
$this
->
user
->
getUserAgent
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
,
$type
);
$data_list
=
$this
->
user
->
getUserAgent
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
,
$type
);
$clientService
=
new
ClientService
();
$list
=
[];
foreach
(
$data_list
as
$k
=>
$v
)
{
$data_list
[
$k
][
'user_phone'
]
=
hide_customer_phone
(
$data_list
[
$k
][
'user_phone'
]);
$data_list
[
$k
][
'current_agent_id'
]
=
$this
->
userId
;
$is_show
=
$clientService
->
dialTotal
(
$v
[
"id"
]);
if
(
$is_show
)
{
array_push
(
$list
,
$data_list
[
$k
]);
}
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
$data
[
'list'
][
$k
][
'user_phone'
]
=
hide_customer_phone
(
$data
[
'list'
][
$k
][
'user_phone'
]);
$data
[
'list'
][
$k
][
'current_agent_id'
]
=
$this
->
userId
;
}
}
$data
[
'list'
]
=
$list
;
$data
[
'total'
]
=
$this
->
user
->
getUserAgentTotal
(
$where
,
$type
);
$data
[
'total'
]
=
$this
->
user
->
getUserAgentTotal
(
$where
,
$type
);
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
return
$this
->
response
(
101
,
'内部错误,获取客户失败!请联系运营。'
);
return
$this
->
response
(
101
,
'内部错误,获取客户失败!请联系运营。'
);
...
...
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