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');