|
|
@ -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') |
|
|
|