...
|
...
|
@@ -49,24 +49,25 @@ public class AlarmSendVoiceTask { |
|
|
DEBUG.info("alarmSendVoice task sms count = {}", count);
|
|
|
|
|
|
|
|
|
if (count > 5) {//大于无
|
|
|
//todo 查询是否需要语音通知
|
|
|
if (count > 5) {//大于5
|
|
|
boolean needVoice = true;
|
|
|
|
|
|
// QueryResult queryResult1 = smsUpMapper.select(30);
|
|
|
// int voiceCount = QueryResultUtil.getCount(queryResult1);
|
|
|
QueryResult queryResult1 = smsUpMapper.select(30);
|
|
|
int voiceCount = QueryResultUtil.getCount(queryResult1);
|
|
|
|
|
|
// DEBUG.info("alarmSendVoice task sms voiceCount = {}", voiceCount);
|
|
|
DEBUG.info("alarmSendVoice task sms voiceCount = {}", voiceCount);
|
|
|
|
|
|
// if (voiceCount > 0) {
|
|
|
if (voiceCount > 0) {
|
|
|
needVoice = false;
|
|
|
}else {
|
|
|
if (lastTime == 0) {
|
|
|
lastTime = now;
|
|
|
} else {
|
|
|
if (now - lastTime < 10 * 60 * 1000) {//三十分钟内不再发送
|
|
|
if (now - lastTime < 10 * 60 * 1000) {//十分钟内不再发送
|
|
|
needVoice = false;
|
|
|
}
|
|
|
}
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
if (needVoice) {
|
|
|
lastTime = now;
|
...
|
...
|
|