fix: preset默认255

dev
huangfeng 2 months ago
parent 81165acf99
commit 3d178c47af

@ -52,15 +52,19 @@ public class StatChannel {
} }
for (ScheduleDetailsDto detail : list) { for (ScheduleDetailsDto detail : list) {
StatPreset the = null; StatPreset the = null;
Integer presetId = detail.getPreset();
if (presetId == null) {
presetId = 255;
}
for (StatPreset item : presets) { for (StatPreset item : presets) {
if (item.getPresetId().intValue() == detail.getPreset().intValue()) { if (item.getPresetId().intValue() == presetId.intValue()) {
the = item; the = item;
break; break;
} }
} }
if (the == null) { if (the == null) {
the = new StatPreset(); the = new StatPreset();
the.setPresetId(detail.getPreset()); the.setPresetId(presetId);
the.setDelay(delay); the.setDelay(delay);
presets.add(the); presets.add(the);
} }

Loading…
Cancel
Save