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