//待使用券碼 $code_record_no = DB::table('fook_platform_order as a') ->select('o.code','o.apportion_bill_amount','o.apportion_commission','o.merch_settle_amount') ->leftJoin('fook_platform_ordercode as o', 'a.id', '=', 'o.orderid') ->where([ ['a.id', '=', $id], ['o.status', '=', '1'], ]) ->get();