|
@@ -87,7 +87,7 @@ public class UserPositionServiceImpl implements IUserPositionService {
|
|
|
if (userPositions.size() > 0) {
|
|
|
List<IndexInfo> indexInfoList = stockMapper.selectStockList();
|
|
|
Map<String, BigDecimal> indexMap = new HashMap<>();
|
|
|
- Map<String, Integer> spreadMap = new HashMap<>();
|
|
|
+ Map<String, BigDecimal> spreadMap = new HashMap<>();
|
|
|
BigDecimal nowPrice;
|
|
|
for (IndexInfo indexInfo : indexInfoList) {
|
|
|
try {
|
|
@@ -104,7 +104,7 @@ public class UserPositionServiceImpl implements IUserPositionService {
|
|
|
}
|
|
|
for (UserPosition userPosition : userPositions) {
|
|
|
nowPrice = indexMap.get(userPosition.getStockName());
|
|
|
- BigDecimal spread = new BigDecimal(spreadMap.get(userPosition.getStockName()));
|
|
|
+ BigDecimal spread = spreadMap.get(userPosition.getStockName());
|
|
|
if ("做多".equals(userPosition.getOrderDirection())) {
|
|
|
// 现价小于等于委托价
|
|
|
if (nowPrice.compareTo(userPosition.getBuyOrderPrice()) < 1) {
|