jinpengyong
2021-06-30 e6c6e6225bdbaaa27bcde320a79acde8239416c2
screen-job/src/main/java/com/moral/api/task/HistoryTableInsertTask.java
@@ -30,17 +30,6 @@
    @XxlJob("insertHistoryFiveMinutely")
    public ReturnT insertHistoryFiveMinutely() {
        try {
           /* List<Map<String, Object>> list = new ArrayList<>();
            Map<String, Object> map = new HashMap<>();
            map.put("mac", "123456");
            Date date = new Date();
            map.put("time", date);
            Map<String, Object> value = new HashMap<>();
            value.put("e1", 10);            value.put("e2", 20);
            map.put("value", JSON.toJSONString(value));
            list.add(map);
            String timeUnits = DateUtils.dateToDateString(date, DateUtils.yyyyMM_EN);*/
            historyFiveMinutelyService.insertHistoryFiveMinutely();
        } catch (Exception e) {
            XxlJobHelper.log(e.getMessage());
@@ -53,18 +42,7 @@
    @XxlJob("insertHistoryDaily")
    public ReturnT insertHistoryDaily() {
        try {
            List<HistoryDaily> list = new ArrayList<>();
            HistoryDaily historyDaily = new HistoryDaily();
            historyDaily.setMac("123456");
            historyDaily.setTime(new Date());
            Map<String, Object> value = new HashMap<>();
            value.put("e1", 1);
            value.put("e2", 2);
            historyDaily.setValue(JSON.toJSONString(value));
            for (int i = 0; i < 20000; i++) {
                list.add(historyDaily);
            }
            historyDailyService.insertHistoryDaily(list);
            historyDailyService.insertHistoryDaily();
        } catch (Exception e) {
            XxlJobHelper.log(e.getMessage());
            return ReturnT.FAIL;