mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-23 20:45:10 +08:00
update 对接内蒙古平台
This commit is contained in:
@@ -63,4 +63,6 @@ public interface ThirdpartySecretInfoMapper {
|
||||
int deleteThirdpartySecretInfoByIds(Long[] ids);
|
||||
|
||||
ThirdPartySecretInfoVO queryByOperatorId(String theirOperatorId);
|
||||
|
||||
ThirdPartySecretInfoVO queryByThirdPlatformType(String thirdPlatformType);
|
||||
}
|
||||
|
||||
@@ -61,4 +61,6 @@ public interface ThirdpartySecretInfoService {
|
||||
public int deleteThirdpartySecretInfoById(Long id);
|
||||
|
||||
ThirdPartySecretInfoVO queryByOperatorId(String theirOperatorId);
|
||||
|
||||
ThirdPartySecretInfoVO queryByThirdPlatformType(String thirdPlatformType);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class ThirdpartySecretInfoServiceImpl implements ThirdpartySecretInfoServ
|
||||
@Override
|
||||
public ThirdPartySecretInfoVO queryByOperatorId(String theirOperatorId) {
|
||||
// 加缓存
|
||||
String redisKey = CacheConstants.THIRD_PARTY_SECRET_INFO + theirOperatorId;
|
||||
String redisKey = CacheConstants.THIRD_PARTY_SECRET_INFO_BY_ID + theirOperatorId;
|
||||
ThirdPartySecretInfoVO result = redisCache.getCacheObject(redisKey);
|
||||
if (Objects.isNull(result)) {
|
||||
result = thirdpartySecretInfoMapper.queryByOperatorId(theirOperatorId);
|
||||
@@ -113,4 +113,18 @@ public class ThirdpartySecretInfoServiceImpl implements ThirdpartySecretInfoServ
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThirdPartySecretInfoVO queryByThirdPlatformType(String thirdPlatformType) {
|
||||
// 加缓存
|
||||
String redisKey = CacheConstants.THIRD_PARTY_SECRET_INFO_BY_TYPE + thirdPlatformType;
|
||||
ThirdPartySecretInfoVO result = redisCache.getCacheObject(redisKey);
|
||||
if (Objects.isNull(result)) {
|
||||
result = thirdpartySecretInfoMapper.queryByThirdPlatformType(thirdPlatformType);
|
||||
if (Objects.nonNull(result)) {
|
||||
redisCache.setCacheObject(redisKey, result, CacheConstants.cache_expire_time_1h);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user