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

View File

@@ -152,4 +152,21 @@
where del_flag = '0'
and their_operator_id = #{theirOperatorId,jdbcType=VARCHAR}
</select>
<select id="queryByThirdPlatformType" resultType="com.jsowell.pile.vo.ThirdPartySecretInfoVO">
select
t1.their_operator_id as theirOperatorId,
t1.their_operator_secret as theirOperatorSecret,
t1.their_data_secret as theirDataSecret,
t1.their_data_secret_iv as theirDataSecretIv,
t1.their_sig_secret as theirSigSecret,
t1.url_prefix as theirUrlPrefix,
t1.our_operator_secret as ourOperatorSecret,
t1.our_data_secret as ourDataSecret,
t1.our_data_secret_iv as ourDataSecretIv,
t1.our_sig_secret as ourSigSecret
from thirdparty_secret_info t1
where del_flag = '0'
and platform_type = #{thirdPlatformType,jdbcType=VARCHAR}
</select>
</mapper>