mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update
This commit is contained in:
@@ -361,23 +361,12 @@ public class PileBillingTemplateServiceImpl implements IPileBillingTemplateServi
|
||||
|
||||
/**
|
||||
* 通过计费模板id查询计费模板详情
|
||||
* 缓存30分账,修改清缓存
|
||||
* 缓存1天,修改清缓存
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PileBillingDetail> queryBillingDetailById(Long id) {
|
||||
String redisKey = CacheConstants.QUERY_BILLING_DETAIL_BY_ID + id;
|
||||
List<PileBillingDetail> pileBillingDetails = redisCache.getCacheList(redisKey);
|
||||
if (CollectionUtils.isEmpty(pileBillingDetails)) {
|
||||
pileBillingDetails = pileBillingTemplateMapper.queryBillingDetailByTemplateId(id);
|
||||
if (CollectionUtils.isNotEmpty(pileBillingDetails)) {
|
||||
redisCache.setCacheList(redisKey, pileBillingDetails);
|
||||
redisCache.expire(redisKey, 30, TimeUnit.MINUTES);
|
||||
}
|
||||
}
|
||||
return pileBillingDetails;
|
||||
}
|
||||
public List<PileBillingDetail> queryBillingDetailById(Long id)
|
||||
|
||||
@Override
|
||||
public List<BillingTemplateVO> queryPublicBillingTemplateList() {
|
||||
|
||||
@@ -390,17 +390,18 @@ public class PileConnectorInfoServiceImpl implements IPileConnectorInfoService {
|
||||
*/
|
||||
@Override
|
||||
public List<ConnectorInfoVO> getUniAppConnectorList(Long stationId) {
|
||||
// TODO 加缓存
|
||||
// String redisKey = CacheConstants.GET_UNIAPP_CONNECTOR_LIST_BY_STATION_ID + stationId;
|
||||
// List<ConnectorInfoVO> list = redisCache.getCacheObject(redisKey);
|
||||
// if (CollectionUtils.isEmpty(list)) {
|
||||
// // 查数据库
|
||||
// list = pileConnectorInfoMapper.getUniAppConnectorList(stationId);
|
||||
// if (CollectionUtils.isNotEmpty(list)) {
|
||||
// redisCache.setCacheObject(redisKey, list, 5, TimeUnit.MINUTES);
|
||||
// }
|
||||
// }
|
||||
return pileConnectorInfoMapper.getUniAppConnectorList(stationId);
|
||||
// 加缓存
|
||||
String redisKey = CacheConstants.GET_UNIAPP_CONNECTOR_LIST_BY_STATION_ID + stationId;
|
||||
List<ConnectorInfoVO> list = redisCache.getCacheList(redisKey);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
// 查数据库
|
||||
list = pileConnectorInfoMapper.getUniAppConnectorList(stationId);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
redisCache.setCacheList(redisKey, list);
|
||||
redisCache.expire(redisKey, CacheConstants.cache_expire_time_1d);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<ConnectorInfoVO> getConnectorListForLianLian(Long stationId) {
|
||||
|
||||
Reference in New Issue
Block a user