Commit ec7159e7 authored by zhuwei's avatar zhuwei

1

parent 0ad0a410
......@@ -122,11 +122,10 @@ class UserCallStintService
public function findReport($user_id){
$begin_date = date("Y-m-d 00:00:00");
$end_date = date("Y-m-d 23:23:23");
// $conditions['report_agent_id'] = $agent_id;
$conditions['user_id'] = $user_id;
$conditions['predict_see_time'] = array( 'between', array( $begin_date, $end_date));
$report = $this->m_report->selectReportByIdTime('id,predict_see_time',$conditions);
$report = $this->m_report->selectReportByIdTimeV2('id,predict_see_time',$conditions);
if (count($report) > 0) {
return $report;//有约带看
......
......@@ -394,6 +394,7 @@ class UserLogService
#客户是否在保护期内(0:保护器内 1:超过保护期)
$user_service = new UserService();
$is_outstrip_twenty_four_hours = $user_service->isUserProtect($user_id);
if (($is_outstrip_twenty_four_hours == 1) && ($is_user_report && (time() < $behind_see_time &&(time() > $front_see_time)))) {
$res = $this->isPhoneButtonShowA($user_id, $agent_id);
}else{
......
......@@ -1138,6 +1138,17 @@ class OReportModel extends Model
->select();
}
public function selectReportByIdTimeV2($filed = "id", $params,$order_ = 'id desc')
{
$params["status"] = 0;
return $this->db
->field($filed)
->where($params)
->order($order_)
->select();
}
/**
* 带看经纪人
*
......
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