Stringcql="select * from ctid_prof.alarm_log where state = '"+Constant.ALARM_RECOVERY+"' and serialnum<'"+flag+"' order by alatime desc limit "+size+" allow filtering;";
Stringcql="select * from ctid_prof.alarm_log where state = '"+Constant.ALARM_RECOVERY+"' and serialnum<"+flag+" order by alatime desc limit "+size+" allow filtering;";
returntemplate.select(cql,AlarmLog.class);
}
...
...
@@ -75,18 +75,17 @@ public class CassandraDaoImpl {
/*变更告警信息(已启用)*/
/* public boolean updateAlarm(String serialnum,String time) {
String cql="update ctid_prof.alarm_log set rectime = '"+time+"' , state = '" +Constant.ALARM_RECOVERY +"', alarm_level = '"+Constant.ALARM_OK+"' where serialnum = '"+serialnum +"'";
@@ -94,6 +93,11 @@ public class CassandraDaoImpl {
returntemplate.selectOne(cql,Map.class);
}
publicvoiddelAlarmMsg(AlarmMsgalarmMsg){
Stringcql="DELETE FROM ctid_prof.alarm_msg WHERE state='"+alarmMsg.getState()+"' AND alatime='"+alarmMsg.getAlatime()+"' AND serialnum="+alarmMsg.getSerialnum()+" ;";
template.getCqlOperations().execute(cql);
}
publicAdminfindByUsername(Stringusername){
Stringcql="SELECT * FROM ctid_prof.admin where username = '"+username+"';";
returntemplate.selectOne(cql,Admin.class);
...
...
@@ -125,18 +129,18 @@ public class CassandraDaoImpl {
Stringcql="select * from ctid_prof.alarm_log where alatime > '"+start+"' and alatime < '"+end+"'and state = '"+Constant.ALARM_RECOVERY+"' and serialnum<'"+flag+"' order by alatime desc limit "+size+" allow filtering";
Stringcql="select * from ctid_prof.alarm_log where alatime > '"+start+"' and alatime < '"+end+"'and state = '"+Constant.ALARM_RECOVERY+"' and serialnum<"+flag+" order by alatime desc limit "+size+" allow filtering";
Stringcql="select * from ctid_prof.alarm_log where ip like '%"+ip+"%' and state = '"+Constant.ALARM_RECOVERY+"' and serialnum<'"+flag+"' order by alatime desc limit "+size+" allow filtering";
Stringcql="select * from ctid_prof.alarm_log where ip like '%"+ip+"%' and state = '"+Constant.ALARM_RECOVERY+"' and serialnum<"+flag+" order by alatime desc limit "+size+" allow filtering";
Stringcql="select * from ctid_prof.alarm_log where ip like '%"+ip+"%' and alatime>'"+start+"' and alatime <'"+end+"' and state = '"+Constant.ALARM_RECOVERY+"' and serialnum<'"+flag+"' limit "+size+" allow filtering";
Stringcql="select * from ctid_prof.alarm_log where ip like '%"+ip+"%' and alatime>'"+start+"' and alatime <'"+end+"' and state = '"+Constant.ALARM_RECOVERY+"' and serialnum<"+flag+" limit "+size+" allow filtering";