删除无用的方法

This commit is contained in:
zhangxin10 2015-12-15 22:13:39 +08:00
parent 763aafc2a8
commit a962f90b59
2 changed files with 0 additions and 30 deletions

View File

@ -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();
}
}
}
}

View File

@ -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);
}
}