perf: 调整前后3分钟内的拍照都算

dev
huangfeng 2 months ago
parent 5be6a9fcc7
commit 7cf862e5b8

@ -218,6 +218,6 @@ public class Constants {
public static ConcurrentHashMap<Integer, Integer> scheduleRequestMap = new ConcurrentHashMap<>(); public static ConcurrentHashMap<Integer, Integer> scheduleRequestMap = new ConcurrentHashMap<>();
public static HashMap<Integer, String> scheduleRequestDoneMap = new HashMap<>(); public static HashMap<Integer, String> scheduleRequestDoneMap = new HashMap<>();
public static final Integer Photo_Schedule_Delay = 5; public static final Integer Photo_Schedule_Delay = 3;
} }

@ -39,16 +39,11 @@ public class ScheduleDetailsDto implements Serializable {
public boolean match(int min, int delay) { public boolean match(int min, int delay) {
int cal = this.calMinute(); int cal = this.calMinute();
if (cal == min) { int r = Math.abs(min - cal);
if (r <= delay) {
return true; return true;
} else if (cal > min) {
return false;
} else { } else {
if (cal + delay >= min) { return false;
return true;
} else {
return false;
}
} }
} }

Loading…
Cancel
Save