dev-v2 #3

Merged
bunny merged 122 commits from dev-v2 into master-v2 2024-03-30 23:40:58 +08:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 75de44cda0 - Show all commits

View File

@ -6,6 +6,7 @@ import com.atguigu.product.service.CategoryService;
import com.atguigu.spzx.model.entity.product.Category; import com.atguigu.spzx.model.entity.product.Category;
import com.atguigu.utils.CategoryHelper; import com.atguigu.utils.CategoryHelper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -46,6 +47,7 @@ public class CategoryServiceImpl implements CategoryService {
* *
* @return 分类实体类列表 * @return 分类实体类列表
*/ */
@Cacheable(value = "category", key = "'all'")
@Override @Override
public List<Category> findCategoryTree() { public List<Category> findCategoryTree() {
// 查询所以分类返回list集合 // 查询所以分类返回list集合