public void process() { logger.info("开始更新足球赛程赛果"); long startmillis = System.currentTimeMillis(); processDateAndSclassID(DateUtil.getPreDate(2), null, true); processDateAndSclassID(DateUtil.getPreDate(1), null, true); processDateAndSclassID(new Date(), null, true); processDateAndSclassID(DateUtil.getAfterDate(1), null, true); processDateAndSclassID(DateUtil.getAfterDate(2), null, true); processDateAndSclassID(DateUtil.getAfterDate(3), null, true); long endmillis = System.currentTimeMillis(); logger.info("更新足球赛程赛果结束, 共用时 " + (endmillis - startmillis)); }
public void processCount(int count, int mode, boolean includeZero) { if (mode == 0) { for (int i = 0; i <= count; i++) { if (i == 0 && !includeZero) { continue; } processDateAndSclassID(DateUtil.getAfterDate(i), null, false); } } if (mode == 1) { for (int i = 0; i <= count; i++) { if (i == 0 && !includeZero) { continue; } processDateAndSclassID(DateUtil.getPreDate(i), null, false); } } }