| | |
| | | |
| | | import com.moon.server.entity.all.*; |
| | | import com.moon.server.entity.sys.MenuEntity; |
| | | import com.moon.server.entity.sys.ResEntity; |
| | | import com.moon.server.mapper.all.PermsMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Integer> selectResList(String uid) { |
| | | public List<ResEntity> selectResList(String uid) { |
| | | String key = RedisCacheKey.permsResListKey(uid); |
| | | Object obj = redisService.get(key); |
| | | if (obj instanceof List<?>) { |
| | | return (List<Integer>) obj; |
| | | return (List<ResEntity>) obj; |
| | | } |
| | | |
| | | List<Integer> list = permsMapper.selectResList(uid); |
| | | List<ResEntity> list = permsMapper.selectResList(uid); |
| | | if (list != null && list.size() > 0) { |
| | | redisService.put(key, list, SettingData.CACHE_EXPIRE, TimeUnit.MINUTES); |
| | | } |