|
@@ -175,17 +175,9 @@ class IndexController extends Backend
|
|
|
->where('status', 2)
|
|
->where('status', 2)
|
|
|
->sum('actual_money'), // 累计提现金额
|
|
->sum('actual_money'), // 累计提现金额
|
|
|
],
|
|
],
|
|
|
- // 商家统计(商户用户不显示商家统计,返回0)
|
|
|
|
|
|
|
+ // 企业统计(商户用户不显示商家统计,返回0)
|
|
|
'stores' => [
|
|
'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)
|
|
// 提现申请统计(balance_logs表没有store_id字段,商户用户返回0)
|
|
|
'withdrawals' => [
|
|
'withdrawals' => [
|