Browse Source

店铺新用户统计报表--去掉查询市场经理,因为线上还未更新市场经理相关功能信息

master
liangyuyan 5 years ago
parent
commit
3c8e226658
  1. 3
      app/Admin/Controllers/StoreUserReportController.php
  2. 2
      app/Admin/Repositories/StoreUserReport.php

3
app/Admin/Controllers/StoreUserReportController.php

@ -34,9 +34,6 @@ class StoreUserReportController extends AdminController
return $market->name; return $market->name;
}); });
$grid->store_name; $grid->store_name;
// $grid->mm_user_id->display(function ($markrtId) {
// return '未关联市场经理';
// });
$grid->new_user_total; $grid->new_user_total;
$grid->filter(function (Grid\Filter $filter) { $grid->filter(function (Grid\Filter $filter) {

2
app/Admin/Repositories/StoreUserReport.php

@ -30,7 +30,7 @@ class StoreUserReport extends EloquentRepository
/* 根据流水查询 2020-08-18 目前用全匹配文字方式查询新用户 */ /* 根据流水查询 2020-08-18 目前用全匹配文字方式查询新用户 */
$storeAccountModel = new storeAccountModel(); $storeAccountModel = new storeAccountModel();
$query = $storeAccountModel::join('ims_cjdc_store as store','ims_cjdc_store_account.store_id','store.id') $query = $storeAccountModel::join('ims_cjdc_store as store','ims_cjdc_store_account.store_id','store.id')
->select('store_id','store.market_id','store.name as store_name','mm_user_id',DB::raw("count(distinct ims_cjdc_store_account.id) as new_user_total"))
->select('store_id','store.market_id','store.name as store_name',DB::raw("count(distinct ims_cjdc_store_account.id) as new_user_total"))
->whereRaw("note = '新用户下单成功,平台奖励'") ->whereRaw("note = '新用户下单成功,平台奖励'")
->groupBy('store_id') ->groupBy('store_id')
->orderBy('store.market_id','desc') ->orderBy('store.market_id','desc')

Loading…
Cancel
Save