@ -31,13 +31,10 @@ class OrderReport extends EloquentRepository
*/
*/
publicfunctionget(GridModel$model)
publicfunctionget(GridModel$model)
{
{
$this->setSort($model);
$this->setPaginate($model);
$marketId=request()->input('market_id');
$marketId=request()->input('market_id');
$startTime=request()->input('start_time');
$startTime=request()->input('start_time');
$endTime=request()->input('end_time');
$endTime=request()->input('end_time');
$orderMain=orderMainModel::select(DB::raw('COUNT(id) AS total_num, SUM(money) AS total_money'))->whereIn('state',[4,5,10]);
$orderMain=orderMainModel::select(DB::raw('COUNT(id) AS total_num, SUM(money) AS total_money'))->whereIn('state',[4,5,10]);
$storeNewUser=StoreAccountModel::select(DB::raw("SUM( CASE WHEN note = '新用户下单成功,平台奖励' THEN 1 ELSE 0 END ) AS new_add_total, SUM( CASE WHEN note = '新用户下单成功,平台奖励' THEN money ELSE 0 END ) AS new_user_total,SUM( CASE WHEN note = '用户下单成功,平台奖励' THEN money ELSE 0 END ) AS store_total"));
$storeNewUser=StoreAccountModel::select(DB::raw("SUM( CASE WHEN note = '新用户下单成功,平台奖励' THEN 1 ELSE 0 END ) AS new_add_total, SUM( CASE WHEN note = '新用户下单成功,平台奖励' THEN money ELSE 0 END ) AS new_user_total,SUM( CASE WHEN note = '用户下单成功,平台奖励' THEN money ELSE 0 END ) AS store_total"));
@ -52,45 +49,74 @@ class OrderReport extends EloquentRepository