Jelajahi Sumber

互联网医院

Trick 5 tahun lalu
induk
melakukan
f7635f4ce2

+ 6 - 7
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -630,6 +630,12 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        try{
            OauthKeypairDO keypairDO = oauthKeypairDao.findByCode("hwlyyKey");
            KeyPair keyPair = (KeyPair)SerializeUtil.unSerialize(keypairDO.getKeyPair());
            //解密idcard,中山医院id通过openid获取,i健康通过直接加密传输
            if(org.apache.commons.lang3.StringUtils.isNotBlank(idcard)){
                rs.put("idcard",com.yihu.jw.security.utils.RSAUtils.decryptBase64(idcard, keyPair));
            }else {
                rs.put("idcard",idcard);
            }
            //解密wechatId
            if(org.apache.commons.lang3.StringUtils.isNotBlank(wechatId)){
                String wxid =com.yihu.jw.security.utils.RSAUtils.decryptBase64(wechatId, keyPair);
@ -652,13 +658,6 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                rs.put("wechatId",wechatId);
            }
            //解密idcard,中山医院id通过openid获取,i健康通过直接加密传输
            if(org.apache.commons.lang3.StringUtils.isNotBlank(idcard)){
                rs.put("idcard",com.yihu.jw.security.utils.RSAUtils.decryptBase64(idcard, keyPair));
            }else {
                rs.put("idcard",idcard);
            }
        }catch (Exception e){
            logger.error(e);
        }