📄 sysconfig.java
字号:
package com.tssx.ebiz.sgip;
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
/**
* 从配置参数表里获取配置参数
* @author: xuke
*/
public class SysConfig {
/**
* 构造函数
*/
public SysConfig() {
super();
}
public static String getParamValue(Connection con,String moduleID, String paramName) {
Statement stmt = null;
String str=null;
try {
stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM TCMMBCFG where ModuleID='" + moduleID + "' and ParamName='" + paramName + "'");
if (rs.next()) {
str=rs.getString("ParamValue");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (stmt != null) {
stmt.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
return str;
}
public static String getParamValue(Connection con,String moduleID, String paramName, String defaultValue) {
String value = getParamValue(con, moduleID, paramName);
if (value == null) {
value = defaultValue;
}
return value;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -