|
@@ -311,14 +311,17 @@ public class XxlJobService {
|
|
|
PushMessageCallbackExample example = new PushMessageCallbackExample();
|
|
|
example.createCriteria().andCreateTimeBetween(new Date(startTimestamp), new Date(endTimestamp));
|
|
|
long nowCount = pushMessageCallbackMapper.countByExample(example);
|
|
|
- if(nowCount == 0){
|
|
|
+ if (nowCount == 0) {
|
|
|
LarkRobotUtil.sendMessage("最近一小时回调消息为0");
|
|
|
}
|
|
|
PushMessageCallbackExample ytdExample = new PushMessageCallbackExample();
|
|
|
ytdExample.createCriteria().andCreateTimeBetween(new Date(ytdStartTimestamp), new Date(ytdEndTimestamp));
|
|
|
long ydtCount = pushMessageCallbackMapper.countByExample(example);
|
|
|
- if(nowCount + 1000 < ydtCount){
|
|
|
- LarkRobotUtil.sendMessage("最近一小时回调消息量:" + nowCount + "\n" + "昨日消息回调量:" + ydtCount);
|
|
|
+ if (nowCount + 1000 < ydtCount) {
|
|
|
+ double res = ((double) nowCount - ydtCount) * 100 / ydtCount;
|
|
|
+ LarkRobotUtil.sendMessage("最近一小时回调消息量:" + nowCount + "\n"
|
|
|
+ + "昨日消息回调量:" + ydtCount + "\n"
|
|
|
+ + "百分比为:" + String.format("%.2f", res) + "%");
|
|
|
}
|
|
|
return ReturnT.SUCCESS;
|
|
|
}
|