From 75e2b30d00f6e69fd5b282a5c8a7e70ed0b19612 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Fri, 22 Sep 2023 11:59:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controller/api/Common.php b/app/controller/api/Common.php index 9d81edd8..da5a497c 100644 --- a/app/controller/api/Common.php +++ b/app/controller/api/Common.php @@ -493,7 +493,7 @@ class Common extends BaseController } //获取云店铺 - public function get_cloud_shop(int $street_code){ + public function get_cloud_shop($street_code){ $find=DB::name('merchant') ->alias('m') ->where('m.type_id',11) From 20cd612944a6171a2fbb5740f0e1c58aaa5a2b96 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Fri, 22 Sep 2023 17:35:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E6=88=B7?= =?UTF-8?q?=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/store/merchant/Merchant.php | 3 ++ .../api/store/merchant/MerchantIntention.php | 41 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index f499306a..18c98a9d 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -170,6 +170,9 @@ class Merchant extends BaseController 'interest_rate', ]); + if(empty($data['service_phone'])) { + return app('json')->fail('客户电话不能为空'); + } // 如果手机号不存在,则使用入驻时的手机号 $data['service_phone'] = empty($data['service_phone'])?$merchant['mer_phone']:$data['service_phone']; diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 0b814ec1..b3758bb3 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -115,6 +115,33 @@ class MerchantIntention extends BaseController public function businessApply() { + $data = $this->request->params([ + 'phone', + 'mer_name', + 'company_name', + 'address', + 'name', + 'code', + 'images', + 'merchant_category_id', + 'mer_type_id', + 'social_credit_code', + 'area_id', + 'street_id', + 'village_id', + 'is_nmsc', + 'bank_username', + 'bank_opening', + 'bank_front', + 'bank_back', + 'cardno_front', + 'cardno_back', + ]); + + if (empty($data['bank_username']) || empty($data['bank_opening']) || empty($data['bank_front']) || empty($data['bank_back']) || empty($data['cardno_front']) || empty($data['cardno_back'])) { + return app('json')->fail('请完善银行卡及身份信息'); + } + if (!systemConfig('mer_intention_open')) { return app('json')->fail('未开启商户入驻'); } @@ -130,6 +157,14 @@ class MerchantIntention extends BaseController if (empty($intenInfo)) { return app('json')->fail('商户状态异常'); } + + $intenInfo['bank_username'] = $data['bank_username']; + $intenInfo['bank_opening'] = $data['bank_opening']; + $intenInfo['bank_front'] = $data['bank_front']; + $intenInfo['bank_back'] = $data['bank_back']; + $intenInfo['cardno_front'] = $data['cardno_front']; + $intenInfo['cardno_back'] = $data['cardno_back']; + $intenInfo['type'] = 2; $intenInfo['status'] = 0; $intenInfo['create_time'] = date('Y-m-d H:i:s'); @@ -150,6 +185,12 @@ class MerchantIntention extends BaseController 'area' => $intenInfo['area_id'] ?? '', 'street' => $intenInfo['street_id'] ?? '', 'address' => $intenInfo['address'] ?? '', + 'bank_username' => $data['bank_username'] ?? '', + 'bank_opening' => $data['bank_opening'] ?? '', + 'bank_front' => $data['bank_front'] ?? '', + 'bank_back' => $data['bank_back'] ?? '', + 'cardno_front' => $data['cardno_front'] ?? '', + 'cardno_back' => $data['cardno_back'] ?? '', 'mer_intention_id' => $intentionId ]; $postUrl = env('TASK_WORKER_HOST_URL') . '/adminapi/company/createShopMerchant';