| | |
| | | if (wholeCloseOrderDto.getCount() == holdOrderEntity.getSymbolCntSale()) { |
| | | contractHoldOrderDao.updateHoldOrderIsCanClosingById(ContractHoldOrderEntity.ORDER_CAN_CLOSING_N, wholeCloseOrderDto.getId()); |
| | | } else { |
| | | int sub = holdOrderEntity.getSymbolCntSale() - wholeCloseOrderDto.getCount(); |
| | | log.info("剩余张数:{}", sub); |
| | | // 更新可平张数 |
| | | holdOrderEntity.setSymbolCntSale(holdOrderEntity.getSymbolCntSale() - wholeCloseOrderDto.getCount()); |
| | | holdOrderEntity.setSymbolCntSale(sub); |
| | | contractHoldOrderDao.updateById(holdOrderEntity); |
| | | } |
| | | |
| | |
| | | |
| | | memberWalletContractDao.increaseWalletContractBalanceById(changeAmount, profitOrLoss.subtract(fee), null, walletContract.getId()); |
| | | |
| | | // ThreadPoolUtils.sendWholeForceClosingPrice(holdOrderEntity.getSymbol(), memberEntity); |
| | | ThreadPoolUtils.sendWholeForceClosingPrice(holdOrderEntity.getSymbol(), memberEntity); |
| | | // 计算佣金 |
| | | ThreadPoolUtils.calReturnMoney(memberEntity.getId(), fee, contractOrderEntity, AgentReturnEntity.ORDER_TYPE_CLOSE); |
| | | |