Browse Source

修复所属代理判断

Jason 1 year ago
parent
commit
31252edeb4
2 changed files with 4 additions and 1 deletions
  1. 3 0
      application/api/controller/Money.php
  2. 1 1
      application/common/model/Users.php

+ 3 - 0
application/api/controller/Money.php

@@ -223,6 +223,9 @@ class Money extends Api
                 $data['bank']['bank_card'] = $bank_info['bank_card'];
             }
         }
+        if($withdraw_info['usdt'] && $withdraw_info['bank']){
+            $this->error(__('无提现信息'));
+        }
 
         $this->success('', $data);
     }

+ 1 - 1
application/common/model/Users.php

@@ -62,7 +62,7 @@ class Users extends Model
                 ->where('is_lock', 0)
                 ->where('is_delete', 0)
                 ->find();
-            $data['agent_id'] = $parent_info['agent_id'];
+            $data['agent_id'] = $parent_info['agent_id'] ?? 0;
         }
         $info = self::where('id', $data['agent_id'])
             ->where('is_agent', 1)