use of com.itrus.portal.db.SysConfig in project portal by ixinportal.
the class SystemConfigService method getCdnUrl.
/**
* 获取CDN地址
* @return
*/
public String getCdnUrl() {
String type = SystemConfigService.CDN_URL;
SysConfig sysConfig = sqlSession.selectOne("com.itrus.portal.db.SysConfigMapper.selectByType", type);
if (sysConfig != null) {
return sysConfig.getConfig();
} else {
return null;
}
}
use of com.itrus.portal.db.SysConfig in project portal by ixinportal.
the class SystemConfigService method getpdfsrc.
public String getpdfsrc() {
String type = SystemConfigService.PDF_SRC;
SysConfig sysConfig = sqlSession.selectOne("com.itrus.portal.db.SysConfigMapper.selectByType", type);
if (sysConfig != null) {
return sysConfig.getConfig();
} else {
return null;
}
}
use of com.itrus.portal.db.SysConfig in project portal by ixinportal.
the class SystemConfigService method isTimedTaskHost.
/**
* 判断本机是否是定时任务的执行主机,是则返回true,不是则返回false
* hgh
* @return
*/
public Boolean isTimedTaskHost() {
Boolean flag = false;
SysConfig sysConfigHost = getRainfoHost();
if (null == sysConfigHost) {
// 没有配置,直接返回
return flag;
}
String host = sysConfigHost.getConfig();
host = host.replaceAll(" ", "");
String[] hosts = host.split(",");
// 获取本机主机名称
InetAddress ia = null;
try {
ia = ia.getLocalHost();
} catch (UnknownHostException e1) {
e1.printStackTrace();
return flag;
}
String hostName = ia.getHostName();
boolean flag_check = false;
for (String str : hosts) {
if (hostName.equals(str.replaceAll(" ", ""))) {
return true;
}
}
// 判断本地主机名称是否与系统配置的同步主机名称一致,不一致则返回
if (!flag_check) {
return flag;
}
return flag;
}
use of com.itrus.portal.db.SysConfig in project portal by ixinportal.
the class SystemConfigService method getEnclosureUrl.
public String getEnclosureUrl() throws Exception {
// 读取系统配置信息 获取附加文件地址
String type = SystemConfigService.ENCLOSURE;
SysConfig sysConfig = sqlSession.selectOne("com.itrus.portal.db.SysConfigMapper.selectByType", type);
if (sysConfig != null) {
return sysConfig.getConfig();
} else {
throw new Exception("没有配置终端后台地址!");
}
}
use of com.itrus.portal.db.SysConfig in project portal by ixinportal.
the class SystemConfigService method getMaxImageProject.
public Long getMaxImageProject() {
// 读取系统配置信息 获取个人实名认证地址
String type = SystemConfigService.MAX_IMAGE_PROJECT;
SysConfig sysConfig = sqlSession.selectOne("com.itrus.portal.db.SysConfigMapper.selectByType", type);
if (sysConfig != null) {
return Long.parseLong(sysConfig.getConfig());
} else {
return null;
}
}
Aggregations