diff --git a/common/libraries/receiver/Customers_entity.php b/common/libraries/receiver/Customers_entity.php index 7ec618cb..0d099778 100644 --- a/common/libraries/receiver/Customers_entity.php +++ b/common/libraries/receiver/Customers_entity.php @@ -72,6 +72,10 @@ class Customers_entity return ''; } } + if ($type == 6 || $type == 7) {//生成订单或战败客户删除回访记录 + $this->ci->load->model('receiver/receiver_customers_visit_data_model', 'mdCustomerVisitData'); + $this->ci->mdCustomerVisitData->delete(['c_id' => $customer_id, 'status<>' => 2, 't_day >=' => date('Y-m-d')]); + } if ($type == 6) {//订单客户 $count_4 = $this->ci->customer_oplogs_model->count(['customer_id' => $customer_id, 'type' => 4]); if (!$count_4) {//无到店日志