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
ab427e20
Commit
ab427e20
authored
Sep 23, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
有约带看的客户显示
parent
0a08638c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
7 deletions
+65
-7
UserCallStintService.php
application/index/service/UserCallStintService.php
+8
-0
UserLogService.php
application/index/service/UserLogService.php
+57
-7
No files found.
application/index/service/UserCallStintService.php
View file @
ab427e20
...
...
@@ -34,15 +34,23 @@ class UserCallStintService
* @return int
*/
public
function
isUserReport
(
$user_id
){
big_log
(
"+++++++++++++++客户ID:
{
$user_id
}
+++++++++++++++++++"
);
$is_report
=
[];
$band_user_list
=
$this
->
getUserBindList
(
$user_id
);
big_log
(
'关联客户'
);
big_log
(
$band_user_list
);
foreach
(
$band_user_list
as
$v
)
{
$res
=
$this
->
findReport
(
$v
);
big_log
(
"客户ID:
{
$v
}
当天是否有约带看"
);
big_log
(
$res
);
if
(
$res
){
$is_report
=
$res
;
break
;
}
}
big_log
(
'关联客户'
);
big_log
(
'++++++++++++++++++++++++++++++++++'
);
return
$is_report
;
}
...
...
application/index/service/UserLogService.php
View file @
ab427e20
...
...
@@ -131,9 +131,7 @@ class UserLogService
$this
->
sendRequestByCurl
(
$agent_id
,
$user_id
,
1
);
#有约带看的客户显示 '约带看'标签 0:不显示 1:显示
$s_user_call
=
new
UserCallStintService
();
$is_user_report
=
$s_user_call
->
isUserReport
(
$user_id
);
$data
[
'is_user_report'
]
=
$is_user_report
?
1
:
0
;
$data
[
'is_user_report'
]
=
$this
->
isUserReport
(
$user_id
);
return
[
"code"
=>
200
,
"data"
=>
$data
];
}
...
...
@@ -278,9 +276,7 @@ class UserLogService
$result
[
"is_outstrip_twenty_four_hours"
]
=
$user_service
->
isUserProtect
(
$user_id
);
#有约带看的客户显示 '约带看'标签 0:不显示 1:显示
$s_user_call
=
new
UserCallStintService
();
$is_user_report
=
$s_user_call
->
isUserReport
(
$user_id
);
$result
[
'is_user_report'
]
=
$is_user_report
?
1
:
0
;
$result
[
'is_user_report'
]
=
$this
->
isUserReport
(
$user_id
);
#拨打电话按钮是否显示 0:显示 1:不显示
...
...
@@ -297,6 +293,36 @@ class UserLogService
return
$result
;
}
/**
* 有约带看的客户显示
* @param $user_id
* @return int
*/
public
function
isUserReport
(
$user_id
)
{
$s_user_call
=
new
UserCallStintService
();
$is_user_report
=
$s_user_call
->
isUserReport
(
$user_id
);
//3.3.9 如果有约带看 预计到场时间的前1小时和后1小时,除了提交约带看的经纪人和客方,其他人都无法联系客户(包括关联客户)!
$front_see_time
=
strtotime
(
"-1 hour"
,
strtotime
(
$is_user_report
[
0
][
'predict_see_time'
]));
$behind_see_time
=
strtotime
(
"+1 hour"
,
strtotime
(
$is_user_report
[
0
][
'predict_see_time'
]));
#客户是否在保护期内(0:保护器内 1:超过保护期)
// $user_service = new UserService();
// $is_outstrip_twenty_four_hours = $user_service->isUserProtect($user_id);
if
((
$is_user_report
&&
(
time
()
<
$behind_see_time
&&
(
time
()
>
$front_see_time
))))
{
$res
=
1
;
}
else
{
//无约带看
$res
=
0
;
}
return
$res
;
}
/**
* app客户详情 2
* @param $user_id
...
...
@@ -365,11 +391,17 @@ class UserLogService
//3.3.9 如果有约带看 预计到场时间的前1小时和后1小时,除了提交约带看的经纪人和客方,其他人都无法联系客户(包括关联客户)!
$front_see_time
=
strtotime
(
"-1 hour"
,
strtotime
(
$is_user_report
[
0
][
'predict_see_time'
]));
$behind_see_time
=
strtotime
(
"+1 hour"
,
strtotime
(
$is_user_report
[
0
][
'predict_see_time'
]));
big_log
(
$is_user_report
[
0
][
'predict_see_time'
]);
#客户是否在保护期内(0:保护器内 1:超过保护期)
$user_service
=
new
UserService
();
$is_outstrip_twenty_four_hours
=
$user_service
->
isUserProtect
(
$user_id
);
big_log
(
'客户是否在保护期内'
.
$is_outstrip_twenty_four_hours
);
big_log
(
$is_user_report
);
big_log
(
date
(
"Y-m-d H:i:s"
,
$front_see_time
));
big_log
(
time
());
big_log
(
date
(
"Y-m-d H:i:s"
));
big_log
(
date
(
"Y-m-d H:i:s"
,
$behind_see_time
));
if
((
$is_outstrip_twenty_four_hours
==
1
)
&&
(
$is_user_report
&&
(
time
()
<
$behind_see_time
&&
(
time
()
>
$front_see_time
))))
{
big_log
(
"客户ID:
{
$user_id
}
有约带看"
);
$res
=
$this
->
isPhoneButtonShowA
(
$user_id
,
$agent_id
,
$is_vip
,
$result_user_phone
,
$result_agent_id
);
...
...
@@ -381,6 +413,15 @@ class UserLogService
return
$res
;
}
/**
* 拨打电话按钮 是否显示 2
* @param $user_id
* @param $agent_id
* @param $is_vip
* @param $result_user_phone
* @param $result_agent_id
* @return int
*/
public
function
isPhoneButtonShowA
(
$user_id
,
$agent_id
,
$is_vip
,
$result_user_phone
,
$result_agent_id
)
{
#当天有约带看的客户 0:不显示 1:显示
...
...
@@ -395,6 +436,15 @@ class UserLogService
}
}
/**
* 拨打电话按钮 是否显示
* @param $user_id
* @param $agent_id
* @param $is_vip
* @param $result_user_phone
* @param $result_agent_id
* @return int
*/
public
function
isPhoneButtonShowB
(
$user_id
,
$agent_id
,
$is_vip
,
$result_user_phone
,
$result_agent_id
)
{
$user_service
=
new
UserService
();
...
...
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