File tree 3 files changed +4931
-1
lines changed
java/com/apifan/common/random/source
3 files changed +4931
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<groupId >com.apifan.common</groupId >
8
8
<artifactId >common-random</artifactId >
9
- <version >1.0.17 </version >
9
+ <version >1.0.18 </version >
10
10
<packaging >jar</packaging >
11
11
<name >common-random</name >
12
12
<description >An easy-to-use random data generator.</description >
Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ public class FinancialSource {
48
48
*/
49
49
private static List <String > stockBseList = Lists .newArrayList ();
50
50
51
+ /**
52
+ * 股票(纳斯达克)
53
+ */
54
+ private static List <String > stockNasdaqList = Lists .newArrayList ();
55
+
51
56
/**
52
57
* 开放式基金
53
58
*/
@@ -69,6 +74,7 @@ private FinancialSource() {
69
74
stockBseList = ResourceUtils .base64DecodeLines (ResourceUtils .readLines ("stock-bse.txt" ));
70
75
fundsList = ResourceUtils .readLines ("fund.txt" );
71
76
currencyList = ResourceUtils .base64DecodeLines (ResourceUtils .readLines ("currency.txt" ));
77
+ stockNasdaqList = ResourceUtils .readLines ("stock-nasdaq.txt" );
72
78
}
73
79
74
80
/**
@@ -120,6 +126,15 @@ public String[] randomBseStock() {
120
126
return StringUtils .isBlank (stock ) ? null : stock .split ("," );
121
127
}
122
128
129
+ /**
130
+ * 随机股票代码(纳斯达克)
131
+ *
132
+ * @return 股票代码
133
+ */
134
+ public String randomNasdaqStock () {
135
+ return ResourceUtils .getRandomString (stockNasdaqList , 1 );
136
+ }
137
+
123
138
/**
124
139
* 随机基金
125
140
*
You can’t perform that action at this time.
0 commit comments