优化获取单个商品名称性能
This commit is contained in:
parent
5a94945dee
commit
f55255ba8b
|
|
@ -182,8 +182,7 @@ class ProductRepo
|
|||
*/
|
||||
public static function getName($id)
|
||||
{
|
||||
$categories = self::getAllProductsWithName();
|
||||
return $categories[$id]['name'] ?? '';
|
||||
return self::getNameById($id);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue