diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/SSOPluginLogin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/SSOPluginLogin.java index e14c268..18de80c 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/SSOPluginLogin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/eoss/SSOPluginLogin.java @@ -112,22 +112,23 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler { throw new KDBizException("获取用户信息接口异常,SSO用户登录失败!" + e); } } else if (StringUtils.isNotEmpty(userName)) { - try { + // Object o = SystemParamServiceHelper.loadPublicParameterFromCache("shkd_privatekeystring_tag"); // logger.info("获取公共参数shkd_privatekeystring_tag:"+o); logger.info("加密后user:" + userName); String privateKeyString = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDVcEZaQoPn+qado8nw5ZvKlbxEh/xQ9AiBMRUFpY0XibkrCa1T2A7bTWztoAkTaBby1ynOOX4q1BSTGiDVOcXkCZgMteqAlvg3y9YZTlV/6MkbPLNPZTuWgNMa2C6bMkkHfJJqkDI8IZbe3IUxNk4Rz6JWsLDaI6PNhSKbRIq3MHj/emsmkQN+ePAz0Elh4b/bD2L63lmJJEtoK9Ira2b/gl+VwqOiaZb8iZ4PrvCKQJucAPkdQAb2Etcv0Clb/VnzdgzzcR+gU5Ak2hJns29IFMS4jOGhAJkdLQX+fW1KS0Am9gsvYznIbv8R0Bv/PDz+jHrd36a9sMr/ixzOy3QBAgMBAAECggEAXOVc+XPxzUm+suXSwtJsmCPLqVg2bVWJThF6wNZpLlF3ElBH7DIhZTmxq0r4KEYpltAnFebYDvP3cH7yw1s90h6K2x1iT01mA4LoUGNTuzQqM3yb3naFFOBFAW4N+uZL+sIxR8gy1REZhS4dmmm0WPQyB+EnWAojBRRpF4MhjND0ncSRJhWLTg3SiOSidedaVuI9AncwXlsH3hvJTM9xrL86tGIuFZe1JDCbg5zCU0Scz6LFnSc4UISajPEy0u7v8l74k2Tqr+XXOCAbG4gSr12BazQ7c7pT0hnwE1t/WKdeu033dbTfz+FkZ/ARFgfsjuGBrc2LA7A/FbOD28mTcQKBgQDrC41Z14Iz4N+hr4fvilCqou/GcF7T5CP//tKqj3RRgCYu3XF1btQ+iXMRc40NzdCdxmH+BMJ9lS51Soi0dzvHuQTn/A/3cviBfmzptqTMp0T2RpXQ0bSe4wqUT3fdenFm39xbw9p+b+eknZ8lrGM6fn06GBP6mQ+USMvZAnkdawKBgQDod5hasx8rMveJsNdqp/vGOFVtCh6RVX0rV8vlJ1tLGAhxBQbPbbmB/H773Fqyhc7NOWPFbSuHXtZtArgTY5wHwHcBZ41nB7E5Y40wMql8eNFhBFAb1M8xy7o+cX5gIsphrBRiGGM9MBhQNea2cH3flKW9NPKdvH3dF0sv/OGDQwKBgQClV60JpDZtdCUcwjPn5+6y+oedmnK6r+Q7MvDTFrMGmhVCJnin2Vzo2RvfDOAO89drBaDtZj/Cw+y4icP831toNdkjsAczVOdHgL3w8pCffpNeg2zkRoC+vIw2pGh3nqija5rB2taa1vGmtVK817W98jj5YvK6+G0jLMppT/oPHQKBgQC7S3Ai02Jvabbq5uIIeqNtxwF8wsRyD9CzVR9f11/Elu5mMMiV4y+tPQQKZDVm1EwUKQLrk9OYU56rYZ9xb7XMwRKgvQ++TQJK3JxqksbfFHCNm+33HnR5CE1b9hD938ny+7PIfSGnsNJF/ceOgf/IXXlTgg9favh1Y0ketr3zBQKBgFKWHvw/i1j4F/6vQIBn4ke22Ja8qXDNLfIUEcgqqvIx5N6Imv8DLyvu56CWveThVzk810VHRqoJ3aIgA8oTs/mQyd8G/S8jbyufl2GeoHap9azSr63HZh4v8ZBMQuA6xP2CEUByEyIWknwo7pp9yj8gJZUFmvTthY6SvkYrqg1H"; logger.info("私钥string:" + privateKeyString); String cleanedBase64String = privateKeyString.replaceAll("[^A-Za-z0-9+/=]", ""); + try { PrivateKey privateKey = RSAUtil.getPrivateKeyFromString(cleanedBase64String); - logger.info("私钥:" + privateKey); + logger.info("通过私钥获取获取秘钥:{}", privateKey); String user = RSAUtil.decrypt(userName, privateKey); logger.info("SSO用户名:" + user); result.setUser(user); result.setSucess(true); logger.info("SSO用户登录成功,进入苍穹系统"); } catch (Exception e) { - logger.info("私钥解密异常:{}", e); + logger.info("私钥获取密钥异常,异常信息:{}", e); ErrorCode errorCode = new ErrorCode("error_code", "私钥解密出现异常,请联系运维人员排查!"); throw new KDException(errorCode, e); } diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java index 2839dfa..8524d86 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java @@ -118,6 +118,10 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin { // 生成JSON if ("shkd_generatejson".equals(itemKey)) { + if (billObject == null) { + this.getView().showTipNotification("未查询到具体推送单据"); + return; + } String requestBody = ApiService.assembleRequestBody(billObject, dataEntity); codeEdit.setText(format(requestBody)); }