Authored by qinchao

支付故障告警,添加上行短信判断

... ... @@ -32,6 +32,9 @@ public class AlipayTask {
@Autowired
private SnsMobileConfig snsMobileConfig;
@Autowired
private SmsUpMapper smsUpMapper;
public final Logger DEBUG = LoggerFactory.getLogger(getClass());
... ... @@ -58,11 +61,20 @@ public class AlipayTask {
if (count == 0) {
boolean needVoice = true;
if (lastTime == 0) {
lastTime = now;
} else {
if (now - lastTime < 10 * 60 * 1000) {//十分钟内不再发送
needVoice = false;
QueryResult queryResult1 = smsUpMapper.select(30);
int voiceCount = QueryResultUtil.getCount(queryResult1);
DEBUG.info("alarmSendVoice task sms voiceCount = {}", voiceCount);
if (voiceCount > 0) {
needVoice = false;
}else{
if (lastTime == 0) {
lastTime = now;
} else {
if (now - lastTime < 10 * 60 * 1000) {//十分钟内不再发送
needVoice = false;
}
}
}
... ...