Commit c77eb63b authored by zhuwei's avatar zhuwei

保存并设置用户有效期,保护期

parent 3c8e7989
...@@ -101,6 +101,13 @@ class HomePageLog extends Basic ...@@ -101,6 +101,13 @@ class HomePageLog extends Basic
$result[$key]['img'] = $res_a[0]['img']; $result[$key]['img'] = $res_a[0]['img'];
$result[$key]['store_name'] = $res_a[0]['store_name']; $result[$key]['store_name'] = $res_a[0]['store_name'];
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$is_outstrip_twenty_four_hours = 0;
if((time() - strtotime($value['create_time'])) > (60*60*24)){
$is_outstrip_twenty_four_hours = 1;
}
$result[$key]['is_outstrip_twenty_four_hours'] = $is_outstrip_twenty_four_hours;
} }
$count = $this->uPhoneFollowUpModel->getSearchCount($where_); $count = $this->uPhoneFollowUpModel->getSearchCount($where_);
......
<?php
namespace app\api_broker\service;
use app\extra\RedisExt;
/**
* Created by PhpStorm.
* User: zhu wei
* Date: 2018-08-20
* Time: 14:42:53
*/
class UserExpiredTimeService
{
/**
* 保存并设置用户有效期,保护期
* @param $user_id
* @return bool
*/
public function saveExpiredTimeByUser($user_id)
{
if($user_id){
try {
$redis_ = RedisExt::getRedis();
if ($redis_) {
$res = $redis_->set("expired_time_user_" . $user_id,1,86400);
}else{
return false;
}
} catch (Exception $exception) {
return false;
}
}else{
return false;
}
}
}
\ No newline at end of file
...@@ -133,7 +133,7 @@ class Remark extends Basic ...@@ -133,7 +133,7 @@ class Remark extends Basic
if((time() - strtotime($v['create_time'])) > (60*60*24)){ if((time() - strtotime($v['create_time'])) > (60*60*24)){
$is_outstrip_twenty_four_hours = 1; $is_outstrip_twenty_four_hours = 1;
} }
$data['data']['list'][$k]['is_outstrip_twenty_four_hours']=$is_outstrip_twenty_four_hours; $data['data']['list'][$k]['is_outstrip_twenty_four_hours'] = $is_outstrip_twenty_four_hours;
$data['data']['list'][$k]['user_phone'] = substr_replace($data['data']['list'][$k]['user_phone'],'****',3,4); $data['data']['list'][$k]['user_phone'] = substr_replace($data['data']['list'][$k]['user_phone'],'****',3,4);
} }
......
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