WIN-2308041133\Administrator 1 vecka sedan
förälder
incheckning
677539abe5
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      app/services/order/StoreOrderSuccessServices.php

+ 2 - 1
app/services/order/StoreOrderSuccessServices.php

@@ -242,7 +242,8 @@ class StoreOrderSuccessServices extends BaseServices
             // 收集所有需要统计的用户(包括直推下级及其所有下级)
             // 收集所有需要统计的用户(包括直推下级及其所有下级)
             $allLineUsers = [];
             $allLineUsers = [];
             foreach ($directUsers as $directUid) {
             foreach ($directUsers as $directUid) {
-                $lineUsers = $this->getAllTeamUsers($directUid);
+                // 包含直推下级本人及其所有下级
+                $lineUsers = array_merge([$directUid], $this->getAllTeamUsers($directUid));
                 $allLineUsers[] = $lineUsers;
                 $allLineUsers[] = $lineUsers;
             }
             }
             @file_put_contents("quanju.txt", json_encode($allLineUsers) . "下级团队统计\r\n", 8);
             @file_put_contents("quanju.txt", json_encode($allLineUsers) . "下级团队统计\r\n", 8);