| | |
| | | } |
| | | $data['content'] = isset($data['content']) ? $data['content'] : ''; |
| | | $data['app_id'] = $data['sku']['app_id'] = self::$app_id; |
| | | // 设置商品重量默认值 |
| | | $data['product_weight'] = isset($data['product_weight']) ? $data['product_weight'] : 0; |
| | | // 单规格商品,将规格重量赋值给商品重量 |
| | | if (isset($data['spec_type']) && $data['spec_type'] == '10' && isset($data['sku']['weight'])) { |
| | | $data['product_weight'] = $data['sku']['weight']; |
| | | } |
| | | |
| | | $this->processContent($data); |
| | | // 开启事务 |
| | |
| | | $data['spec_type'] = isset($data['spec_type']) ? $data['spec_type'] : $this['spec_type']; |
| | | $data['content'] = isset($data['content']) ? $data['content'] : ''; |
| | | $data['app_id'] = $data['sku']['app_id'] = self::$app_id; |
| | | // 设置商品重量默认值 |
| | | $data['product_weight'] = isset($data['product_weight']) ? $data['product_weight'] : 0; |
| | | // 单规格商品,将规格重量赋值给商品重量 |
| | | if (isset($data['spec_type']) && $data['spec_type'] == '10' && isset($data['sku']['weight'])) { |
| | | $data['product_weight'] = $data['sku']['weight']; |
| | | } |
| | | $productSkuIdList = helper::getArrayColumn(($this['sku']), 'product_sku_id'); |
| | | return $this->transaction(function () use ($data, $productSkuIdList) { |
| | | // 商品状态,如果已审核过的,看平台配置是否需要再次审核 |