作者 何书鹏

骑手提现优化

... ... @@ -354,14 +354,15 @@ class Rider extends Api
$money = $this->request->post('money');
$user = $this->auth->getUser();
if ($user['money'] < $money) $this->error('可提现金额不足');
$user->setDec('money',$money);
$data = [
'user_id' => $this->auth->id,
'money' => $money,
'memo' => '提现',
'createtime' => time()
'before' => $user->money,
'after' => $user->money-$money,
'memo' => '提现'
];
Db::name('user_money_log')->insert($data);
UserMoneyLog::create($data);
$user->setDec('money',$money);
$this->success('提现成功');
}
... ...