WIN-2308041133\Administrator 5 months ago
parent
commit
80892ad44b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/common/model/user/AwardLake.php

+ 3 - 0
app/common/model/user/AwardLake.php

@@ -108,6 +108,9 @@ class AwardLake extends BaseModel
         $level = $model->where('id', $lake['level'])->find();
         $levels = $model->where('grade', '>=', $level['grade'])->column('id');
         $users = User::where($field, 'in', $levels)->where('status', 1)->select();
+        if (count($users) <= 0){
+            return true;
+        }
         $every = bcdiv($lake['num'], count($users), 2);  //每个用户分得的奖励
         if ($every <= 0) {
             self::where('id', $lake['id'])->update(['send_time' => time()]);