diff --git a/tests/OldTimeTest.php b/tests/OldTimeTest.php index 1abb96dd..217918fa 100644 --- a/tests/OldTimeTest.php +++ b/tests/OldTimeTest.php @@ -19,7 +19,6 @@ $packages = DB::table('virtual_packages')->get()->collect()->keyBy('sn')->toArra foreach ($data as $values) { $values = array_values($values); - continue; $rows = DB::connection('vd_old')->table('ckb_custom_handle_log')->whereNotIn('type', [10, 15]) ->where('valid_start_time', '>=', 1546272000) ->where('custom_no', $values[0])->orderBy('create_time')->get()->collect()->toArray(); @@ -55,6 +54,8 @@ $subQuery = DB::raw('( GROUP BY custom_no ) t'); +$custom_nos = array_pluck($data, '客户编号') + $res = DB::connection('vd_old')->table('ckb_custom')->join($subQuery, function($join) { $join->on('t.cno', '=', 'ckb_custom.custom_no'); })->whereIn('custom_no', $custom_nos)->update([