79 lines
1.8 KiB
PHP
79 lines
1.8 KiB
PHP
<?php
|
|
namespace app\controller\api\user;
|
|
|
|
use app\common\repositories\user\UserWithdrawalAccountRepository;
|
|
use crmeb\basic\BaseController;
|
|
use think\App;
|
|
|
|
class WithdrawalAccount extends BaseController{
|
|
protected $repository;
|
|
|
|
public function __construct(App $app, UserWithdrawalAccountRepository $repository){
|
|
parent::__construct($app);
|
|
|
|
$this->repository = $repository;
|
|
}
|
|
/**
|
|
* Common: 提现账号列表
|
|
* Author: wu-hui
|
|
* Time: 2024/04/07 16:15
|
|
* @return mixed
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
*/
|
|
public function getList(){
|
|
$uid = $this->request->uid();
|
|
$list = $this->repository->getSearchModel(['uid'=>$uid])->select()->toArray();
|
|
|
|
return app('json')->success($list);
|
|
}
|
|
/**
|
|
* Common: 编辑信息提交
|
|
* Author: wu-hui
|
|
* Time: 2024/04/07 18:29
|
|
* @return mixed
|
|
* @throws \think\db\exception\DbException
|
|
*/
|
|
public function editInfo(){
|
|
// 参数
|
|
$uid = $this->request->uid();
|
|
$params = $this->request->params([
|
|
'id',
|
|
'alipay_code',
|
|
'bank_address',
|
|
'bank_code',
|
|
'bank_name',
|
|
'bank_type',
|
|
'extract_pic',
|
|
'extract_type',
|
|
'real_name',
|
|
'wechat'
|
|
]);
|
|
$params['uid'] = $uid;
|
|
// 操作
|
|
$this->repository->editInfo($params);
|
|
|
|
return app('json')->success();
|
|
}
|
|
/**
|
|
* Common: 删除
|
|
* Author: wu-hui
|
|
* Time: 2024/04/07 18:45
|
|
* @return mixed
|
|
*/
|
|
public function delInfo($id){
|
|
$this->repository->delete($id);
|
|
|
|
return app('json')->success('删除成功');
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|