|
|
@ -1267,7 +1267,7 @@ class ProductRepository extends BaseRepository |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function getContent($productId) |
|
|
|
public function getContent($productId) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$key = '_get_content' . $productId; |
|
|
|
$key = '_get_content1' . $productId; |
|
|
|
$res = Cache::get($key); |
|
|
|
$res = Cache::get($key); |
|
|
|
if ($res) return json_decode($res, true); |
|
|
|
if ($res) return json_decode($res, true); |
|
|
|
$res = app()->make(ProductContentRepository::class)->getWhere(['product_id' => $productId]); |
|
|
|
$res = app()->make(ProductContentRepository::class)->getWhere(['product_id' => $productId]); |
|
|
@ -1399,6 +1399,7 @@ class ProductRepository extends BaseRepository |
|
|
|
$product['attr'] = $attr; |
|
|
|
$product['attr'] = $attr; |
|
|
|
$product['sku'] = $sku; |
|
|
|
$product['sku'] = $sku; |
|
|
|
$product['isRelation'] = $isRelation; |
|
|
|
$product['isRelation'] = $isRelation; |
|
|
|
|
|
|
|
$product['content'] = $this->getContent($product['product_id']); |
|
|
|
return $product; |
|
|
|
return $product; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|