xueyiming vor 8 Monaten
Ursprung
Commit
54145a5688

+ 3 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/XxlJobService.java

@@ -318,6 +318,9 @@ public class XxlJobService {
         ytdExample.createCriteria().andCreateTimeBetween(new Date(ytdStartTimestamp), new Date(ytdEndTimestamp));
         long ydtCount = pushMessageCallbackMapper.countByExample(example);
         if (nowCount + 1000 < ydtCount) {
+            if (ydtCount == 0) {
+                ydtCount = 1L;
+            }
             double res = ((double) nowCount - ydtCount) * 100 / ydtCount;
             LarkRobotUtil.sendMessage("最近一小时回调消息量:" + nowCount + "\n"
                     + "昨日消息回调量:" + ydtCount + "\n"