|
|
@@ -226,21 +226,22 @@ class WithdrawController
|
|
|
'name' => Validator::notEmpty()->setName('姓名'),
|
|
|
'goods_id' => Validator::notEmpty()->setName('id'),
|
|
|
]);
|
|
|
- if (!empty(Redis::get('1212' . $request->user_data['id']))) {
|
|
|
- throw new \Exception('请不要连续操作');
|
|
|
- }
|
|
|
- Redis::setEx('1212' . $request->user_data['id'], 10, $request->user_data['id']);
|
|
|
+
|
|
|
|
|
|
$mygoodslist = Db::table('wa_my_goods')
|
|
|
->where('id', $param['goods_id'])
|
|
|
->first();
|
|
|
if (!empty($mygoodslist)) {
|
|
|
if ($mygoodslist->balance < 2000000) {
|
|
|
- throw new \Exception('转账额度不足');
|
|
|
+ throw new \Exception('转账额度不足,认证获取额度');
|
|
|
}
|
|
|
} else {
|
|
|
- throw new \Exception('转账额度不足,先认证获取额度');
|
|
|
+ throw new \Exception('转账额度不足,认证获取额度');
|
|
|
}
|
|
|
+ if (!empty(Redis::get('1212' . $request->user_data['id']))) {
|
|
|
+ throw new \Exception('请不要连续操作');
|
|
|
+ }
|
|
|
+ Redis::setEx('1212' . $request->user_data['id'], 10, $request->user_data['id']);
|
|
|
|
|
|
$userdata = Db::table('wa_users')->where('id', $param['user_data']['id'])->first();
|
|
|
|