diff --git a/meta-model/model-quote/src/main/java/com/acanx/meta/model/trans/TransSecuMin.java b/meta-model/model-quote/src/main/java/com/acanx/meta/model/trans/TransSecuMin.java new file mode 100644 index 00000000..19d41db6 --- /dev/null +++ b/meta-model/model-quote/src/main/java/com/acanx/meta/model/trans/TransSecuMin.java @@ -0,0 +1,90 @@ +package com.acanx.meta.model.trans; + +import java.math.BigDecimal; + +/** + * TransSecuMin + * + * @author ACANX + * @since 20250926 + */ +public class TransSecuMin { + + + /** + * 时间戳 + */ + private Long ts; + /** + * 市场 + */ + private String m; + + /** + * 证券代码 + */ + private String s; + + /** + * 开 + */ + private BigDecimal o; + /** + * 关 + */ + private BigDecimal c; + + /** + * 高 + */ + private BigDecimal h; + + /** + * 低 + */ + private BigDecimal l; + + /** + * 当日累计均价 + */ + private BigDecimal ad; + + /** + * 成交量 + */ + private BigDecimal v; + /** + * 成交额 + */ + private BigDecimal t; + /** + * 扩展字段 + */ + private String e; + + public TransSecuMin() { + } + + public TransSecuMin(String s, String m, Long ts) { + this.s = s; + this.m = m; + this.ts = ts; + } + + @Override + public String toString() { + return "TransSecuMin{" + + "ts=" + ts + + ", m='" + m + '\'' + + ", s='" + s + '\'' + + ", o=" + o + + ", c=" + c + + ", h=" + h + + ", l=" + l + + ", ad=" + ad + + ", v=" + v + + ", t=" + t + + ", e='" + e + '\'' + + '}'; + } +} diff --git a/meta-model/model-rss/.gitignore b/meta-model/model-rss/.gitignore new file mode 100644 index 00000000..10063b95 --- /dev/null +++ b/meta-model/model-rss/.gitignore @@ -0,0 +1,32 @@ +/target/ +/log/ +/.log/ +/.mvn/ +/out/ +/lib/ +/tomcat/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +nbproject/private/ +build/ +nbbuild/ +dist/ +nbdist/ +.nb-gradle/ + + diff --git a/meta-model/model-rss/pom.xml b/meta-model/model-rss/pom.xml new file mode 100644 index 00000000..4274bb8f --- /dev/null +++ b/meta-model/model-rss/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + com.acanx.meta + meta-model + ${revision} + + + com.acanx.meta.model + model-rss + ${revision} + jar + RSS Model Module + https://github.com/ACANX/MetaOpen + + + true + UTF-8 + 11 + 3.14.0 + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${java.version} + ${java.version} + + + + + diff --git a/meta-model/model-rss/src/main/java/com/acanx/meta/model/rss/SecurityMinute.java b/meta-model/model-rss/src/main/java/com/acanx/meta/model/rss/SecurityMinute.java new file mode 100644 index 00000000..b2dba9fb --- /dev/null +++ b/meta-model/model-rss/src/main/java/com/acanx/meta/model/rss/SecurityMinute.java @@ -0,0 +1,194 @@ +package com.acanx.meta.model.rss; + + + +import java.math.BigDecimal; +import java.util.Objects; + +/** + * 分钟级别行情数据模型 + * + */ +public class SecurityMinute { + + private Long ts; + + private Integer tradeDate; + + private Integer tradeTime; + + private String marketCode; + + private String securityCode; + + private BigDecimal priceOpen; + + private BigDecimal priceClose; + + private BigDecimal priceHigh; + + private BigDecimal priceLow; + + private BigDecimal priceAvgCurrDay; + + private BigDecimal volume; + + private BigDecimal turnover; + + private String extField; + + + public SecurityMinute() { + } + + + public Long getTs() { + return ts; + } + + public void setTs(Long ts) { + this.ts = ts; + } + + public Integer getTradeDate() { + return tradeDate; + } + + public void setTradeDate(Integer tradeDate) { + this.tradeDate = tradeDate; + } + + public Integer getTradeTime() { + return tradeTime; + } + + public void setTradeTime(Integer tradeTime) { + this.tradeTime = tradeTime; + } + + public String getMarketCode() { + return marketCode; + } + + public void setMarketCode(String marketCode) { + this.marketCode = marketCode; + } + + public String getSecurityCode() { + return securityCode; + } + + public void setSecurityCode(String securityCode) { + this.securityCode = securityCode; + } + + public BigDecimal getPriceOpen() { + return priceOpen; + } + + public void setPriceOpen(BigDecimal priceOpen) { + this.priceOpen = priceOpen; + } + + public BigDecimal getPriceClose() { + return priceClose; + } + + public void setPriceClose(BigDecimal priceClose) { + this.priceClose = priceClose; + } + + public BigDecimal getPriceHigh() { + return priceHigh; + } + + public void setPriceHigh(BigDecimal priceHigh) { + this.priceHigh = priceHigh; + } + + public BigDecimal getPriceLow() { + return priceLow; + } + + public void setPriceLow(BigDecimal priceLow) { + this.priceLow = priceLow; + } + + public BigDecimal getPriceAvgCurrDay() { + return priceAvgCurrDay; + } + + public void setPriceAvgCurrDay(BigDecimal priceAvgCurrDay) { + this.priceAvgCurrDay = priceAvgCurrDay; + } + + public BigDecimal getVolume() { + return volume; + } + + public void setVolume(BigDecimal volume) { + this.volume = volume; + } + + public BigDecimal getTurnover() { + return turnover; + } + + public void setTurnover(BigDecimal turnover) { + this.turnover = turnover; + } + + public String getExtField() { + return extField; + } + + public void setExtField(String extField) { + this.extField = extField; + } + + @Override + public boolean equals(Object object) { + if (this == object) return true; + if (object == null || getClass() != object.getClass()) return false; + + SecurityMinute that = (SecurityMinute) object; + 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()); + } + + @Override + public int hashCode() { + int result = Objects.hashCode(getTs()); + result = 31 * result + Objects.hashCode(getTradeDate()); + result = 31 * result + Objects.hashCode(getTradeTime()); + result = 31 * result + Objects.hashCode(getMarketCode()); + result = 31 * result + Objects.hashCode(getSecurityCode()); + result = 31 * result + Objects.hashCode(getPriceOpen()); + result = 31 * result + Objects.hashCode(getPriceClose()); + result = 31 * result + Objects.hashCode(getPriceHigh()); + result = 31 * result + Objects.hashCode(getPriceLow()); + result = 31 * result + Objects.hashCode(getPriceAvgCurrDay()); + result = 31 * result + Objects.hashCode(getVolume()); + result = 31 * result + Objects.hashCode(getTurnover()); + result = 31 * result + Objects.hashCode(getExtField()); + return result; + } + + @Override + public String toString() { + return "SecurityMinute{" + + "ts=" + ts + + ", tradeDate=" + tradeDate + + ", tradeTime=" + tradeTime + + ", marketCode='" + marketCode + '\'' + + ", securityCode='" + securityCode + '\'' + + ", priceOpen=" + priceOpen + + ", priceClose=" + priceClose + + ", priceHigh=" + priceHigh + + ", priceLow=" + priceLow + + ", priceAvgCurrDay=" + priceAvgCurrDay + + ", volume=" + volume + + ", turnover=" + turnover + + ", extField='" + extField + '\'' + + '}'; + } +} diff --git a/meta-model/model-rss/src/main/resources/meta/app.yaml b/meta-model/model-rss/src/main/resources/meta/app.yaml new file mode 100644 index 00000000..e69de29b diff --git a/meta-model/model-rss/src/test/java/com/acanx/meta/model/rss/AppTest.java b/meta-model/model-rss/src/test/java/com/acanx/meta/model/rss/AppTest.java new file mode 100644 index 00000000..9539a01b --- /dev/null +++ b/meta-model/model-rss/src/test/java/com/acanx/meta/model/rss/AppTest.java @@ -0,0 +1,20 @@ +//package com.acanx.meta.model; +// +// +//import org.junit.jupiter.api.Assertions; +//import org.junit.jupiter.api.Test; +// +///** +// * Unit test for simple App. +// */ +//public class AppTest { +// +// /** +// * Rigorous Test :-) +// */ +// @Test +// public void shouldAnswerWithTrue() { +// Assertions.assertTrue(true); +// } +// +//} diff --git a/meta-model/model-rss/src/test/resources/meta/app.yaml b/meta-model/model-rss/src/test/resources/meta/app.yaml new file mode 100644 index 00000000..e69de29b diff --git a/meta-model/pom.xml b/meta-model/pom.xml index c53d6ee0..bd7fc0fb 100644 --- a/meta-model/pom.xml +++ b/meta-model/pom.xml @@ -25,6 +25,7 @@ model-deepseek model-test model-maven + model-rss