laravel orm随机排序 --- 2022-07-07

2022-07-07  本文已影响0人  一位先生_

->inRandomOrder()

date = Carbon::yesterday()->toDateString();pay_uid_amount_map = Pay::select(['uid', DB::raw("sum(money) as amount")])->where('date', date) ->where('trade_status', 'success')->groupBy('uid');pay_uid_amount_map2 = PayV2::select(['uid', DB::raw("sum(money) as amount")])->where('date', $date)
->where('trade_status', 'success')->groupBy('uid');

    $pay_uid_amount_map = $pay_uid_amount_map2->union($pay_uid_amount_map)->pluck('amount', 'uid');
上一篇下一篇

猜你喜欢

热点阅读