From ccd38a152eacb72a95e42f57a89418f7e2b67fba Mon Sep 17 00:00:00 2001 From: dengbw Date: Thu, 2 Jun 2022 16:13:19 +0800 Subject: [PATCH] customers_602 --- api/controllers/wxapp/licheb/Customers.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index c32eb140..b831fcc9 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -389,7 +389,9 @@ class Customers extends Wxapp $a_num && $up_data['a_num = a_num+1'] = null; $t_num && $up_data['t_num = t_num+1'] = null; $visit_time && $up_data['visit_time'] = $visit_time; - $level != $row['level'] && $up_data['level'] = $level;//更改客户等级 + if ($level && $level != $row['level']) { + $up_data['level'] = $level;//更改客户等级 + } $log_4 = '';//到店 if ($a_num) { $log_4 = $row['status'] == 1 ? '客户再次到店' : '客户到店'; @@ -403,7 +405,7 @@ class Customers extends Wxapp if ($up_data) { $result = $this->customers_model->update($up_data, ['id' => $id]); if ($result) { //添加日志 - if ($level != $row['level']) {//更改客户等级 + if ($level && $level != $row['level']) { $this->customers_entity->add_log($id, $uid, $uname, '更改客户等级', 9); } if ($log_9) {//系统变更