出现重复销售卡

This commit is contained in:
邓皓元 2019-08-16 10:52:18 +08:00
parent 8c80e68ab8
commit c6fce4c065

View File

@ -1009,7 +1009,7 @@ class OrderService extends Service
foreach (array_chunk($data, 1000) as $value) {
if ($table === 'virtual_order_cards') {
$exists = DB::table($table)->whereIn('sim', array_pluck($value, 'sim'))->whereNull('deleted_at')->get()->pluck('sim')->toArray();
throw new ExistedException('出现重复销售卡 #:', implode(',', $exists));
throw new ExistedException('出现重复销售卡 #:' . implode(',', $exists));
}
DB::table($table)->upsert($value, ['sim', 'order_id', 'refunded_at', 'deleted_at']);