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() : "" + : ""; } }