|
|
|
@ -30,7 +30,7 @@ class UserExtract extends BaseController |
|
|
|
|
* @param App $app |
|
|
|
|
* @param repository $repository |
|
|
|
|
*/ |
|
|
|
|
public function __construct(App $app,repository $repository) |
|
|
|
|
public function __construct(App $app, repository $repository) |
|
|
|
|
{ |
|
|
|
|
parent::__construct($app); |
|
|
|
|
$this->repository = $repository; |
|
|
|
@ -38,32 +38,33 @@ class UserExtract extends BaseController |
|
|
|
|
|
|
|
|
|
public function lst() |
|
|
|
|
{ |
|
|
|
|
[$page,$limit] = $this->getPage(); |
|
|
|
|
[$page, $limit] = $this->getPage(); |
|
|
|
|
$where = $this->request->params(['status']); |
|
|
|
|
$where['uid'] = $this->request->uid(); |
|
|
|
|
return app('json')->success($this->repository->getList($where,$page,$limit)); |
|
|
|
|
return app('json')->success($this->repository->getList($where, $page, $limit)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function create(validate $validate) |
|
|
|
|
{ |
|
|
|
|
$data = $this->checkParams($validate); |
|
|
|
|
$user = $this->request->userInfo(); |
|
|
|
|
if($data['extract_type'] == 3 && !systemConfig('sys_extension_type') ) return app('json')->fail('未开启付款到零钱'); |
|
|
|
|
$this->repository->create($user,$data); |
|
|
|
|
if ($data['extract_type'] == 3 && !systemConfig('sys_extension_type')) return app('json')->fail('未开启付款到零钱'); |
|
|
|
|
$this->repository->create($user, $data); |
|
|
|
|
return app('json')->success('申请已提交'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function checkParams(validate $validate) |
|
|
|
|
{ |
|
|
|
|
$data = $this->request->params(['extract_type','bank_code','bank_address','alipay_code','wechat','extract_pic','extract_price','real_name','bank_name']); |
|
|
|
|
$data = $this->request->params(['extract_type', 'bank_code', 'bank_address', 'alipay_code', 'wechat', |
|
|
|
|
'extract_pic', 'extract_price', 'real_name', 'bank_name', 'real_price', 'pre_price']); |
|
|
|
|
$validate->check($data); |
|
|
|
|
return $data; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function bankLst() |
|
|
|
|
{ |
|
|
|
|
[$page,$limit] = $this->getPage(); |
|
|
|
|
$data = app()->make(GroupDataRepository::class)->groupData('bank_list',0,$page,100); |
|
|
|
|
[$page, $limit] = $this->getPage(); |
|
|
|
|
$data = app()->make(GroupDataRepository::class)->groupData('bank_list', 0, $page, 100); |
|
|
|
|
return app('json')->success($data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|