增加客户解锁增加解锁时间和后台解锁时间赛选
This commit is contained in:
@@ -10,7 +10,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
|
||||
class Customer extends HD_Controller
|
||||
{
|
||||
private $searchTpAry = array('mobile' => '客户手机号', 'cid' => '客户编号');
|
||||
private $searchTimeAry = array('p_time' => '派单/建档时间', 'cont_time' => '最后联系时间', 'dt_time' => '首次到店时间', 'order_time' => '下定时间', 'def_time' => '战败时间', 'c_time' => '创建时间',);
|
||||
private $searchTimeAry = array('unlock_time' => '解锁时间', 'p_time' => '派单/建档时间', 'cont_time' => '最后联系时间', 'dt_time' => '首次到店时间', 'order_time' => '下定时间', 'def_time' => '战败时间', 'c_time' => '创建时间');
|
||||
|
||||
protected $log_dir;
|
||||
|
||||
@@ -560,6 +560,11 @@ class Customer extends HD_Controller
|
||||
$order_time[0] && $where["def_time >="] = $order_time[0] . ' 00:00:00';
|
||||
$order_time[1] && $where["def_time <="] = $order_time[1] . ' 23:59:59';
|
||||
}
|
||||
if ($params['unlock_time']) {
|
||||
$p_time = explode(' ~ ', $params['lock_time']);
|
||||
$p_time[0] && $where["lock_time >="] = $p_time[0] . ' 00:00:00';
|
||||
$p_time[1] && $where["lock_time <="] = $p_time[1] . ' 23:59:59';
|
||||
}
|
||||
|
||||
if ($params['tags']) {
|
||||
$where = $this->tagWhere($where, $params['tags']);
|
||||
|
||||
@@ -345,7 +345,7 @@ class Receiver_customers_model extends HD_Model
|
||||
throw new Exception($couponResult->getMessage());
|
||||
}
|
||||
$coupon = $couponResult->getData();
|
||||
$res = $this->customers_model->update(['un_lock' => 1], ['id' => $id]);
|
||||
$res = $this->customers_model->update(['un_lock' => 1, 'unlock_time' => date('Y-m-d H:i:s')], ['id' => $id]);
|
||||
if (!$res) {
|
||||
throw new Exception('更新失败');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user