| | |
| | | if (newSharesConfig==null){ |
| | | throw new YamiShopBindException("现股已被删除"); |
| | | } |
| | | applyNewSharesOrderService.updateById(applyNewSharesOrder); |
| | | //applyNewSharesOrderService.updateById(applyNewSharesOrder); |
| | | List<UserPromiseRecord> userPromiseRecords= findByOrderNo(orderNo); |
| | | for (UserPromiseRecord u:userPromiseRecords){ |
| | | if ( u.getStatus()==1){ |
| | |
| | | throw new YamiShopBindException("现股已卖出"); |
| | | } |
| | | Realtime realtime= realtimes.get(0); |
| | | applyNewSharesOrder.setSellPrice(BigDecimal.valueOf(realtime.getClose())); |
| | | usdt = userPromiseRecord.getDeductNumber().multiply(BigDecimal.valueOf(realtime.getClose())); |
| | | userPromiseRecord.setShowFlag(1); |
| | | } |
| | | } |
| | | else { |
| | | throw new YamiShopBindException("认缴记录不存在!"); |
| | | throw new YamiShopBindException("认缴记录不存在"); |
| | | } |
| | | applyNewSharesOrder.setSell(1); |
| | | applyNewSharesOrderService.updateById(applyNewSharesOrder); |
| | | updateBatchById(userPromiseRecords); |
| | | walletService.updateMoney("USDT",userId, usdt, BigDecimal.ZERO, |
| | | Constants.MONEYLOG_CATEGORY_IPO_SEll, Constants.WALLET, Constants.MONEYLOG_CATEGORY_IPO_SEll, applyNewSharesOrder.getSymbolName()+ |
| | | "新股卖出新增USDT"+usdt.doubleValue()); |
| | | "新股卖出"+applyNewSharesOrder.getOrderNo() + ":新增USDT" + usdt.doubleValue()); |
| | | |
| | | // BigDecimal initMarketValue = order.getWinningNumber().multiply(order.getSubPrice()); |
| | | // if (CollectionUtil.isNotEmpty(realtimes)) { |