Commit 940f953f authored by zhuwei's avatar zhuwei

1

parent 0ac45d7b
...@@ -357,6 +357,33 @@ class UserLogService ...@@ -357,6 +357,33 @@ class UserLogService
* @return int * @return int
*/ */
public function isPhoneButtonShow($user_id, $agent_id, $is_vip, $result_user_phone, $result_agent_id) public function isPhoneButtonShow($user_id, $agent_id, $is_vip, $result_user_phone, $result_agent_id)
{
#当天有约带看的客户 0:不显示 1:显示
$s_user_call = new UserCallStintService();
$is_user_report = $s_user_call->isUserReport($user_id);
//3.3.9 如果有约带看 同时过保护期了
if ($is_user_report == 1 ) {
$this->isPhoneButtonShowA($user_id, $agent_id, $is_vip, $result_user_phone, $result_agent_id);
}else{
//无约带看 走老逻辑
$this->isPhoneButtonShowB($user_id, $agent_id, $is_vip, $result_user_phone, $result_agent_id);
}
}
public function isPhoneButtonShowA($user_id, $agent_id, $is_vip, $result_user_phone, $result_agent_id)
{
#当天有约带看的客户 0:不显示 1:显示
$s_user_call = new UserCallStintService();
$report_agents = $s_user_call->getUserReportAgentIdList($user_id);
//3.3.9 有约带看订单的客户 预计到场当天 只能 约带看提交人 或 客方 拨打电话
if (($result_agent_id == $agent_id) or (in_array($agent_id, $report_agents))) {
return 0;
} else {
return 1;
}
}
public function isPhoneButtonShowB($user_id, $agent_id, $is_vip, $result_user_phone, $result_agent_id)
{ {
$user_service = new UserService(); $user_service = new UserService();
$vip_services = new VipService(); $vip_services = new VipService();
...@@ -403,23 +430,6 @@ class UserLogService ...@@ -403,23 +430,6 @@ class UserLogService
$is_report = $user_service->isReport($agent_id, $user_id); $is_report = $user_service->isReport($agent_id, $user_id);
#当天有约带看的客户 0:不显示 1:显示
$s_user_call = new UserCallStintService();
$is_user_report = $s_user_call->isUserReport($user_id);
//3.3.9 如果有约带看 同时过保护期了
if ($is_user_report == 1 and ($is_outstrip_twenty_four_hours == 1)) {
$s_user_call = new UserCallStintService();
$report_agents = $s_user_call->getUserReportAgentIdList($user_id);
//3.3.9 有约带看订单的客户 预计到场当天 只能 约带看提交人 或 客方 拨打电话
if (($result_agent_id == $agent_id) or (in_array($agent_id, $report_agents))) {
return 0;
} else {
return 1;
}
}
#当天有约带看的客户 0:不显示 1:显示
$result_val = 1;
if ( if (
(($is_outpace_call_num == 0) and ($is_outstrip_twenty_four_hours == 1) and ($is_vip != 1)) //过保护期 (($is_outpace_call_num == 0) and ($is_outstrip_twenty_four_hours == 1) and ($is_vip != 1)) //过保护期
OR OR
...@@ -438,8 +448,9 @@ class UserLogService ...@@ -438,8 +448,9 @@ class UserLogService
($is_report == 0) ($is_report == 0)
) { ) {
return 0;//0:显示 return 0;//0:显示
}else{
return 1;//1:不显示
} }
return $result_val;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment