Administrator
2026-09-30 db9a7719bee7c82529b57535cde51ab23889c4ed
src/main/java/com/xcong/excoin/modules/gateApi/GateConfigController.java
@@ -4,6 +4,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@@ -13,6 +14,7 @@
 * Gate 配置控制面板 REST 接口。
 */
@Slf4j
@ConditionalOnProperty(name = "app.gate.enabled", havingValue = "true", matchIfMissing = true)
@RestController
@RequestMapping("/api/gate")
@Api(tags = "Gate配置管理")
@@ -38,7 +40,7 @@
        }
        GateConfigDTO dto = persistenceService.load(apiKey);
        if (dto == null) {
            dto = new GateConfigDTO();
            return Result.fail("apiKey 错误,未找到该配置");
        }
        dto.setApiKey(apiKey);
        return Result.ok(dto);
@@ -102,9 +104,9 @@
    public Result getStatus() {
        GateGridTradeService service = clientManager.getGridTradeService();
        if (service == null) {
            return Result.ok("STOPPED");
            return Result.ok("success", "STOPPED");
        }
        return Result.ok(service.isStrategyActive() ? "ACTIVE" : "STOPPED");
        return Result.ok("success", service.isStrategyActive() ? "ACTIVE" : "STOPPED");
    }
    /**