浏览代码

提现,每人每日限制一次,不论审核状态

lizhen_gitee 10 月之前
父节点
当前提交
0c3be19a22
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. 5 1
      application/api/controller/Takecash.php
  2. 5 1
      application/api/controller/Withdraw.php

+ 5 - 1
application/api/controller/Takecash.php

@@ -57,9 +57,13 @@ class Takecash extends Api
         }
 
 
-        $check = Db::name('take_cash')->where(['user_id'=>$this->auth->id,'status'=>0])->find();
+        /*$check = Db::name('take_cash')->where(['user_id'=>$this->auth->id,'status'=>0])->find();
         if($check){
             $this->error('您已经申请了提现,请等待审核');
+        }*/
+        $check = Db::name('take_cash')->where('user_id',$this->auth->id)->whereTime('createtime','today')->find();
+        if($check){
+            $this->error('您今天已经申请了提现,明天再来吧');
         }
 
         $user_money = model('wallet')->getwallet($this->auth->id,'jewel');

+ 5 - 1
application/api/controller/Withdraw.php

@@ -62,9 +62,13 @@ class Withdraw extends Api
             $this->error('提现金额不能小于'.$min);
         }
 
-        $check = Db::name('withdraw')->where(['user_id'=>$this->auth->id,'status'=>0])->find();
+        /*$check = Db::name('withdraw')->where(['user_id'=>$this->auth->id,'status'=>0])->find();
         if($check){
             $this->error('您已经申请了提现,请等待审核');
+        }*/
+        $check = Db::name('withdraw')->where('user_id',$this->auth->id)->whereTime('createtime','today')->find();
+        if($check){
+            $this->error('您今天已经申请了提现,明天再来吧');
         }
 
         $user_money = model('wallet')->getwallet($this->auth->id,'agentjewel');