| | |
| | | @Value("${api.electricityCost}") |
| | | private Double electricityCost; |
| | | |
| | | @Value("${api.loginPush}") |
| | | private boolean loginPush; |
| | | |
| | | @Value("${api.push}") |
| | | private boolean push; |
| | | |
| | | |
| | | @Autowired |
| | | private Api api; |
| | |
| | | private static final Random RANDOM = new Random(); |
| | | |
| | | //推送登录日志每周 |
| | | // @Scheduled(cron = "0 0 1 ? * 1") |
| | | @Scheduled(cron = "0 0 1 ? * 1") |
| | | public void logging(){ |
| | | if (!loginPush){ |
| | | return; |
| | | } |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:dd"); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | //获取登录日志 |
| | |
| | | } |
| | | |
| | | //推送电每月 |
| | | // @Scheduled(cron = "0 0 1 1 * ?") |
| | | @Scheduled(cron = "0 0 1 1 * ?") |
| | | public void electricity(){ |
| | | if (!push){ |
| | | return; |
| | | } |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:dd"); |
| | | //获取登录日志 |
| | | List<ElectricityDto> electricityDtos = new ArrayList<>(); |