From 71ca217fd75850486ced40d55ecda418f801d248 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期二, 03 三月 2026 09:47:29 +0800
Subject: [PATCH] 普禾煤矿phmk+通源煤矿tymk上传(登录日志),韦德wdsy+基智zjyj上传(电+登录日志)
---
src/main/java/com/ruoyi/api/ScheduledApi.java | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/ruoyi/api/ScheduledApi.java b/src/main/java/com/ruoyi/api/ScheduledApi.java
index c6e394b..d315f1a 100644
--- a/src/main/java/com/ruoyi/api/ScheduledApi.java
+++ b/src/main/java/com/ruoyi/api/ScheduledApi.java
@@ -42,6 +42,12 @@
@Value("${api.electricityCost}")
private Double electricityCost;
+ @Value("${api.loginPush}")
+ private boolean loginPush;
+
+ @Value("${api.push}")
+ private boolean push;
+
@Autowired
private Api api;
@@ -52,8 +58,13 @@
private static final Random RANDOM = new Random();
//鎺ㄩ�佺櫥褰曟棩蹇楁瘡鍛�
-// @Scheduled(cron = "0 0 1 ? * 1")
+ @Scheduled(cron = "0 0 1 ? * 1")
public void logging(){
+ log.info("create---杩涘叆鎺ㄩ�佺櫥褰曟棩蹇�......");
+ if (!loginPush){
+ return;
+ }
+ log.info("loginPush---寮�濮嬫帹閫佺櫥褰曟棩蹇�......");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:dd");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//鑾峰彇鐧诲綍鏃ュ織
@@ -83,8 +94,13 @@
}
//鎺ㄩ�佺數姣忔湀
-// @Scheduled(cron = "0 0 1 1 * ?")
+ @Scheduled(cron = "0 0 1 1 * ?")
public void electricity(){
+ log.info("create---杩涘叆鎺ㄩ�佺數姣忔湀......");
+ if (!push){
+ return;
+ }
+ log.info("electricity---寮�濮嬫帹閫佺數姣忔湀......");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:dd");
//鑾峰彇鐧诲綍鏃ュ織
List<ElectricityDto> electricityDtos = new ArrayList<>();
--
Gitblit v1.9.3