WIN-2308041133\Administrator 6 mesi fa
parent
commit
b83657276a
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      app/controller/api/user/UserExtract.php

+ 3 - 0
app/controller/api/user/UserExtract.php

@@ -136,6 +136,9 @@ class UserExtract extends BaseController
     {
         $user = $this->request->userInfo();
         $where= $this->request->params(['num']);
+        if ($where['num'] <= $user['award_integral']){
+            throw new \Exception('提现积分不能大于可拥有积分');
+        }
         app()->make(UserRepository::class)->extractIntegral($user['uid'],$where['num']);
         return app('json')->success('已提现至佣金');
     }