update 2miners策略修改
This commit is contained in:
@@ -25,7 +25,7 @@ public class TwoMinersHashrateStrategy implements HashrateFetchStrategy {
|
||||
private LeaseOrderMiningMapper leaseOrderMiningMapper;
|
||||
|
||||
private static final String POOL_NAME = "2miners";
|
||||
private static final int DATA_INTERVAL_MINUTES = 5;
|
||||
private static final int DATA_INTERVAL_MINUTES = 30;
|
||||
|
||||
@Override
|
||||
public String getPoolName() {
|
||||
@@ -47,8 +47,16 @@ public class TwoMinersHashrateStrategy implements HashrateFetchStrategy {
|
||||
LocalDateTime queryEndTime = dto.getEndTime().plusMinutes(30);
|
||||
dto.setEndTime(queryEndTime);
|
||||
}
|
||||
List<RealHashrateInfoDto> recently24HourHashrate = leaseOrderMiningMapper.getRecently24HourHashrate(list, POOL_NAME);
|
||||
|
||||
return leaseOrderMiningMapper.getRecently24HourHashrate(list, POOL_NAME);
|
||||
//TODO 根据list中开始时间和结束时间 取recently24HourHashrate中(5分钟一个)值,如开始时间是2026-01-28 17:13:33
|
||||
// 那么取第一个值就是 2026-01-28 17:45:00点的数据,
|
||||
// 第二个就是2026-01-28 18:15:00
|
||||
// 第三个就是2026-01-28 18:45:00 以此类推。
|
||||
|
||||
return recently24HourHashrate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user