$orderRes = DB::table('merchant_order')->where(['state' => 1])
            ->first(array(
                DB::raw('SUM(total_money) as total_money'),
                DB::raw('SUM(my_final_money) as my_final_money'),
                DB::raw('SUM(merchant_money) as merchant_money'),
                DB::raw('SUM(subsidy_money) as subsidy_money'),
                DB::raw('SUM(promoter_money) as promoter_money'),
                DB::raw('SUM(signer_money) as signer_money'),
                DB::raw('COUNT(id) as order_num'),
            ));

Logo

加入社区!打开量化的大门,首批课程上线啦!

更多推荐