|
|
@@ -60,11 +60,9 @@ class DeleteRepetitionSkuItem implements ShouldQueue
|
|
|
DeliveryAppointmentDetail::query()->whereIn('commodity_id',data_get($this->param,'*.id'))->update(['commodity_id'=>$this->param[0]['id']]);
|
|
|
foreach ($this->param as $del){
|
|
|
if ($del['id']==$this->param[0]['id']) continue;
|
|
|
- $commodity=Commodity::query()->find($del['id']);
|
|
|
- if ($commodity){
|
|
|
- $commodity->delete();
|
|
|
- LogService::log(__METHOD__,"去除重复sku商品",json_encode($commodity));
|
|
|
- }
|
|
|
+ Commodity::query()->where('id',$del['id'])->delete();
|
|
|
+ LogService::log(__METHOD__,"去除重复sku商品",json_encode($del));
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|