rabin 3 years ago
parent
commit
9c274ec4ba
1 changed files with 2 additions and 1 deletions
  1. 2 1
      service/agent/lib/Order.php

+ 2 - 1
service/agent/lib/Order.php

@@ -1135,7 +1135,8 @@ class Order
                     if (!$child_num) {
                         $child_num = Dever::load('invite/api')->getChildNum($v['uid'], 1);
                     }*/
-                    $child_num = Dever::db('agent/member')->getCountByRole(array('parent_mid' => $v['uid'], 'role' => info['role'])) + 1;
+                    $child_num = Dever::db('agent/member')->total(array('parent_mid' => $v['uid'], 'role' => $info['role'], 'status' => 2)) + 1;
+                    //$child_num = Dever::db('agent/member')->getCountByRole(array('parent_mid' => $v['uid'], 'role' => $info['role'])) + 1;
                     if ($child_num >= $reward['num'] && $child_num % $reward['num'] == 0) {
                         $reward_state = true;
                     }