Explorar o código

Merge remote-tracking branch 'origin/dev' into dev

sunxbiao hai 4 meses
pai
achega
ef29065216
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      app/common/repositories/finance/FinanceRepository.php

+ 7 - 0
app/common/repositories/finance/FinanceRepository.php

@@ -398,6 +398,13 @@ class FinanceRepository extends BaseRepository
398
             $data['three'][] = ['className' => 'el-icon-s-goods', 'count' => (int)($sharedUserDataQuery[5] ?? 0), 'name' => '总裁合伙人', 'partner_level' => 5];
398
             $data['three'][] = ['className' => 'el-icon-s-goods', 'count' => (int)($sharedUserDataQuery[5] ?? 0), 'name' => '总裁合伙人', 'partner_level' => 5];
399
             $data['three'][] = ['className' => 'el-icon-s-goods', 'count' => (int)($sharedUserDataQuery[6] ?? 0), 'name' => '联席主席团', 'partner_level' => 6];
399
             $data['three'][] = ['className' => 'el-icon-s-goods', 'count' => (int)($sharedUserDataQuery[6] ?? 0), 'name' => '联席主席团', 'partner_level' => 6];
400
 
400
 
401
+            // 共富百人团、千人团、万人团数据
402
+            $sharedGroupUserDataQuery = Db::query("SELECT group_id,count(user_id) count FROM `rrx_shared_prosperity_group_user` group by group_id");
403
+            $sharedGroupUserDataQuery = array_column($sharedGroupUserDataQuery, 'count', 'group_id');
404
+            $data['four'][] = ['className' => 'el-icon-s-goods', 'count' => (int)($sharedGroupUserDataQuery[1] ?? 0), 'name' => '万人团', 'group_id' => 1];
405
+            $data['four'][] = ['className' => 'el-icon-s-goods', 'count' => (int)($sharedGroupUserDataQuery[2] ?? 0), 'name' => '千人团', 'group_id' => 2];
406
+            $data['four'][] = ['className' => 'el-icon-s-goods', 'count' => (int)($sharedGroupUserDataQuery[3] ?? 0), 'name' => '百人团', 'group_id' => 3];
407
+
401
             $res['left'] = $data;
408
             $res['left'] = $data;
402
         }
409
         }
403
         return $res;
410
         return $res;