操作失败
This commit is contained in:
parent
c6fce4c065
commit
45d1fe4858
@ -954,6 +954,7 @@ class OrderService extends Service
|
||||
app(RealOrderCardPartitionRepository::class)->forgetCached();
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
Log::error('操作失败 #:' . $e->getMessage());
|
||||
throw new HttpException('操作失败');
|
||||
}
|
||||
|
||||
@ -1009,7 +1010,9 @@ 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));
|
||||
if (!empty($exists)) {
|
||||
throw new ExistedException('出现重复销售卡 #:' . implode(',', $exists));
|
||||
}
|
||||
}
|
||||
|
||||
DB::table($table)->upsert($value, ['sim', 'order_id', 'refunded_at', 'deleted_at']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user