调整金额

This commit is contained in:
2026-02-04 09:55:09 +08:00
parent 19a8dc1a48
commit 3f4e0b8f8f
7 changed files with 8 additions and 35 deletions

BIN
bocai.db

Binary file not shown.

View File

@@ -62,9 +62,6 @@ public class ChartController {
List<String> labels = new ArrayList<>();
List<Double> data = new ArrayList<>();
// 计算累计盈亏
double totalProfit = 0.0;
// 遍历每5分钟间隔
Calendar intervalCalendar = (Calendar) calendar.clone();
while (intervalCalendar.getTime().before(currentTime)) {
@@ -79,20 +76,12 @@ public class ChartController {
intervalProfit += item.getResultAmount();
}
}
// 更新总盈亏
totalProfit = intervalProfit;
data.add(totalProfit);
data.add(intervalProfit);
// 增加5分钟
intervalCalendar.add(Calendar.MINUTE, 5);
}
// 添加当前时间点的数据
if (!labels.isEmpty()) {
String currentTimeLabel = DateFormatUtils.format(currentTime, "HH:mm");
labels.add(currentTimeLabel);
data.add(totalProfit);
}
// 如果没有今日数据生成默认的5分钟间隔数据

View File

@@ -41,7 +41,7 @@ public class BetSchedule {
private BetRecordRepository betRecordRepository;
// 从7:02分钟起每5分钟执行一次
@Scheduled(cron = "30 2/5 * * * ?")
// @Scheduled(cron = "30 2/5 * * * ?")
public void placeBet() {
LocalDateTime now = LocalDateTime.now();
int hour = now.getHour();

View File

@@ -43,7 +43,7 @@ public class CrawlerSchedule {
/*@Scheduled(cron = "0 6-59/5 7-23 * * ?")
@Scheduled(cron = "0 0-55/5 0-6 * * ?")*/
// 从7:00分30秒起每5分钟执行一次
@Scheduled(cron = "30 0/5 * * * ?")
// @Scheduled(cron = "30 0/5 * * * ?")
public void executeLotteryDraw() {
log.info("开始爬取开奖结果");
int retryCount = 0;
@@ -110,7 +110,7 @@ public class CrawlerSchedule {
}
@Scheduled(cron = "55 0/5 * * * ?")
// @Scheduled(cron = "55 0/5 * * * ?")
//@Scheduled(cron = "*/9 * * * * ?")
public void executePksHistory() {
log.info("开始获取历史开奖结果");

View File

@@ -125,7 +125,7 @@ public class ExBetScriptSchedule {
}
// 从7:01分钟起每5分钟执行一次
@Scheduled(cron = "30 1/5 * * * ?")
// @Scheduled(cron = "30 1/5 * * * ?")
public void executePythonScript() {
LocalDateTime now = LocalDateTime.now();
int hour = now.getHour();

View File

@@ -4,22 +4,6 @@ import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import lombok.extern.slf4j.Slf4j;
import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.apache.hc.client5.http.config.RequestConfig;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
import org.apache.hc.client5.http.impl.classic.HttpClients;
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager;
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
import org.apache.hc.core5.http.HttpEntity;
import org.apache.hc.core5.http.ParseException;
import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.apache.hc.core5.ssl.SSLContexts;
import org.apache.hc.core5.ssl.TrustStrategy;
import org.apache.hc.core5.util.Timeout;
import org.springframework.beans.factory.annotation.Value;
import javax.net.ssl.SSLContext;
import java.io.BufferedReader;

View File

@@ -10,4 +10,4 @@ spring.jpa.show-sql=true
spring.jpa.database-platform=org.hibernate.community.dialect.SQLiteDialect
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
pypath:c:/py/PyModel
pypath:D:/py/PyModel