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);
}
publicList<AlarmLog>getAlarmLog(intsize){
Stringcql="select * from ctid_prof.alarm_log where state = '"+Constant.ALARM_RECOVERY+"' order by alatime desc limit "+size+" allow filtering;";
Stringcql="select * from ctid_prof.alarm_log where state = '"+Constant.ALARM_ING+"' and serialnum<"+flag+" order by alatime desc limit "+size+" allow filtering;";
returntemplate.select(cql,AlarmLog.class);
returntemplate.select(cql,AlarmLog.class);
}
}
publicList<AlarmLog>getAlarmLogList(){
publicList<AlarmLog>getAlarmLogList(){
Stringcql="select * from ctid_prof.alarm_log where state = '"+Constant.ALARM_RECOVERY+"' allow filtering";
Stringcql="select * from ctid_prof.alarm_log where state = '"+Constant.ALARM_RECOVERY+"' order by alatime desc allow filtering";
returntemplate.select(cql,AlarmLog.class);
returntemplate.select(cql,AlarmLog.class);
}
}
publicList<AlarmMsg>getAlarmMsgList(){
publicList<AlarmMsg>getAlarmMsgList(){
...
@@ -145,32 +155,32 @@ public class CassandraDaoImpl {
...
@@ -145,32 +155,32 @@ public class CassandraDaoImpl {
}
}
publicMapgetAlarmLogSize(Stringstart,Stringend){
publicMapgetAlarmLogSize(Stringstart,Stringend){
Stringcql="select count(*) from ctid_prof.alarm_log where alatime > '"+start+"' and alatime < '"+end+"' and state < '"+Constant.ALARM_ING+"' allow filtering";
Stringcql="select count(*) from ctid_prof.alarm_log where alatime > '"+start+"' and alatime < '"+end+"' and state = '"+Constant.ALARM_RECOVERY+"' allow filtering";
Stringcql="select * from ctid_prof.alarm_log where alatime > '"+start+"' and alatime < '"+end+"' and state < '"+Constant.ALARM_ING+"' limit "+limitNum+" allow filtering";
Stringcql="select * from ctid_prof.alarm_log where alatime > '"+start+"' and alatime < '"+end+"' and state = '"+Constant.ALARM_RECOVERY+"' allow filtering";
returntemplate.select(cql,AlarmLog.class);
returntemplate.select(cql,AlarmLog.class);
}
}
publicMapgetAlarmLogSize(Stringip){
publicMapgetAlarmLogSize(Stringip){
Stringcql="select count(*) from ctid_prof.alarm_log where ip like '%"+ip+"%' and state < '"+Constant.ALARM_ING+"' allow filtering";
Stringcql="select count(*) from ctid_prof.alarm_log where ip like '%"+ip+"%' and state = '"+Constant.ALARM_RECOVERY+"' allow filtering";
Stringcql="select count(*) from ctid_prof.alarm_log where ip like '%"+ip+"%' and alatime > '"+start+"' and alatime <'"+end+"' and state < '"+Constant.ALARM_ING+"' allow filtering";
Stringcql="select count(*) from ctid_prof.alarm_log where ip like '%"+ip+"%' and alatime > '"+start+"' and alatime <'"+end+"' and state = '"+Constant.ALARM_RECOVERY+"' allow filtering";
Stringcql="select * from ctid_prof.alarm_log where ip like '%"+ip+"%' and alatime > '"+start+"' and alatime <'"+end+"' and state < '"+Constant.ALARM_ING+"' limit "+limitNum+" allow filtering";
Stringcql="select * from ctid_prof.alarm_log where ip like '%"+ip+"%' and alatime > '"+start+"' and alatime <'"+end+"' and state = '"+Constant.ALARM_RECOVERY+"' allow filtering";