Skip to content

Commit 8a8a715

Browse files
authored
Merge pull request #344 from ACANX/feat_model-rss
Feat model rss
2 parents 7633ae1 + 6dd5548 commit 8a8a715

8 files changed

Lines changed: 383 additions & 0 deletions

File tree

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
package com.acanx.meta.model.trans;
2+
3+
import java.math.BigDecimal;
4+
5+
/**
6+
* TransSecuMin
7+
*
8+
* @author ACANX
9+
* @since 20250926
10+
*/
11+
public class TransSecuMin {
12+
13+
14+
/**
15+
* 时间戳
16+
*/
17+
private Long ts;
18+
/**
19+
* 市场
20+
*/
21+
private String m;
22+
23+
/**
24+
* 证券代码
25+
*/
26+
private String s;
27+
28+
/**
29+
* 开
30+
*/
31+
private BigDecimal o;
32+
/**
33+
* 关
34+
*/
35+
private BigDecimal c;
36+
37+
/**
38+
* 高
39+
*/
40+
private BigDecimal h;
41+
42+
/**
43+
* 低
44+
*/
45+
private BigDecimal l;
46+
47+
/**
48+
* 当日累计均价
49+
*/
50+
private BigDecimal ad;
51+
52+
/**
53+
* 成交量
54+
*/
55+
private BigDecimal v;
56+
/**
57+
* 成交额
58+
*/
59+
private BigDecimal t;
60+
/**
61+
* 扩展字段
62+
*/
63+
private String e;
64+
65+
public TransSecuMin() {
66+
}
67+
68+
public TransSecuMin(String s, String m, Long ts) {
69+
this.s = s;
70+
this.m = m;
71+
this.ts = ts;
72+
}
73+
74+
@Override
75+
public String toString() {
76+
return "TransSecuMin{" +
77+
"ts=" + ts +
78+
", m='" + m + '\'' +
79+
", s='" + s + '\'' +
80+
", o=" + o +
81+
", c=" + c +
82+
", h=" + h +
83+
", l=" + l +
84+
", ad=" + ad +
85+
", v=" + v +
86+
", t=" + t +
87+
", e='" + e + '\'' +
88+
'}';
89+
}
90+
}

meta-model/model-rss/.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/target/
2+
/log/
3+
/.log/
4+
/.mvn/
5+
/out/
6+
/lib/
7+
/tomcat/
8+
!.mvn/wrapper/maven-wrapper.jar
9+
10+
### STS ###
11+
.apt_generated
12+
.classpath
13+
.factorypath
14+
.project
15+
.settings
16+
.springBeans
17+
18+
### IntelliJ IDEA ###
19+
.idea
20+
*.iws
21+
*.iml
22+
*.ipr
23+
24+
### NetBeans ###
25+
nbproject/private/
26+
build/
27+
nbbuild/
28+
dist/
29+
nbdist/
30+
.nb-gradle/
31+
32+

meta-model/model-rss/pom.xml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>com.acanx.meta</groupId>
6+
<artifactId>meta-model</artifactId>
7+
<version>${revision}</version>
8+
</parent>
9+
10+
<groupId>com.acanx.meta.model</groupId>
11+
<artifactId>model-rss</artifactId>
12+
<version>${revision}</version>
13+
<packaging>jar</packaging>
14+
<name>RSS Model Module</name>
15+
<url>https://github.com/ACANX/MetaOpen</url>
16+
17+
<properties>
18+
<maven.deploy.skip>true</maven.deploy.skip>
19+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20+
<maven.compiler.release>11</maven.compiler.release>
21+
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
22+
</properties>
23+
24+
<dependencies>
25+
</dependencies>
26+
27+
28+
29+
<dependencyManagement>
30+
</dependencyManagement>
31+
32+
33+
<build>
34+
<plugins>
35+
<plugin>
36+
<groupId>org.apache.maven.plugins</groupId>
37+
<artifactId>maven-compiler-plugin</artifactId>
38+
<version>${maven-compiler-plugin.version}</version>
39+
<configuration>
40+
<target>${java.version}</target>
41+
<source>${java.version}</source>
42+
</configuration>
43+
</plugin>
44+
</plugins>
45+
</build>
46+
</project>
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
package com.acanx.meta.model.rss;
2+
3+
4+
5+
import java.math.BigDecimal;
6+
import java.util.Objects;
7+
8+
/**
9+
* 分钟级别行情数据模型
10+
*
11+
*/
12+
public class SecurityMinute {
13+
14+
private Long ts;
15+
16+
private Integer tradeDate;
17+
18+
private Integer tradeTime;
19+
20+
private String marketCode;
21+
22+
private String securityCode;
23+
24+
private BigDecimal priceOpen;
25+
26+
private BigDecimal priceClose;
27+
28+
private BigDecimal priceHigh;
29+
30+
private BigDecimal priceLow;
31+
32+
private BigDecimal priceAvgCurrDay;
33+
34+
private BigDecimal volume;
35+
36+
private BigDecimal turnover;
37+
38+
private String extField;
39+
40+
41+
public SecurityMinute() {
42+
}
43+
44+
45+
public Long getTs() {
46+
return ts;
47+
}
48+
49+
public void setTs(Long ts) {
50+
this.ts = ts;
51+
}
52+
53+
public Integer getTradeDate() {
54+
return tradeDate;
55+
}
56+
57+
public void setTradeDate(Integer tradeDate) {
58+
this.tradeDate = tradeDate;
59+
}
60+
61+
public Integer getTradeTime() {
62+
return tradeTime;
63+
}
64+
65+
public void setTradeTime(Integer tradeTime) {
66+
this.tradeTime = tradeTime;
67+
}
68+
69+
public String getMarketCode() {
70+
return marketCode;
71+
}
72+
73+
public void setMarketCode(String marketCode) {
74+
this.marketCode = marketCode;
75+
}
76+
77+
public String getSecurityCode() {
78+
return securityCode;
79+
}
80+
81+
public void setSecurityCode(String securityCode) {
82+
this.securityCode = securityCode;
83+
}
84+
85+
public BigDecimal getPriceOpen() {
86+
return priceOpen;
87+
}
88+
89+
public void setPriceOpen(BigDecimal priceOpen) {
90+
this.priceOpen = priceOpen;
91+
}
92+
93+
public BigDecimal getPriceClose() {
94+
return priceClose;
95+
}
96+
97+
public void setPriceClose(BigDecimal priceClose) {
98+
this.priceClose = priceClose;
99+
}
100+
101+
public BigDecimal getPriceHigh() {
102+
return priceHigh;
103+
}
104+
105+
public void setPriceHigh(BigDecimal priceHigh) {
106+
this.priceHigh = priceHigh;
107+
}
108+
109+
public BigDecimal getPriceLow() {
110+
return priceLow;
111+
}
112+
113+
public void setPriceLow(BigDecimal priceLow) {
114+
this.priceLow = priceLow;
115+
}
116+
117+
public BigDecimal getPriceAvgCurrDay() {
118+
return priceAvgCurrDay;
119+
}
120+
121+
public void setPriceAvgCurrDay(BigDecimal priceAvgCurrDay) {
122+
this.priceAvgCurrDay = priceAvgCurrDay;
123+
}
124+
125+
public BigDecimal getVolume() {
126+
return volume;
127+
}
128+
129+
public void setVolume(BigDecimal volume) {
130+
this.volume = volume;
131+
}
132+
133+
public BigDecimal getTurnover() {
134+
return turnover;
135+
}
136+
137+
public void setTurnover(BigDecimal turnover) {
138+
this.turnover = turnover;
139+
}
140+
141+
public String getExtField() {
142+
return extField;
143+
}
144+
145+
public void setExtField(String extField) {
146+
this.extField = extField;
147+
}
148+
149+
@Override
150+
public boolean equals(Object object) {
151+
if (this == object) return true;
152+
if (object == null || getClass() != object.getClass()) return false;
153+
154+
SecurityMinute that = (SecurityMinute) object;
155+
return Objects.equals(getTs(), that.getTs()) && Objects.equals(getTradeDate(), that.getTradeDate()) && Objects.equals(getTradeTime(), that.getTradeTime()) && Objects.equals(getMarketCode(), that.getMarketCode()) && Objects.equals(getSecurityCode(), that.getSecurityCode()) && Objects.equals(getPriceOpen(), that.getPriceOpen()) && Objects.equals(getPriceClose(), that.getPriceClose()) && Objects.equals(getPriceHigh(), that.getPriceHigh()) && Objects.equals(getPriceLow(), that.getPriceLow()) && Objects.equals(getPriceAvgCurrDay(), that.getPriceAvgCurrDay()) && Objects.equals(getVolume(), that.getVolume()) && Objects.equals(getTurnover(), that.getTurnover()) && Objects.equals(getExtField(), that.getExtField());
156+
}
157+
158+
@Override
159+
public int hashCode() {
160+
int result = Objects.hashCode(getTs());
161+
result = 31 * result + Objects.hashCode(getTradeDate());
162+
result = 31 * result + Objects.hashCode(getTradeTime());
163+
result = 31 * result + Objects.hashCode(getMarketCode());
164+
result = 31 * result + Objects.hashCode(getSecurityCode());
165+
result = 31 * result + Objects.hashCode(getPriceOpen());
166+
result = 31 * result + Objects.hashCode(getPriceClose());
167+
result = 31 * result + Objects.hashCode(getPriceHigh());
168+
result = 31 * result + Objects.hashCode(getPriceLow());
169+
result = 31 * result + Objects.hashCode(getPriceAvgCurrDay());
170+
result = 31 * result + Objects.hashCode(getVolume());
171+
result = 31 * result + Objects.hashCode(getTurnover());
172+
result = 31 * result + Objects.hashCode(getExtField());
173+
return result;
174+
}
175+
176+
@Override
177+
public String toString() {
178+
return "SecurityMinute{" +
179+
"ts=" + ts +
180+
", tradeDate=" + tradeDate +
181+
", tradeTime=" + tradeTime +
182+
", marketCode='" + marketCode + '\'' +
183+
", securityCode='" + securityCode + '\'' +
184+
", priceOpen=" + priceOpen +
185+
", priceClose=" + priceClose +
186+
", priceHigh=" + priceHigh +
187+
", priceLow=" + priceLow +
188+
", priceAvgCurrDay=" + priceAvgCurrDay +
189+
", volume=" + volume +
190+
", turnover=" + turnover +
191+
", extField='" + extField + '\'' +
192+
'}';
193+
}
194+
}

meta-model/model-rss/src/main/resources/meta/app.yaml

Whitespace-only changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//package com.acanx.meta.model;
2+
//
3+
//
4+
//import org.junit.jupiter.api.Assertions;
5+
//import org.junit.jupiter.api.Test;
6+
//
7+
///**
8+
// * Unit test for simple App.
9+
// */
10+
//public class AppTest {
11+
//
12+
// /**
13+
// * Rigorous Test :-)
14+
// */
15+
// @Test
16+
// public void shouldAnswerWithTrue() {
17+
// Assertions.assertTrue(true);
18+
// }
19+
//
20+
//}

meta-model/model-rss/src/test/resources/meta/app.yaml

Whitespace-only changes.

meta-model/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<module>model-deepseek</module>
2626
<module>model-test</module>
2727
<module>model-maven</module>
28+
<module>model-rss</module>
2829
</modules>
2930
<build>
3031
<plugins>

0 commit comments

Comments
 (0)