Refinitiv股票行情接口修改
This commit is contained in:
@@ -30,12 +30,12 @@ public class RetifiveStockInfo {
|
|||||||
private String stockType;
|
private String stockType;
|
||||||
|
|
||||||
@ApiModelProperty("当前价格")
|
@ApiModelProperty("当前价格")
|
||||||
private String currentPrice;
|
private String lastPrice;
|
||||||
|
|
||||||
@ApiModelProperty("变动百分比")
|
@ApiModelProperty("变动百分比")
|
||||||
private String changePercent;
|
private String perchg;
|
||||||
@ApiModelProperty("变动值")
|
@ApiModelProperty("变动值")
|
||||||
private String changeValue;
|
private String change;
|
||||||
|
|
||||||
@ApiModelProperty("开盘价格")
|
@ApiModelProperty("开盘价格")
|
||||||
private String openPrice;
|
private String openPrice;
|
||||||
|
|||||||
@@ -127,10 +127,10 @@ public class RefinitivUtil {
|
|||||||
}
|
}
|
||||||
return RetifiveStockInfo.builder()
|
return RetifiveStockInfo.builder()
|
||||||
.stockCode(stockCode).stockName(stockName).symbol(name).status(status)
|
.stockCode(stockCode).stockName(stockName).symbol(name).status(status)
|
||||||
.openPrice(openPrice).currentPrice(price).highPrice(high).lowPrice(low)
|
.openPrice(openPrice).lastPrice(price).highPrice(high).lowPrice(low)
|
||||||
.previousPrice(previousPrice).changePercent(percentChange).volume(volume)
|
.previousPrice(previousPrice).perchg(percentChange).volume(volume)
|
||||||
.week52HighPrice(week52High).week52LowPrice(week52Low).stockType(stockType)
|
.week52HighPrice(week52High).week52LowPrice(week52Low).stockType(stockType)
|
||||||
.changeValue(changeValue)
|
.change(changeValue)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,8 +257,8 @@ public class RefinitivUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
RetifiveStockInfo retifiveStockInfo = RetifiveStockInfo.builder().stockCode(stockCode).stockName(stockName).symbol(name).status(status)
|
RetifiveStockInfo retifiveStockInfo = RetifiveStockInfo.builder().stockCode(stockCode).stockName(stockName).symbol(name).status(status)
|
||||||
.openPrice(openPrice).currentPrice(price).highPrice(high).lowPrice(low).previousPrice(previousPrice).changePercent(percentChange)
|
.openPrice(openPrice).lastPrice(price).highPrice(high).lowPrice(low).previousPrice(previousPrice).perchg(percentChange)
|
||||||
.volume(volume).week52HighPrice(week52High).week52LowPrice(week52Low).stockType(stockType).changeValue(changeValue)
|
.volume(volume).week52HighPrice(week52High).week52LowPrice(week52Low).stockType(stockType).change(changeValue)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return retifiveStockInfo;
|
return retifiveStockInfo;
|
||||||
|
|||||||
@@ -3,19 +3,15 @@ package cn.stock.market.web;
|
|||||||
import cn.stock.market.domain.basic.entity.RetifiveStock;
|
import cn.stock.market.domain.basic.entity.RetifiveStock;
|
||||||
import cn.stock.market.domain.basic.service.RetifiveStockService;
|
import cn.stock.market.domain.basic.service.RetifiveStockService;
|
||||||
import cn.stock.market.dto.RetifiveStockInfo;
|
import cn.stock.market.dto.RetifiveStockInfo;
|
||||||
import cn.stock.market.infrastructure.db.po.RetifiveStockPO;
|
|
||||||
import cn.stock.market.listener.AppClient;
|
import cn.stock.market.listener.AppClient;
|
||||||
import cn.stock.market.listener.ConcurrentAppClient;
|
import cn.stock.market.listener.ConcurrentAppClient;
|
||||||
import cn.stock.market.listener.StockInfoRefinitiv;
|
import cn.stock.market.listener.StockInfoRefinitiv;
|
||||||
import cn.stock.market.listener.SymbolRefinitiv;
|
import cn.stock.market.listener.SymbolRefinitiv;
|
||||||
import cn.stock.market.utils.ServerResponse;
|
import cn.stock.market.utils.ServerResponse;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.thomsonreuters.ema.access.Data;
|
|
||||||
import com.thomsonreuters.ema.access.DataType;
|
import com.thomsonreuters.ema.access.DataType;
|
||||||
import com.thomsonreuters.ema.access.FieldEntry;
|
import com.thomsonreuters.ema.access.FieldEntry;
|
||||||
import com.thomsonreuters.ema.access.FieldList;
|
import com.thomsonreuters.ema.access.FieldList;
|
||||||
import com.thomsonreuters.ema.access.Map;
|
|
||||||
import com.thomsonreuters.ema.access.MapEntry;
|
|
||||||
import com.thomsonreuters.ema.access.RefreshMsg;
|
import com.thomsonreuters.ema.access.RefreshMsg;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -27,14 +23,9 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
|
||||||
import java.util.concurrent.ExecutorService;
|
|
||||||
import java.util.concurrent.Executors;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -661,8 +652,8 @@ public class MessageRetifiveController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
RetifiveStockInfo retifiveStockInfo = RetifiveStockInfo.builder().stockCode(stockCode).stockName(stockName).symbol(name).status(status)
|
RetifiveStockInfo retifiveStockInfo = RetifiveStockInfo.builder().stockCode(stockCode).stockName(stockName).symbol(name).status(status)
|
||||||
.openPrice(openPrice).currentPrice(price).highPrice(high).lowPrice(low).previousPrice(previousPrice).changePercent(percentChange)
|
.openPrice(openPrice).lastPrice(price).highPrice(high).lowPrice(low).previousPrice(previousPrice).perchg(percentChange)
|
||||||
.volume(volume).week52HighPrice(week52High).week52LowPrice(week52Low).stockType(stockType).changeValue(changeValue)
|
.volume(volume).week52HighPrice(week52High).week52LowPrice(week52Low).stockType(stockType).change(changeValue)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return retifiveStockInfo;
|
return retifiveStockInfo;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package cn.stock.market.web;
|
package cn.stock.market.web;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.stock.market.domain.basic.entity.RetifiveStock;
|
import cn.stock.market.domain.basic.entity.RetifiveStock;
|
||||||
import cn.stock.market.domain.basic.service.RetifiveStockService;
|
import cn.stock.market.domain.basic.service.RetifiveStockService;
|
||||||
import cn.stock.market.dto.RetifiveStockInfo;
|
import cn.stock.market.dto.RetifiveStockInfo;
|
||||||
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@@ -94,6 +96,10 @@ public class RefinitivApiController {
|
|||||||
@GetMapping("/getTopActives")
|
@GetMapping("/getTopActives")
|
||||||
@EncryptFilter(decryptRequest = false)
|
@EncryptFilter(decryptRequest = false)
|
||||||
public ServerResponse<?> getTopActives(@RequestParam String stockType) {
|
public ServerResponse<?> getTopActives(@RequestParam String stockType) {
|
||||||
|
if (StrUtil.equalsIgnoreCase(stockType, "nse")) {
|
||||||
|
return ServerResponse.createBySuccess("操作成功", new ArrayList<>());
|
||||||
|
}
|
||||||
|
|
||||||
String name = ".AV.BO";
|
String name = ".AV.BO";
|
||||||
List<RetifiveStockInfo> list = Lists.newArrayList();
|
List<RetifiveStockInfo> list = Lists.newArrayList();
|
||||||
try {
|
try {
|
||||||
@@ -120,6 +126,9 @@ public class RefinitivApiController {
|
|||||||
@GetMapping("/getTopGainers")
|
@GetMapping("/getTopGainers")
|
||||||
@EncryptFilter(decryptRequest = false)
|
@EncryptFilter(decryptRequest = false)
|
||||||
public ServerResponse<?> getTopGainers(@RequestParam String stockType) {
|
public ServerResponse<?> getTopGainers(@RequestParam String stockType) {
|
||||||
|
if (StrUtil.equalsIgnoreCase(stockType, "nse")) {
|
||||||
|
return ServerResponse.createBySuccess("操作成功", new ArrayList<>());
|
||||||
|
}
|
||||||
String name = ".PG.BO";
|
String name = ".PG.BO";
|
||||||
List<RetifiveStockInfo> list = Lists.newArrayList();
|
List<RetifiveStockInfo> list = Lists.newArrayList();
|
||||||
try {
|
try {
|
||||||
@@ -146,6 +155,10 @@ public class RefinitivApiController {
|
|||||||
@GetMapping("/getTopLosers")
|
@GetMapping("/getTopLosers")
|
||||||
@EncryptFilter(decryptRequest = false)
|
@EncryptFilter(decryptRequest = false)
|
||||||
public ServerResponse<?> getTopLosers(@RequestParam String stockType) {
|
public ServerResponse<?> getTopLosers(@RequestParam String stockType) {
|
||||||
|
if (StrUtil.equalsIgnoreCase(stockType, "nse")) {
|
||||||
|
return ServerResponse.createBySuccess("操作成功", new ArrayList<>());
|
||||||
|
}
|
||||||
|
|
||||||
String name = ".PL.BO";
|
String name = ".PL.BO";
|
||||||
List<RetifiveStockInfo> list = Lists.newArrayList();
|
List<RetifiveStockInfo> list = Lists.newArrayList();
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user