| | |
| | | } |
| | | User user = iUserService.getCurrentRefreshUser(request); |
| | | synchronized (user.getId()){ |
| | | UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId("IN",user.getId()); |
| | | |
| | | if (model.getNewCode() != null) { |
| | | StockSubscribe stockSubscribe = stockSubscribeMapper.selectOne(new QueryWrapper<StockSubscribe>() |
| | | .eq("newlist_id", model.getNewlistId())); |
| | |
| | | if (siteProduct.getRealNameDisplay() && user.getIsActive() != 2) { |
| | | return ServerResponse.createByErrorMsg("订单失败,请先实名认证",request); |
| | | } |
| | | UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(stockSubscribe.getStockType(), user.getId()); |
| | | if(userAssets.getAmountToBeCovered().compareTo(BigDecimal.ZERO) > 0){ |
| | | return ServerResponse.createByErrorMsg("请先缴清待补资金", request); |
| | | } |
| | |
| | | } |
| | | |
| | | //客户中签直接扣除客户账户可用资金 |
| | | UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId("IN", userStockSubscribe.getUserId()); |
| | | UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(stockSubscribe.getStockType(), userStockSubscribe.getUserId()); |
| | | if (model.getStatus() == 3 && model.getApplyNumber() != null){ |
| | | if(stockSubscribe.getType() == 1){ |
| | | model.setBond((stockSubscribe.getMinPrice() != null ? stockSubscribe.getMinPrice() : stockSubscribe.getPrice()).multiply(BigDecimal.valueOf(model.getApplyNumber()))); |