mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user