From 4a1d14a2aed00f5cfbe38c1006c02a9deb100385 Mon Sep 17 00:00:00 2001 From: dengbw Date: Tue, 21 Mar 2023 10:05:38 +0800 Subject: [PATCH] api_customers_321 --- api/controllers/wxapp/licheb/Customers.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index acd85aba..7e8ecfcf 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -1233,6 +1233,10 @@ class Customers extends Wxapp $this->biz_id && $where['biz_id'] = $this->biz_id; $res_cus = $this->customers_model->get($where); if ($res_cus) { + if ($res_cus['wxqy'] == 0) {//更新为企微好友 + $res_cus['wxqy'] = 1; + $this->customers_model->update(['wxqy' => $res_cus['wxqy']], ['id' => $res_cus['id']]); + } $rows = [$res_cus]; $re = $this->listCustomerField(['rows' => $rows, 'biz_type' => $biz_type, 'group_id' => $group_id]); count($re) && $re_item = $re[0];