大象工具类优化

beta-enc
kk 2 years ago
parent 7cf3213b25
commit 4867b88fc2
  1. 11
      jianshui-income/src/main/java/com/jianshui/income/utils/elephant/ElephantCompanyserviceUtils.java

@ -112,9 +112,10 @@ public class ElephantCompanyserviceUtils {
//获取token配置参数 //获取token配置参数
CompanyserviceProp propAuthKey = propService.selectPropByKey(companyservices.getCompanyid(), "elephant_income_appkey"); 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"); 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)) { if (StrUtil.isEmpty(propAuthKeyS) || StrUtil.isEmpty(propAuthSecretS)) {
jedis.close(); jedis.close();
@ -146,8 +147,10 @@ public class ElephantCompanyserviceUtils {
* @param obje * @param obje
* @return * @return
*/ */
public static String getValue(Object obje) { public static String getValue(CompanyserviceProp prop) {
return obje != null ? obje.toString() : ""; return prop != null ?
prop.getValue() != null ? prop.getValue() : ""
: "";
} }
} }

Loading…
Cancel
Save