From d3438ddf096e4bfa8ede8e69fbc65e84dcb50733 Mon Sep 17 00:00:00 2001 From: monanxiao Date: Wed, 22 Mar 2023 09:51:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=9B=E9=80=9B?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=8F=91=E5=B8=83=E4=B8=AD=E9=97=B4=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/listener/CommunityAddress.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/listener/CommunityAddress.php b/app/listener/CommunityAddress.php index b794b394..be765cb7 100644 --- a/app/listener/CommunityAddress.php +++ b/app/listener/CommunityAddress.php @@ -15,8 +15,9 @@ class CommunityAddress */ public function handle($event) { - $finds = Db::name('nk_user')->where('user_id', $event['uid'])->find(); - $find = Db::connect('nongke')->table('fa_szxc_information_useraddress')->where('user_id', $finds['n_user_id'])->find(); + // $finds = Db::name('nk_user')->where('user_id', $event['uid'])->find(); + $find = Db::connect('nongke')->table('fa_szxc_information_useraddress')->where('user_id', $event['uid'])->find(); + if ($find ) { $data = [ 'user_id' => $event['uid'], From c6b415d1dba529894fe3f3814259f56616c8eb23 Mon Sep 17 00:00:00 2001 From: monanxiao Date: Thu, 23 Mar 2023 09:58:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E6=88=B7?= =?UTF-8?q?=E5=85=A5=E9=A9=BB=E6=97=B6=E5=AE=A2=E6=9C=8D=E7=94=B5=E8=AF=9D?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/merchant/Merchant.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index 99aa81fc..465e1f4e 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -159,6 +159,10 @@ class Merchant extends BaseController 'lat', ['delivery_way',[2]], ]); + + // 如果手机号不存在,则使用入驻时的手机号 + $data['service_phone'] = empty($data['service_phone'])?$merchant['mer_phone']:$data['service_phone']; + $validate->check($data); $sys_bases_status = systemConfig('sys_bases_status') === '0' ? 0 : 1; if ($sys_bases_status && empty($data['mer_certificate']))