58 lines
1.3 KiB
Java
58 lines
1.3 KiB
Java
package config;
|
|
|
|
import com.amarsoft.aims.util.StringHelper;
|
|
import com.amarsoft.are.ARE;
|
|
import com.amarsoft.are.lang.StringX;
|
|
import com.amarsoft.dict.als.manage.CodeManager;
|
|
import com.amarsoft.dict.als.object.Item;
|
|
|
|
|
|
/**
|
|
* 接口配置数据管理
|
|
* @author EX-YANGSONG001
|
|
*
|
|
*/
|
|
public class InterfaceConfigFromDB{
|
|
|
|
public static final String CODE_CONFIG = "FixConfig";
|
|
public static final String APP_CODE_CONFIG = "APPFixConfig";
|
|
|
|
public static String getConfigItem(String itemNo){
|
|
String configValue = "";
|
|
try {
|
|
Item item = CodeManager.getItem(CODE_CONFIG, itemNo);
|
|
if(item != null)
|
|
configValue = StringHelper.nvl(item.getItemDescribe(), "");
|
|
} catch (Exception e) {
|
|
ARE.getLog().error("",e);
|
|
}
|
|
System.out.println(configValue);
|
|
return configValue;
|
|
}
|
|
|
|
/**
|
|
* 获取APP配置项信息
|
|
* @param itemNo
|
|
* @return
|
|
*/
|
|
public static String getAppConfigItem(String itemNo){
|
|
String configValue = "";
|
|
try {
|
|
Item item = CodeManager.getItem(APP_CODE_CONFIG, itemNo);
|
|
if(item != null)
|
|
configValue = StringHelper.nvl(item.getItemDescribe(), "");
|
|
} catch (Exception e) {
|
|
ARE.getLog().error("",e);
|
|
}
|
|
return configValue;
|
|
}
|
|
|
|
|
|
public static String getSysUserPwd(){
|
|
String pwd = getAppConfigItem("app.um.pwd");
|
|
if(StringX.isEmpty(pwd)){}
|
|
//pwd = CyberArkService.getCyberArkPassword(getAppConfigItem("app.um.id"));
|
|
return pwd;
|
|
}
|
|
}
|