diff --git a/api/controllers/plan/Licheb.php b/api/controllers/plan/Licheb.php
index 1b235132..bd4e59a5 100644
--- a/api/controllers/plan/Licheb.php
+++ b/api/controllers/plan/Licheb.php
@@ -28,12 +28,12 @@ class Licheb extends HD_Controller
{
$params = $this->input->get();
$hour = date('H.i');
- if (($hour > 00.00 && $hour < 03.00) || $params['sd']) {
+ if (($hour > 00.00 && $hour < 02.00) || $params['sd']) {
if ($params['sd']) {
echo "开始执行客户回访[{$hour}]
";
}
} else {
- echo '[00.00-03.00]执客户回访[' . $hour . ']
';
+ echo '[00.00-02.00]执客户回访[' . $hour . ']
';
return;
}
$this->load->model('receiver/receiver_customers_visit_data_model', 'mdCustomerVisitData');
@@ -72,21 +72,18 @@ class Licheb extends HD_Controller
if (!$re_cust) {
continue;
}
- $ret = $this->mdCustomerVisitData->update(['status' => 3], ['id' => $value['id']]);
- if ($ret) {
- $where_vis = ['c_id' => $value['c_id'], 'sales_id' => $value['sales_id'], 't_day' => $today];
- $re_vis = $this->mdCustomerVisitData->get($where_vis);
- if (!$re_vis) {//新增明天延期数据
- $where_vis['pid'] = $value['pid'] ? $value['pid'] : $value['id'];//逾期id
- $where_vis['biz_id'] = $value['biz_id'];
- $where_vis['status'] = 3;
- $where_vis['level'] = $value['level'];
- $where_vis['c_time'] = time();
- $add_id = $this->mdCustomerVisitData->add($where_vis);
- if ($add_id) {//更新回访时间
- $this->mdCustomers->update(['visit_time' => $today], ['id' => $value['c_id']]);
- $params['sd'] && $log[] = $where_vis;
- }
+ $where_vis = ['c_id' => $value['c_id'], 'sales_id' => $value['sales_id'], 't_day' => $today];
+ $re_vis = $this->mdCustomerVisitData->get($where_vis);
+ if (!$re_vis) {//新增明天延期数据
+ $where_vis['pid'] = $value['pid'] ? $value['pid'] : $value['id'];//逾期id
+ $where_vis['biz_id'] = $value['biz_id'];
+ $where_vis['status'] = 3;
+ $where_vis['level'] = $value['level'];
+ $where_vis['c_time'] = time();
+ $add_id = $this->mdCustomerVisitData->add($where_vis);
+ if ($add_id) {//更新回访时间
+ $this->mdCustomers->update(['visit_time' => $today], ['id' => $value['c_id']]);
+ $params['sd'] && $log[] = $where_vis;
}
}
}
@@ -116,12 +113,12 @@ class Licheb extends HD_Controller
{
$params = $this->input->get();
$hour = date('H.i');
- if (($hour > 00.00 && $hour < 03.00) || $params['sd']) {
+ if (($hour > 02.00 && $hour < 04.00) || $params['sd']) {
if ($params['sd']) {
echo "开始执行库顾问日志[{$hour}]
";
}
} else {
- echo '[00.00-03.00]执行顾问日志[' . $hour . ']
';
+ echo '[02.00-04.00]执行顾问日志[' . $hour . ']
';
return;
}
$this->load->model('app/licheb/app_licheb_users_model', 'mdUsers');