| | |
| | | OrderModel model = new OrderModel(entrustOrderEntity.getId(), RabbitPriceTypeEnum.ENTRUST_OPEN_MORE.getValue(), submitEntrustDto.getEntrustPrice().setScale(8, RoundingMode.HALF_UP).toPlainString(), submitEntrustDto.getSymbol()); |
| | | producer.sendPriceOperate(JSONObject.toJSONString(model)); |
| | | |
| | | LogRecordUtils.insertMemberAccountFlow(memberEntity.getId(), entrustTotalAmount, walletContract.getTotalBalance(), submitEntrustDto.getSymbol(), "买涨持仓", "买涨:" + submitEntrustDto.getSymbol()); |
| | | LogRecordUtils.insertMemberAccountFlow(memberEntity.getId(), entrustTotalAmount, walletContract.getAvailableBalance().subtract(entrustTotalAmount), submitEntrustDto.getSymbol(), "委托买涨", "买涨:" + submitEntrustDto.getSymbol()); |
| | | } else { |
| | | OrderModel model = new OrderModel(entrustOrderEntity.getId(), RabbitPriceTypeEnum.ENTRUST_OPEN_LESS.getValue(), submitEntrustDto.getEntrustPrice().setScale(8, RoundingMode.HALF_UP).toPlainString(), submitEntrustDto.getSymbol()); |
| | | producer.sendPriceOperate(JSONObject.toJSONString(model)); |
| | | |
| | | LogRecordUtils.insertMemberAccountFlow(memberEntity.getId(), entrustTotalAmount, walletContract.getTotalBalance(), submitEntrustDto.getSymbol(), "买跌持仓", "买跌:" + submitEntrustDto.getSymbol()); |
| | | LogRecordUtils.insertMemberAccountFlow(memberEntity.getId(), entrustTotalAmount, walletContract.getAvailableBalance().subtract(entrustTotalAmount), submitEntrustDto.getSymbol(), "委托买跌", "买跌:" + submitEntrustDto.getSymbol()); |
| | | } |
| | | |
| | | return Result.ok(MessageSourceUtils.getString("result_success_msg")); |
| | |
| | | contractEntrustOrderDao.deleteById(entrustOrderEntity.getId()); |
| | | |
| | | // 插入财务流水 |
| | | LogRecordUtils.insertMemberAccountFlow(memberEntity.getId(), total, walletContractEntity.getTotalBalance(), entrustOrderEntity.getSymbol(), "撤销委托单", "撤销委托单"); |
| | | LogRecordUtils.insertMemberAccountFlow(memberEntity.getId(), total, walletContractEntity.getAvailableBalance().add(total), entrustOrderEntity.getSymbol(), "撤销委托单", "撤销委托单"); |
| | | if (i > 0) { |
| | | return Result.ok(MessageSourceUtils.getString("cancellation_success")); |
| | | } |