@@ -53,4 +55,24 @@ public class CassandraDaoImpl {
// public List<CTID_Process_Perf_BaseLineValue> getProBLV() {
// return template.select("select * from ctid_prof.ctid_process_perf_base_line_value;", CTID_Process_Perf_BaseLineValue.class);
// }
publicList<AlarmLog>getAlarmLog(){
Stringcql="select * from ctid_prof.alarm_log where state in ("+Constant.ALARM_CHANGE+","+Constant.ALARM_RECOVERY+")";
returntemplate.select(cql,AlarmLog.class);
}
publicList<AlarmLog>getAlarmList(){
Stringcql="select * from ctid_prof.alarm_log where state = "+Constant.ALARM_ING;
returntemplate.select(cql,AlarmLog.class);
}
publicAlarmLogcheckAlarm(Stringip,Stringport){
Stringcql="select * from ctid_prof.alarm_log where ip = "+ip+" and port ="+port+" and state = "+Constant.ALARM_ING;
returntemplate.selectOne(cql,AlarmLog.class);
}
publicbooleanupdateAlarm(Stringserialnum){
Stringcql="update from ctid_prof.alarm_log set state = "+Constant.ALARM_RECOVERY+"and alarm_level = "+Constant.ALARM_OK+"where serialnum = "+serialnum;