|
@@ -45,6 +45,9 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+import static com.tzld.longarticle.recommend.server.common.constant.TimeConstant.MILLISECOND_DAY;
|
|
|
+import static com.tzld.longarticle.recommend.server.common.constant.TimeConstant.MILLISECOND_HOUR;
|
|
|
+
|
|
|
@Service
|
|
|
@Slf4j
|
|
|
public class XxlJobService {
|
|
@@ -302,9 +305,9 @@ public class XxlJobService {
|
|
|
@XxlJob("alertPushMessageJob")
|
|
|
public ReturnT<String> alertPushMessageJob(String param) {
|
|
|
long endTimestamp = System.currentTimeMillis();
|
|
|
- long startTimestamp = endTimestamp - 1000 * 60 * 60;
|
|
|
- long ytdStartTimestamp = startTimestamp - 1000 * 60 * 60 * 24;
|
|
|
- long ytdEndTimestamp = endTimestamp - 1000 * 60 * 60 * 24;
|
|
|
+ long startTimestamp = endTimestamp - MILLISECOND_HOUR;
|
|
|
+ long ytdStartTimestamp = startTimestamp - MILLISECOND_DAY;
|
|
|
+ long ytdEndTimestamp = endTimestamp - MILLISECOND_DAY;
|
|
|
PushMessageCallbackExample example = new PushMessageCallbackExample();
|
|
|
example.createCriteria().andCreateTimeBetween(new Date(startTimestamp), new Date(endTimestamp));
|
|
|
long nowCount = pushMessageCallbackMapper.countByExample(example);
|