1
zj
2024-05-27 1405d2e5b97e8f934cfb9a127c108c63f4dbcf3b
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);