mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update
This commit is contained in:
@@ -161,6 +161,7 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
||||
// 清缓存
|
||||
cleanRedisCache(pileBasicInfo.getSn());
|
||||
pileBasicInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
redisCache.deleteObject(CacheConstants.GET_PILE_LIST_BY_STATION_ID + pileBasicInfo.getStationId());
|
||||
return pileBasicInfoMapper.updatePileBasicInfo(pileBasicInfo);
|
||||
}
|
||||
|
||||
@@ -642,9 +643,14 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
||||
@Override
|
||||
public List<PileBasicInfo> getPileListByStationId(String stationId) {
|
||||
String redisKey = CacheConstants.GET_PILE_LIST_BY_STATION_ID + stationId;
|
||||
|
||||
List<PileBasicInfo> pileList = pileBasicInfoMapper.getPileListByStationId(stationId);
|
||||
|
||||
List<PileBasicInfo> pileList = redisCache.getCacheList(redisKey);
|
||||
if (CollectionUtils.isEmpty(pileList)) {
|
||||
pileList = pileBasicInfoMapper.getPileListByStationId(stationId);
|
||||
if (CollectionUtils.isNotEmpty(pileList)) {
|
||||
redisCache.setCacheList(redisKey, pileList);
|
||||
redisCache.expire(redisKey, CacheConstants.cache_expire_time_1d);
|
||||
}
|
||||
}
|
||||
return pileList;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user