| | |
| | | |
| | | @XxlJob("createHistoryTable") |
| | | public ReturnT createHistoryTable(String param) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String yearMonthDay = sdf.format(DateUtil.rollHour(new Date(),24)); |
| | | historyService.createHistoryTable(yearMonthDay); |
| | | return new ReturnT(200,"创建成功"); |
| | | try { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); |
| | | String yearMonthDay = sdf.format(DateUtil.rollHour(new Date(), 24)); |
| | | historyService.createHistoryTable(yearMonthDay); |
| | | }catch (Exception e){ |
| | | logger.error(e.getMessage()); |
| | | return new ReturnT(500,"history天表失败"); |
| | | } |
| | | return new ReturnT(200,"history天表创建成功"); |
| | | } |
| | | |
| | | } |