Administrator
2026-08-13 a23f23570935850192099133509e90c33769d26c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.xcong.excoin.modules.station.service;
 
import com.baomidou.mybatisplus.extension.service.IService;
import com.xcong.excoin.modules.station.entity.StrategyEventLog;
import com.xcong.excoin.modules.station.entity.StrategyStatus;
import com.xcong.excoin.modules.station.model.GateStatsEvent;
 
import java.util.List;
import java.util.Map;
 
public interface StationService extends IService<StrategyEventLog> {
 
    /** 启动策略(通过 MQ 发送 START 到目标 JAR) */
    void startStrategy(String apiKey);
 
    /** 停止策略(通过 MQ 发送 STOP 到目标 JAR) */
    void stopStrategy(String apiKey);
 
    /** 启动策略(直接使用 apiKeyMd5,跳过内部 md5 计算) */
    void startByMd5(String apiKeyMd5);
 
    /** 停止策略(直接使用 apiKeyMd5,跳过内部 md5 计算) */
    void stopByMd5(String apiKeyMd5);
 
    /** 更新策略参数(通过 MQ 发送 UPDATE_CONFIG 到目标 JAR,仅持久化,需手动启动生效) */
    void updateConfig(String apiKeyMd5, Map<String, Object> params);
 
    /** 保存策略事件(幂等) */
    void saveEvent(GateStatsEvent event);
 
    /** 查询事件日志 */
    List<StrategyEventLog> getEvents(String apiKeyMd5);
 
    /** 查询策略实时状态 */
    StrategyStatus getStrategyStatus(String apiKeyMd5);
}