1
zj
2025-06-23 dc9bd22833255bc602dd42c7f603ecb50842ab35
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
package project.data.model;
 
 
import kernel.bo.EntityObject;
import project.hobi.util.DateUtils;
 
/**
 * 分时图
 *
 */
public class Trend extends EntityObject implements Comparable<Trend> {
 
    private static final long serialVersionUID = -783607185910260696L;
    /**
     * 产品代码
     */
    private String symbol;
    /**
     * 时间戳
     */
    private Long ts;
 
    /**
     * 价格(白线)
     */
    private Double trend;
 
    /**
     * 成交额(以报价币种计量)
     */
    private Double volume;
    /**
     * 成交量(以基础币种计量)
     */
    private Double amount;
 
    /**
     * 时间戳的"yyyy-MM-dd HH:mm:ss"格式
     */
    private String current_time;
 
    public String getSymbol() {
        return symbol;
    }
 
    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }
 
    public Double getTrend() {
        return trend;
    }
 
    public void setTrend(Double trend) {
        this.trend = trend;
    }
 
    public Double getVolume() {
        return volume;
    }
 
    public void setVolume(Double volume) {
        this.volume = volume;
    }
 
    public Double getAmount() {
        return amount;
    }
 
    public void setAmount(Double amount) {
        this.amount = amount;
    }
 
    public void setCurrent_time(String current_time) {
        this.current_time = current_time;
    }
 
    public String getCurrent_time() {
        current_time = DateUtils.timeStamp2Date(String.valueOf(ts), "HH:mm");
        return current_time;
    }
 
    public Long getTs() {
        return ts;
    }
 
    public void setTs(Long ts) {
        this.ts = ts;
        getCurrent_time();
    }
 
    @Override
    public int compareTo(Trend trend) {
 
        if (this.ts > trend.getTs()) {
            return 1;
        } else if (this.ts < trend.getTs()) {
            return -1;
        }
        return 0;
    }
}