jinpengyong
2020-11-23 8bb914874ef1ebcda2a9c606224bf3e3db2f46f8
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;
    }
}