diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index 1ad377b9..2bb197a6 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -448,8 +448,8 @@ class Customers extends Wxapp $where_vis = ['c_id' => $id, 'biz_id' => $biz_id, 'sales_id' => $sales_id, 't_day' => $visit_time]; $re_vis = $this->mdCustomerVisitData->get($where_vis); if (!$re_vis) { - //删除大于今天的回访记录 - $this->mdCustomerVisitData->delete(['c_id' => $id, 'biz_id' => $biz_id, 'sales_id' => $sales_id, 't_day>' => $visit_time]); + //删除大于等今天的回访记录 + $this->mdCustomerVisitData->delete(['c_id' => $id, 'biz_id' => $biz_id, 't_day>=' => date('Y-m-d')]); $where_vis['level'] = $level; $where_vis['c_time'] = time(); $this->mdCustomerVisitData->add($where_vis);