Commit d0d8d0d6 by zt

修改

parent 2a1b40ca
......@@ -41,6 +41,8 @@ public class DbSoundsMonitorTask {
Properties properties = PropertiesUtil.getProperties(path);
String result = Sms.sendSms(accessInfo, properties.getProperty("mobile"), "警告");
logger.info(result);
}else {
logger.info("没有异常!" );
}
}
}
......@@ -49,33 +49,18 @@ public class SoundMonitorService {
String updateTime = maxId.getUpdateDate();
log.info("当前系统时间:" + new Date());
//比较时间,如果相差20分钟没有执行
//计数
int i = 0;
List<SoundInfo> list = soundsMaxIdDao.getInfo(updateTime);
for (SoundInfo soundInfo : list){
//成功且没有url的
if(soundInfo.getResult().equals("SUCCESS") && StringUtils.isEmpty(soundInfo.getDownloadUrl() ) ){
i++;
}
}
if(i != 0 && list != null){
double d = i/list.size();
if(d > 0.8){
log.info("成功率不足80%" );
log.info("{}" + soundInfo.toString());
return 1;
}
}else {
}
log.info("全部成功" );
return 2;
}
return null;
}
// public static void main(String[] args) {
// init();
// System.out.println(test());
// }
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment