From ef9eb318e630340c26356eb0054350c35150ddc5 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Sat, 23 Sep 2023 14:00:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E5=95=86?= =?UTF-8?q?=E6=88=B7=E4=BF=9D=E8=AF=81=E9=87=91=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/merchant/Merchant.php | 15 +++++++++++++++ route/api.php | 1 + 2 files changed, 16 insertions(+) diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index 18c98a9d..1bede8ae 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -253,6 +253,21 @@ class Merchant extends BaseController return app('json')->success($data); } + /** + * @return mixed + * @author xaboy + * @day 2020/7/21 + */ + public function marginInfo(MerchantTakeRepository $repository) + { + $id = $this->request->param('id'); + if(empty($id)){ + return app('json')->fail('参数错误'); + } + $data = Db::name('merchant')->where('mer_id',$id)->field('uid,mer_id,mer_name,margin,is_margin')->find(); + return app('json')->success($data); + } + public function apply($merId){ $merchant = app()->make(MerchantRepository::class)->search(['mer_id' => $merId])->field('uid,mer_id,mer_name,mer_money,financial_bank,financial_wechat,financial_alipay,financial_type')->find(); if (($msg = $this->checkAuth($merchant)) !== true) { diff --git a/route/api.php b/route/api.php index 5751c987..28e019cf 100644 --- a/route/api.php +++ b/route/api.php @@ -546,6 +546,7 @@ Route::group('api/', function () { Route::post('update', 'Merchant/update'); // 商户信息 Route::get('info', 'Merchant/info'); + Route::get('margin', 'Merchant/marginInfo'); })->prefix('api.store.merchant.'); Route::post('store/certificate/:merId', 'api.Auth/getMerCertificate');