liuchaojie пре 4 година
родитељ
комит
cf0a6b9da0

+ 2 - 2
src/main/java/com/xc/pojo/IndexInfo.java

@@ -17,7 +17,7 @@ public class IndexInfo {
 
     private int depositAmt;
 
-    private int transFee;
+    private BigDecimal transFee;
 
     private BigDecimal entryOrdersAgio;
 
@@ -36,5 +36,5 @@ public class IndexInfo {
     private String transPmBegin; // 下午交易开始时间
     private String transPmEnd; // 下午交易结束时间
     private Integer siteLever;
-    private Integer spread;
+    private BigDecimal spread;
 }

+ 2 - 2
src/main/java/com/xc/service/impl/UserPositionServiceImpl.java

@@ -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) {

+ 1 - 1
src/main/java/com/xc/vo/stock/IndexInfoVo.java

@@ -15,7 +15,7 @@ public class IndexInfoVo {
 
     private int depositAmt;
 
-    private int transFee;
+    private BigDecimal transFee;
 
     private BigDecimal entryOrdersAgio;