This commit is contained in:
“wanyongkang”
2021-04-23 18:33:09 +08:00
parent 163422f416
commit aa7c5aac49

View File

@@ -31,6 +31,10 @@ class CashOutIndex extends Controller
$user = new UserModel;
$user_rest = $user->getOne(['id'=>$data['userid']],'RestAmount')['RestAmount'];
$rest = $user_rest - $post['cash_out_money'];
if($data['money']<=0){
die;
}
if ($rest < 0){
echo json_encode(['Code'=>-10000,]);
die;