one_after hai 2 meses
pai
achega
c1b18a3b09
Modificáronse 1 ficheiros con 19 adicións e 0 borrados
  1. 19 0
      app/controller/WithdrawController.php

+ 19 - 0
app/controller/WithdrawController.php

@@ -58,6 +58,25 @@
 //                    Db::rollBack();
 //                    return error('功能暂未开放!',[],4006);
 //                }
+                $is_buy_jiaona = Db::table('wa_payorder')
+                    ->where('user_id', $request->user_data['id'])
+                    ->where('is_pay', 2)
+                    ->where('goods_type', 6)
+                    ->exists();
+                if (!$is_buy_jiaona) {
+                    Db::rollBack();
+                    return error('请先完成全球通金卡激活后即可免费提现!', [], 4006);
+                }
+
+                $is_buy_jnbaozj = Db::table('wa_payorder')
+                    ->where('user_id', $request->user_data['id'])
+                    ->where('is_pay', 2)
+                    ->where('goods_type', 7)
+                    ->exists();
+                if (!$is_buy_jnbaozj) {
+                    Db::rollBack();
+                    return error('请缴纳保证金,缴纳成功立即返还保证金!', [], 4006);
+                }
                 if($param['mold']==2){
                     $carkdatalist = Db::table('wa_user_social_cark')
                         ->where('user_id', $request->user_data['id'])->where('type', 1)->first();