|
|
@@ -66,7 +66,11 @@ class CustomerSpec extends Backend
|
|
|
|
|
|
//然后根据选中的规格ID逐个判断是否存在,存在的更新状态、包装箱及发货价,不存在的则创建。 type_id
|
|
|
foreach ($params['all_data'] as $item) {
|
|
|
- $row = $this->model->where('customer_id',$params['ids'])->where('type_id',$item['type_id'])->where('product_id',$item['value'])->findOrEmpty();
|
|
|
+ $row = $this->model
|
|
|
+ ->where('customer_id',$params['ids'])
|
|
|
+ ->where('type_id',$item['type_id'])
|
|
|
+ ->where('product_id',$item['value'])
|
|
|
+ ->findOrEmpty();
|
|
|
if($row->isEmpty()){
|
|
|
$this->model->create([
|
|
|
'customer_id' => $params['ids'],
|