package com.hmdp.service.impl;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hmdp.dto.Result;
import com.hmdp.entity.ShopType;
import com.hmdp.mapper.ShopTypeMapper;
import com.hmdp.service.IShopTypeService;
import com.hmdp.utils.RedisConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author WuZhiQiang
* @since 2022-11-8
*/
@Service
public class ShopTypeServiceImpl extends ServiceImpl<ShopTypeMapper, ShopType> implements IShopTypeService {
@Autowired
private StringRedisTemplate stringRedisTemplate;
@Override
public Result queryTypeList() {
//先查缓存redis是否有数据
//!!!!!!
//!!!!!!这里的RedisConstants.CACHE_SHOP_TYPE 是 "cache:shop-type";
//!!!!!!
//debug发现取出的10条数据全在一起,也
黑马点评Redis的p37作业(list实现)
最新推荐文章于 2025-01-12 09:45:28 发布

最低0.47元/天 解锁文章
1009





