优化获取单个商品名称性能

This commit is contained in:
Edward Yang 2022-12-14 11:08:55 +08:00
parent 5a94945dee
commit f55255ba8b
1 changed files with 1 additions and 2 deletions

View File

@ -182,8 +182,7 @@ class ProductRepo
*/
public static function getName($id)
{
$categories = self::getAllProductsWithName();
return $categories[$id]['name'] ?? '';
return self::getNameById($id);
}