更新提现管理接口
This commit is contained in:
parent
1fc4748f7e
commit
31961f5727
app
@ -44,7 +44,7 @@ class WithdrawLogic extends BaseLogic
|
||||
|
||||
// 拒绝通过审核,记录备注原因
|
||||
if ($params['status'] == 2) {
|
||||
Withdraw::where(['id'=>$withDrawInfo['id']])->update(['status'=>2, 'deny_desc'=>$params['deny_desc']]);
|
||||
Withdraw::where(['id'=>$withDrawInfo['id']])->update(['status'=>2, 'deny_desc'=>$params['deny_desc'] ?? '']);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -61,11 +61,15 @@ class WithdrawController extends BaseLikeAdminController
|
||||
return $this->success('请求成功',$result);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
public function update()
|
||||
{
|
||||
$id = $this->request->param('id');
|
||||
$status = $this->request->param('status');
|
||||
if (empty($id)) {
|
||||
return $this->fail('参数id不能为空');
|
||||
}
|
||||
if (!in_array($status, [1, 2, 3])) {
|
||||
return $this->fail('参数错误');
|
||||
return $this->fail('参数status错误');
|
||||
}
|
||||
$data = Withdraw::find($id);
|
||||
if (empty($data)) {
|
||||
@ -84,6 +88,12 @@ class WithdrawController extends BaseLikeAdminController
|
||||
{
|
||||
try {
|
||||
$params = $this->request->param();
|
||||
if (empty($params['id'])) {
|
||||
return $this->fail('参数id不能为空');
|
||||
}
|
||||
if (empty($params['status'])) {
|
||||
return $this->fail('参数status不能为空');
|
||||
}
|
||||
$re = WithdrawLogic::audit($params);
|
||||
if (!$re) {
|
||||
return $this->fail(WithdrawLogic::getError());
|
||||
|
Loading…
x
Reference in New Issue
Block a user