update 对接内蒙古平台

This commit is contained in:
2024-04-19 14:06:01 +08:00
parent 646e88b057
commit 7e41f69f5a
9 changed files with 105 additions and 52 deletions

View File

@@ -63,4 +63,6 @@ public interface ThirdpartySecretInfoMapper {
int deleteThirdpartySecretInfoByIds(Long[] ids);
ThirdPartySecretInfoVO queryByOperatorId(String theirOperatorId);
ThirdPartySecretInfoVO queryByThirdPlatformType(String thirdPlatformType);
}

View File

@@ -61,4 +61,6 @@ public interface ThirdpartySecretInfoService {
public int deleteThirdpartySecretInfoById(Long id);
ThirdPartySecretInfoVO queryByOperatorId(String theirOperatorId);
ThirdPartySecretInfoVO queryByThirdPlatformType(String thirdPlatformType);
}

View File

@@ -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;
}
}