From 5e9129373399e9cc3bdecf9b8365e1c6b6b0ecdd Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Wed, 21 Oct 2020 13:28:19 +0800 Subject: [PATCH] 修改时间bug --- src/main/java/com/moral/task/HistoryMinutelySubTableTask.java | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/moral/task/HistoryMinutelySubTableTask.java b/src/main/java/com/moral/task/HistoryMinutelySubTableTask.java index 1a3589a..1e77ceb 100644 --- a/src/main/java/com/moral/task/HistoryMinutelySubTableTask.java +++ b/src/main/java/com/moral/task/HistoryMinutelySubTableTask.java @@ -1,18 +1,21 @@ package com.moral.task; -import com.moral.service.HistoryMinutelyService; -import com.xxl.job.core.biz.model.ReturnT; -import org.springframework.format.datetime.joda.LocalDateTimeParser; -import org.springframework.stereotype.Component; +import java.time.LocalDateTime; import javax.annotation.Resource; -import java.time.LocalDateTime; + +import com.moral.service.HistoryMinutelyService; +import com.xxl.job.core.biz.model.ReturnT; +import com.xxl.job.core.handler.annotation.XxlJob; + +import org.springframework.stereotype.Component; @Component public class HistoryMinutelySubTableTask { @Resource private HistoryMinutelyService historyMinutelyService; - public ReturnT createHistoryMinutelyTb(){ + @XxlJob("createHistoryMinutelyTb") + public ReturnT createHistoryMinutelyTb(String param){ LocalDateTime time=LocalDateTime.now(); LocalDateTime time1 = time.plusMonths(1); String year = String.valueOf(time1.getYear()); @@ -22,7 +25,7 @@ } String yearAndMonth=year+month; historyMinutelyService.createHistoryMinutelyTable(yearAndMonth); - ReturnT returnT = new ReturnT(); + ReturnT returnT = new ReturnT(500, "���������������"); return returnT; } } -- Gitblit v1.8.0