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
65c0e2af
Commit
65c0e2af
authored
Sep 20, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c33309b8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
UserCallStintService.php
application/index/service/UserCallStintService.php
+6
-6
UserLogService.php
application/index/service/UserLogService.php
+7
-5
No files found.
application/index/service/UserCallStintService.php
View file @
65c0e2af
...
@@ -34,12 +34,12 @@ class UserCallStintService
...
@@ -34,12 +34,12 @@ class UserCallStintService
* @return int
* @return int
*/
*/
public
function
isUserReport
(
$user_id
){
public
function
isUserReport
(
$user_id
){
$is_report
=
0
;
$is_report
=
[]
;
$band_user_list
=
$this
->
getUserBindList
(
$user_id
);
$band_user_list
=
$this
->
getUserBindList
(
$user_id
);
foreach
(
$band_user_list
as
$v
)
{
foreach
(
$band_user_list
as
$v
)
{
$res
=
$this
->
findReport
(
$v
);
$res
=
$this
->
findReport
(
$v
);
if
(
$res
){
if
(
$res
){
$is_report
=
1
;
$is_report
=
$res
;
break
;
break
;
}
}
}
}
...
@@ -117,7 +117,7 @@ class UserCallStintService
...
@@ -117,7 +117,7 @@ class UserCallStintService
/**
/**
* 客户今天是否有约带看
* 客户今天是否有约带看
* @param $user_id
* @param $user_id
* @return
bool
* @return
array|false|\PDOStatement|string|\think\Collection
*/
*/
public
function
findReport
(
$user_id
){
public
function
findReport
(
$user_id
){
$begin_date
=
date
(
"Y-m-d 00:00:00"
);
$begin_date
=
date
(
"Y-m-d 00:00:00"
);
...
@@ -126,12 +126,12 @@ class UserCallStintService
...
@@ -126,12 +126,12 @@ class UserCallStintService
// $conditions['report_agent_id'] = $agent_id;
// $conditions['report_agent_id'] = $agent_id;
$conditions
[
'user_id'
]
=
$user_id
;
$conditions
[
'user_id'
]
=
$user_id
;
$conditions
[
'predict_see_time'
]
=
array
(
'between'
,
array
(
$begin_date
,
$end_date
));
$conditions
[
'predict_see_time'
]
=
array
(
'between'
,
array
(
$begin_date
,
$end_date
));
$report
=
$this
->
m_report
->
selectReportByIdTime
(
'id'
,
$conditions
);
$report
=
$this
->
m_report
->
selectReportByIdTime
(
'id
,predict_see_time
'
,
$conditions
);
if
(
count
(
$report
)
>
0
)
{
if
(
count
(
$report
)
>
0
)
{
return
true
;
//有约带看
return
$report
;
//有约带看
}
else
{
}
else
{
return
false
;
//无约带看
return
[]
;
//无约带看
}
}
}
}
...
...
application/index/service/UserLogService.php
View file @
65c0e2af
...
@@ -133,7 +133,7 @@ class UserLogService
...
@@ -133,7 +133,7 @@ class UserLogService
#有约带看的客户显示 '约带看'标签 0:不显示 1:显示
#有约带看的客户显示 '约带看'标签 0:不显示 1:显示
$s_user_call
=
new
UserCallStintService
();
$s_user_call
=
new
UserCallStintService
();
$is_user_report
=
$s_user_call
->
isUserReport
(
$user_id
);
$is_user_report
=
$s_user_call
->
isUserReport
(
$user_id
);
$data
[
'is_user_report'
]
=
$is_user_report
;
$data
[
'is_user_report'
]
=
$is_user_report
?
1
:
0
;
return
[
"code"
=>
200
,
"data"
=>
$data
];
return
[
"code"
=>
200
,
"data"
=>
$data
];
}
}
...
@@ -280,7 +280,8 @@ class UserLogService
...
@@ -280,7 +280,8 @@ class UserLogService
#有约带看的客户显示 '约带看'标签 0:不显示 1:显示
#有约带看的客户显示 '约带看'标签 0:不显示 1:显示
$s_user_call
=
new
UserCallStintService
();
$s_user_call
=
new
UserCallStintService
();
$is_user_report
=
$s_user_call
->
isUserReport
(
$user_id
);
$is_user_report
=
$s_user_call
->
isUserReport
(
$user_id
);
$result
[
'is_user_report'
]
=
$is_user_report
;
$result
[
'is_user_report'
]
=
$is_user_report
?
1
:
0
;
#拨打电话按钮是否显示 0:显示 1:不显示
#拨打电话按钮是否显示 0:显示 1:不显示
$result
[
'is_phone_button_show'
]
=
$this
->
isPhoneButtonShow
(
$user_id
,
$agent_id
,
$result
[
'vip'
],
$result
[
'user_phone'
],
$result
[
'agent_id'
]);
$result
[
'is_phone_button_show'
]
=
$this
->
isPhoneButtonShow
(
$user_id
,
$agent_id
,
$result
[
'vip'
],
$result
[
'user_phone'
],
$result
[
'agent_id'
]);
...
@@ -360,9 +361,10 @@ class UserLogService
...
@@ -360,9 +361,10 @@ class UserLogService
{
{
#当天有约带看的客户 0:不显示 1:显示
#当天有约带看的客户 0:不显示 1:显示
$s_user_call
=
new
UserCallStintService
();
$s_user_call
=
new
UserCallStintService
();
$is_user_report
=
$s_user_call
->
isUserReport
(
$user_id
);
$is_user_report
=
$s_user_call
->
isUserReport
(
$user_id
);
date
(
"Y-m-d H:i:s"
,
strtotime
(
"-1 hour"
));
//3.3.9 如果有约带看 同时过保护期了
//3.3.9 如果有约带看 同时在约带看时间后2小时之前的
if
(
$is_user_report
==
1
)
{
$predict_see_time
=
strtotime
(
"+2 hour"
,
strtotime
(
$is_user_report
[
0
][
'predict_see_time'
]));
if
(
$is_user_report
&&
(
time
()
<
$predict_see_time
))
{
big_log
(
'有约带看'
);
big_log
(
'有约带看'
);
$res
=
$this
->
isPhoneButtonShowA
(
$user_id
,
$agent_id
,
$is_vip
,
$result_user_phone
,
$result_agent_id
);
$res
=
$this
->
isPhoneButtonShowA
(
$user_id
,
$agent_id
,
$is_vip
,
$result_user_phone
,
$result_agent_id
);
}
else
{
}
else
{
...
...
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