wesmiler 3 月之前
父节点
当前提交
5742b1a932
共有 1 个文件被更改,包括 2 次插入10 次删除
  1. 2 10
      app/Http/Controllers/Admin/IndexController.php

+ 2 - 10
app/Http/Controllers/Admin/IndexController.php

@@ -175,17 +175,9 @@ class IndexController extends Backend
                     ->where('status', 2)
                     ->sum('actual_money'), // 累计提现金额
             ],
-            // 商家统计(商户用户不显示商家统计,返回0)
+            // 企业统计(商户用户不显示商家统计,返回0)
             'stores' => [
-                'count' => $storeId > 0 ? 0 : \App\Models\StoreModel::where('mark', 1)->count(), // 总商家数
-                'count_by_pending' => $storeId > 0 ? 0 : \App\Models\StoreModel::where('mark', 1)->where('status', 2)->count(), // 待审核
-                'count_by_active' => $storeId > 0 ? 0 : \App\Models\StoreModel::where('mark', 1)->where('status', 1)->count(), // 营业中
-            ],
-            // 代理统计(agents表没有store_id字段,商户用户返回0)
-            'agents' => [
-                'count' => $storeId > 0 ? 0 : \App\Models\AgentModel::where('mark', 1)->count(), // 总代理数
-                'count_by_pending' => $storeId > 0 ? 0 : \App\Models\AgentModel::where('mark', 1)->where('status', 2)->count(), // 待审核
-                'count_by_active' => $storeId > 0 ? 0 : \App\Models\AgentModel::where('mark', 1)->where('status', 1)->count(), // 已审核
+                'count' => $storeId > 0 ? 0 : \App\Models\StoreModel::where(['type'=>2,'mark'=>1])->count(), // 总数
             ],
             // 提现申请统计(balance_logs表没有store_id字段,商户用户返回0)
             'withdrawals' => [