서버 가상매매 목록 지표없음 문제 개선
This commit is contained in:
@@ -351,19 +351,42 @@ public class LiveStrategySettingsService {
|
||||
return dto;
|
||||
}
|
||||
|
||||
/** 앱 전역 실시간 체크 ON/OFF·전략 ID를 DTO에 반영 (종목별 행과 분리) */
|
||||
/**
|
||||
* 앱 전역 실시간 템플릿 반영.
|
||||
* 전역 liveStrategyCheck+ID 가 있으면 관심종목·차트 모드 우선.
|
||||
* 없으면 가상투자 per-market 행(isLiveCheck + strategyId) 유지.
|
||||
*/
|
||||
private LiveStrategySettingsDto mergeGlobalTemplate(
|
||||
LiveStrategySettingsDto dto, GcAppSettings app, String market) {
|
||||
dto.setMarket(market);
|
||||
dto.setLiveCheck(Boolean.TRUE.equals(app.getLiveStrategyCheck()));
|
||||
dto.setStrategyId(app.getLiveStrategyId());
|
||||
boolean globalCheck = Boolean.TRUE.equals(app.getLiveStrategyCheck());
|
||||
Long globalSid = app.getLiveStrategyId();
|
||||
|
||||
if (globalCheck && globalSid != null) {
|
||||
dto.setLiveCheck(true);
|
||||
dto.setStrategyId(globalSid);
|
||||
applyGlobalExecutionFields(dto, app);
|
||||
return dto;
|
||||
}
|
||||
|
||||
if (dto.getStrategyId() != null && dto.isLiveCheck()) {
|
||||
applyGlobalExecutionFields(dto, app);
|
||||
return dto;
|
||||
}
|
||||
|
||||
dto.setLiveCheck(globalCheck);
|
||||
dto.setStrategyId(globalSid);
|
||||
applyGlobalExecutionFields(dto, app);
|
||||
return dto;
|
||||
}
|
||||
|
||||
private void applyGlobalExecutionFields(LiveStrategySettingsDto dto, GcAppSettings app) {
|
||||
if (app.getLiveExecutionType() != null) {
|
||||
dto.setExecutionType(app.getLiveExecutionType());
|
||||
}
|
||||
if (app.getLivePositionMode() != null) {
|
||||
dto.setPositionMode(app.getLivePositionMode());
|
||||
}
|
||||
return dto;
|
||||
}
|
||||
|
||||
private LiveStrategySettingsDto defaultDtoFromApp(String market, GcAppSettings app) {
|
||||
|
||||
Reference in New Issue
Block a user