删除无用的方法
This commit is contained in:
parent
763aafc2a8
commit
a962f90b59
|
|
@ -131,23 +131,4 @@ public class AlarmMessageDao {
|
|||
}
|
||||
return rules;
|
||||
}
|
||||
|
||||
public static String selectAppCodeByAppId(String appId) throws SQLException {
|
||||
Connection connection = DBConnectUtil.getConnection();
|
||||
try {
|
||||
PreparedStatement ps =
|
||||
connection.prepareStatement("SELECT app_code FROM application_info WHERE sts = ? AND application_info.app_id = ?");
|
||||
ps.setString(1, "A");
|
||||
ps.setString(2, appId);
|
||||
ResultSet rs = ps.executeQuery();
|
||||
rs.next();
|
||||
return rs.getString("app_code");
|
||||
} catch (SQLException e) {
|
||||
throw e;
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,15 +144,4 @@ public class AlarmMessageProcessor {
|
|||
}
|
||||
|
||||
private static Map<String, String> idCodeMapper = new ConcurrentHashMap<String, String>();
|
||||
|
||||
public static String convertAppId2AppCode(String appId) throws SQLException {
|
||||
String resultCode = idCodeMapper.get(appId);
|
||||
if (resultCode == null) {
|
||||
resultCode = AlarmMessageDao.selectAppCodeByAppId(appId);
|
||||
|
||||
idCodeMapper.put(appId, resultCode);
|
||||
}
|
||||
|
||||
return idCodeMapper.get(appId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue