zj
2025-06-30 414555cfbb72c02ebc07ca164a7ff0d0f592de13
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
package project.data.model;
 
import javax.persistence.Column;
import javax.persistence.Table;
 
import kernel.bo.EntityObject;
 
/**
 * K线图
 */
@Table(name="T_KLINE")
public class Kline extends EntityObject implements Comparable<Kline>, Cloneable {
    public final static String PERIOD_1MIN = "1min";
    public final static String PERIOD_5MIN = "5min";
    public final static String PERIOD_15MIN = "15min";
    public final static String PERIOD_30MIN = "30min";
    public final static String PERIOD_60MIN = "60min";
    public final static String PERIOD_4HOUR = "4hour";
    public final static String PERIOD_1DAY = "1day";
    public final static String PERIOD_1MON = "1mon";
    public final static String PERIOD_1WEEK = "1week";
    /**
     * Member Description
     */
    private static final long serialVersionUID = -6488478481677363147L;
 
    /**
     * 产品代码
     */
    @Column(name="SYMBOL")
    private String symbol;
    /**
     * 时间戳
     */
    @Column(name="TS")
    private Long ts;
    /**
     * 时间戳的"yyyy-MM-dd HH:mm:ss"格式
     */
    private String current_time;
 
    /**
     * 开盘价
     */
    @Column(name="OPEN")
    private Double open;
    /**
     * 最高价
     */
    @Column(name="HIGH")
    private Double high;
    /**
     * 最低价
     */
    @Column(name="LOW")
    private Double low;
    /**
     * 最新价
     */
    @Column(name="CLOSE")
    private Double close;
    /**
     * 成交量
     */
    @Column(name="VOLUME")
    private Double volume;
 
    /**
     * 1min, 5min, 15min, 30min, 60min, 4hour, 1day, 1mon, 1week
     */
    @Column(name="PERIOD")
    private String period;
 
    public String getSymbol() {
        return symbol;
    }
 
    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }
 
    public Long getTs() {
        return ts;
    }
 
    public void setTs(Long ts) {
        this.ts = ts;
        getCurrent_time();
    }
 
    public Double getClose() {
        return close;
    }
 
    public void setClose(Double close) {
        this.close = close;
    }
 
    public Double getOpen() {
        return open;
    }
 
    public void setOpen(Double open) {
        this.open = open;
    }
 
    public Double getHigh() {
        return high;
    }
 
    public void setHigh(Double high) {
        this.high = high;
    }
 
    public Double getLow() {
        return low;
    }
 
    public void setLow(Double low) {
        this.low = low;
    }
 
    public Double getVolume() {
        return volume;
    }
 
    public void setVolume(Double volume) {
        this.volume = volume;
    }
 
    public String getCurrent_time() {
        return current_time;
    }
 
    public void setCurrent_time(String current_time) {
        this.current_time = current_time;
    }
 
    @Override
    public int compareTo(Kline kline) {
        if (this.ts > kline.getTs()) {
            return 1;
        } else if (this.ts < kline.getTs()) {
            return -1;
        }
        return 0;
    }
 
 
    public String getPeriod() {
        return period;
    }
 
    public void setPeriod(String period) {
        this.period = period;
    }
    @Override
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
 
 
}