From 4867b88fc2b45a7f9bf9fc112f012aad7dc93109 Mon Sep 17 00:00:00 2001 From: kk <1910333201@qq.com> Date: Wed, 27 Sep 2023 17:23:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E8=B1=A1=E5=B7=A5=E5=85=B7=E7=B1=BB?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utils/elephant/ElephantCompanyserviceUtils.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jianshui-income/src/main/java/com/jianshui/income/utils/elephant/ElephantCompanyserviceUtils.java b/jianshui-income/src/main/java/com/jianshui/income/utils/elephant/ElephantCompanyserviceUtils.java index 35df3fa..58bee9b 100644 --- a/jianshui-income/src/main/java/com/jianshui/income/utils/elephant/ElephantCompanyserviceUtils.java +++ b/jianshui-income/src/main/java/com/jianshui/income/utils/elephant/ElephantCompanyserviceUtils.java @@ -112,9 +112,10 @@ public class ElephantCompanyserviceUtils { //获取token配置参数 CompanyserviceProp propAuthKey = propService.selectPropByKey(companyservices.getCompanyid(), "elephant_income_appkey"); - String propAuthKeyS = getValue(propAuthKey.getValue()); + String propAuthKeyS = getValue(propAuthKey); CompanyserviceProp propAuthSecret = propService.selectPropByKey(companyservices.getCompanyid(), "elephant_income_appsecret"); - String propAuthSecretS = getValue(propAuthSecret.getValue()); + + String propAuthSecretS = getValue(propAuthSecret); if (StrUtil.isEmpty(propAuthKeyS) || StrUtil.isEmpty(propAuthSecretS)) { jedis.close(); @@ -146,8 +147,10 @@ public class ElephantCompanyserviceUtils { * @param obje * @return */ - public static String getValue(Object obje) { - return obje != null ? obje.toString() : ""; + public static String getValue(CompanyserviceProp prop) { + return prop != null ? + prop.getValue() != null ? prop.getValue() : "" + : ""; } }