From 1405d2e5b97e8f934cfb9a127c108c63f4dbcf3b Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Mon, 27 May 2024 14:19:59 +0800
Subject: [PATCH] 1

---
 src/main/java/com/nq/service/impl/UserPositionServiceImpl.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/nq/service/impl/UserPositionServiceImpl.java b/src/main/java/com/nq/service/impl/UserPositionServiceImpl.java
index 6bdb651..125b73e 100644
--- a/src/main/java/com/nq/service/impl/UserPositionServiceImpl.java
+++ b/src/main/java/com/nq/service/impl/UserPositionServiceImpl.java
@@ -1201,8 +1201,10 @@
             userPosition.setStockCode(stock.getStockCode());
             userPosition.setStockSpell(stock.getStockSpell());
             userPosition.setStockName(userStockSubscribe.getNewName());
-            userPosition.setStockGid(stockSubscribe.getStockType() + userStockSubscribe.getNewCode());
-
+            StringBuffer gid = new StringBuffer();
+            gid.append(stockSubscribe.getStockType()!=null?stockSubscribe.getStockType():"");
+            gid.append(userStockSubscribe.getNewCode()!=null?userStockSubscribe.getNewCode():"stock code invaild");
+            userPosition.setStockGid(gid.toString());
             userPosition.setBuyOrderId(GeneratePosition.getPositionId());
             userPosition.setBuyOrderTime(new Date());
             userPosition.setBuyOrderPrice(userStockSubscribe.getBuyPrice());
@@ -1258,6 +1260,7 @@
                 return ServerResponse.createByErrorMsg("新股转持仓失败");
             }
             userAssets.setFreezeMoney(userAssets.getFreezeMoney().add(userPosition.getOrderTotalPrice()));
+            userAssets.setFreezeMoney(userAssets.getFreezeMoney()!=null?userAssets.getFreezeMoney().setScale(2,BigDecimal.ROUND_UP):null);
             userAssetsMapper.updateById(userAssets);
             if (ret > 0) {
                 userStockSubscribe.setStatus(5);

--
Gitblit v1.9.3