正在显示
1 个修改的文件
包含
8 行增加
和
11 行删除
| @@ -116,17 +116,14 @@ class ProductLogic extends BaseLogic | @@ -116,17 +116,14 @@ class ProductLogic extends BaseLogic | ||
| 116 | $this->delProductDetail($product_id); | 116 | $this->delProductDetail($product_id); |
| 117 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($detail, true) . PHP_EOL, FILE_APPEND); | 117 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($detail, true) . PHP_EOL, FILE_APPEND); |
| 118 | foreach ($detail as $val){ | 118 | foreach ($detail as $val){ |
| 119 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($val, true) . PHP_EOL, FILE_APPEND); | ||
| 120 | - foreach ($val as $values){ | ||
| 121 | - //查看当前栏目是否存在 | ||
| 122 | - $columnId = $this->getColumnId($product_id,$values['column_name']); | ||
| 123 | - if(empty($values['column_name'])){ | ||
| 124 | - continue; | ||
| 125 | - } | ||
| 126 | - foreach ($values['data'] as $item){ | ||
| 127 | - $save_data = $this->handleDetailParam($columnId['column_id'],$product_id,$item); | ||
| 128 | - $this->model->add($save_data); | ||
| 129 | - } | 119 | + $columnId = $this->getColumnId($product_id,$val['column_name']); |
| 120 | + //查看当前栏目是否存在 | ||
| 121 | + if(empty($val['column_name'])){ | ||
| 122 | + continue; | ||
| 123 | + } | ||
| 124 | + foreach ($val['data'] as $item){ | ||
| 125 | + $save_data = $this->handleDetailParam($columnId['column_id'],$product_id,$item); | ||
| 126 | + $this->model->add($save_data); | ||
| 130 | } | 127 | } |
| 131 | } | 128 | } |
| 132 | }catch (\Exception $e){ | 129 | }catch (\Exception $e){ |
-
请 注册 或 登录 后发表评论