新增获取商户信息接口
This commit is contained in:
parent
181386afd7
commit
f86f1f95bb
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -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');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user