Search in sources :

Example 6 with SysConfig

use of com.itrus.portal.db.SysConfig in project portal by ixinportal.

the class SystemConfigService method getClientfwPayConfigIds.

/**
 * @return
 * @throws Exception
 */
public String getClientfwPayConfigIds() {
    // 读取系统配置信息 获取个人实名认证AppId
    String type = SystemConfigService.CLIENT_FW_PAY_CONFIG_IDS;
    SysConfig sysConfig = sqlSession.selectOne("com.itrus.portal.db.SysConfigMapper.selectByType", type);
    if (sysConfig != null) {
        return sysConfig.getConfig();
    }
    return "";
}
Also used : SysConfig(com.itrus.portal.db.SysConfig)

Example 7 with SysConfig

use of com.itrus.portal.db.SysConfig in project portal by ixinportal.

the class SystemConfigService method getappConfig.

public String getappConfig() {
    String type = SystemConfigService.APP_ID;
    SysConfig sysConfig = sqlSession.selectOne("com.itrus.portal.db.SysConfigMapper.selectByType", type);
    if (sysConfig != null) {
        return sysConfig.getConfig();
    } else {
        return null;
    }
}
Also used : SysConfig(com.itrus.portal.db.SysConfig)

Example 8 with SysConfig

use of com.itrus.portal.db.SysConfig in project portal by ixinportal.

the class SystemConfigService method getPersonProject.

public Long getPersonProject() {
    // 读取系统配置信息 获取个人实名认证地址
    String type = SystemConfigService.PERSON_PROJECT;
    SysConfig sysConfig = sqlSession.selectOne("com.itrus.portal.db.SysConfigMapper.selectByType", type);
    if (sysConfig != null) {
        return Long.parseLong(sysConfig.getConfig());
    } else {
        return 101L;
    }
}
Also used : SysConfig(com.itrus.portal.db.SysConfig)

Example 9 with SysConfig

use of com.itrus.portal.db.SysConfig in project portal by ixinportal.

the class SystemConfigService method getDir.

/**
 * 获取指定配置目录信息
 * @param logType  日志记录类型
 * @param configType    配置类型
 * @return
 * @throws Exception 当配置不存在、指定目录不存在、指定目录不能读取时抛出异常
 */
public File getDir(String logType, String configType) throws Exception {
    String dirname = "";
    SysConfig sysConfig = sqlSession.selectOne("com.itrus.portal.db.SysConfigMapper.selectByType", configType);
    if (sysConfig != null) {
        dirname = sysConfig.getConfig();
    } else {
        throw new Exception("没有配置存放目录!");
    }
    File softDir = new File(dirname);
    // 判断指定目录是否存在,是否有读写权限
    if (!softDir.exists() || !softDir.canRead()) {
        LogUtil.syslog(sqlSession, logType, "【" + dirname + "】目录不存在或权限不足");
        throw new Exception("【" + dirname + "】目录不存在或权限不足");
    }
    return softDir;
}
Also used : SysConfig(com.itrus.portal.db.SysConfig) File(java.io.File) UnknownHostException(java.net.UnknownHostException)

Example 10 with SysConfig

use of com.itrus.portal.db.SysConfig in project portal by ixinportal.

the class SystemConfigService method getPersonUrl.

public String getPersonUrl() throws Exception {
    // 读取系统配置信息 获取个人实名认证地址
    String type = SystemConfigService.PERSON_URL;
    SysConfig sysConfig = sqlSession.selectOne("com.itrus.portal.db.SysConfigMapper.selectByType", type);
    if (sysConfig != null) {
        return sysConfig.getConfig();
    } else {
        throw new Exception("没有配置个人实名认证地址!");
    }
}
Also used : SysConfig(com.itrus.portal.db.SysConfig) UnknownHostException(java.net.UnknownHostException)

Aggregations

SysConfig (com.itrus.portal.db.SysConfig)33 UnknownHostException (java.net.UnknownHostException)15 InetAddress (java.net.InetAddress)9 HashMap (java.util.HashMap)7 Date (java.util.Date)5 Scheduled (org.springframework.scheduling.annotation.Scheduled)5 UserInfoServiceException (com.itrus.portal.exception.UserInfoServiceException)3 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)3 ApplicationInfo (com.itrus.portal.db.ApplicationInfo)2 Charging (com.itrus.portal.db.Charging)2 Product (com.itrus.portal.db.Product)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 LinkedMultiValueMap (org.springframework.util.LinkedMultiValueMap)2 JSONObject (com.alibaba.fastjson.JSONObject)1 AppService (com.itrus.portal.db.AppService)1 AuditSystemConfig (com.itrus.portal.db.AuditSystemConfig)1 AuditSystemConfigExample (com.itrus.portal.db.AuditSystemConfigExample)1 Bill (com.itrus.portal.db.Bill)1 BusinessLicense (com.itrus.portal.db.BusinessLicense)1 Certification (com.itrus.portal.db.Certification)1