From f86f1f95bb9463d845133a89f0cefcac9ae00f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E6=A1=83?= <1098598843@qq.com> Date: Mon, 13 Mar 2023 16:34:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96=E5=95=86?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/store/merchant/Merchant.php | 26 +++++++++++++++++++ route/api.php | 2 ++ 2 files changed, 28 insertions(+) diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index 9d58b3ff..bec2101e 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -25,6 +25,7 @@ use app\common\repositories\system\merchant\MerchantRepository as repository; use think\facade\Queue; use think\facade\Db; + class Merchant extends BaseController { protected $repository; @@ -200,5 +201,30 @@ class Merchant extends BaseController return app('json')->success('修改成功'); } + /** + * @return mixed + * @author xaboy + * @day 2020/7/21 + */ + public function info(MerchantTakeRepository $repository) + { + $id = $this->request->param('id'); + if(empty($id)){ + return app('json')->fail('参数错误'); + } + + $data = Db::name('merchant')->where('mer_id',$id)->find(); + // $append = ['merchantCategory', 'merchantType', 'mer_certificate']; + // if ($merchant['is_margin'] == -10) + // $append[] = 'refundMarginOrder'; + + // $data = $merchant->append($append)->hidden(['mark', 'reg_admin_id', 'sort'])->toArray(); + $delivery = $repository->get($id) + systemConfig(['tx_map_key']); + $data = array_merge($data,$delivery); + $data['sys_bases_status'] = systemConfig('sys_bases_status') === '0' ? 0 : 1; + + return app('json')->success($data); + } + } diff --git a/route/api.php b/route/api.php index 7f621df9..59e037fe 100644 --- a/route/api.php +++ b/route/api.php @@ -496,6 +496,8 @@ Route::group('api/', function () { Route::get('/local', 'Merchant/localLst'); //编辑商户信息 Route::post('update', 'Merchant/update'); +// 商户信息 + Route::get('info', 'Merchant/info'); })->prefix('api.store.merchant.'); Route::post('store/certificate/:merId', 'api.Auth/getMerCertificate');