mobile download

This commit is contained in:
Macbook
2026-05-28 14:44:19 +09:00
parent e2816b037f
commit 3503ef33f5
152 changed files with 11021 additions and 687 deletions
@@ -67,6 +67,11 @@ public class StrategyConditionTimeframeService {
GcStrategy strategy = opt.get();
ensureDslRepaired(strategy);
Set<String> fromFlowLayout = collectFromFlowLayoutJson(strategy.getFlowLayoutJson());
if (!fromFlowLayout.isEmpty()) {
return fromFlowLayout;
}
Set<String> buyOut = new LinkedHashSet<>();
Set<String> sellOut = new LinkedHashSet<>();
boolean buyScoped = collectStartScopeFromJson(strategy.getBuyConditionJson(), buyOut);
@@ -241,4 +246,33 @@ public class StrategyConditionTimeframeService {
out.add(ct);
}
}
/** flow_layout_json.startMeta — 편집기 Logic Expression·START 분봉 (DSL과 동기 저장) */
private Set<String> collectFromFlowLayoutJson(String flowLayoutJson) {
Set<String> out = new LinkedHashSet<>();
if (flowLayoutJson == null || flowLayoutJson.isBlank()) return out;
try {
JsonNode root = objectMapper.readTree(flowLayoutJson);
for (String side : new String[] { "buy", "sell" }) {
JsonNode startMeta = root.path(side).path("startMeta");
if (!startMeta.isObject()) continue;
startMeta.fields().forEachRemaining(entry -> {
JsonNode meta = entry.getValue();
JsonNode types = meta.path("candleTypes");
if (types.isArray() && !types.isEmpty()) {
for (JsonNode t : types) {
String ct = LiveStrategyTimeframeService.normalize(t.asText(""));
if (!ct.isBlank()) out.add(ct);
}
} else {
String ct = LiveStrategyTimeframeService.normalize(meta.path("candleType").asText(""));
if (!ct.isBlank()) out.add(ct);
}
});
}
} catch (Exception e) {
log.warn("[StrategyTimeframes] flow_layout_json 파싱 실패: {}", e.getMessage());
}
return out;
}
}