大象工具类优化

beta-prop-all^2
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配置参数
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() : ""
: "";
}
}