| | |
| | | throw new FebsException("预约超时"); |
| | | } |
| | | MallProductBuy mallProductBuy = mallProductBuyMapper.selectMemberIdAndNFTIdAndStateAndMateState( |
| | | memberId,productNFTId,ProductEnum.PRODUCT_BUY_ON_GOING.getValue(),null); |
| | | memberId,productNFTId,ProductEnum.PRODUCT_BUY_ON_GOING.getValue(),ProductEnum.PRODUCT_BUY_MATE_STATE_FAIL.getValue()); |
| | | if(ObjectUtil.isNotEmpty(mallProductBuy)){ |
| | | throw new FebsException("不可重复预约"); |
| | | } |
| | |
| | | mallProductBuy.setState(ProductEnum.PRODUCT_BUY_ON_GOING.getValue()); |
| | | mallProductBuy.setMateState(ProductEnum.PRODUCT_BUY_MATE_STATE_FAIL.getValue()); |
| | | mallProductBuy.setNftTotal(mallProductNft.getPriceNft()); |
| | | mallProductBuy.setNftAva(BigDecimal.ZERO); |
| | | mallProductBuy.setNftAva(mallProductNft.getPriceNft()); |
| | | // mallProductBuy.setNftAva(BigDecimal.ZERO); |
| | | mallProductBuyMapper.insert(mallProductBuy); |
| | | //令牌 可用减少,冻结增加 |
| | | mallMemberAmount.setTokenAva(mallMemberAmount.getTokenAva().subtract(priceToken)); |
| | |
| | | mallMemberAmount.setTrendsNft(mallMemberAmount.getTrendsNft().subtract(nftCnt)); |
| | | mallMemberAmountMapper.updateTrendsNftById(mallMemberAmount); |
| | | |
| | | mallMemberAmount.setFcmCntAva(mallMemberAmount.getFcmCntAva().subtract(fcmFeeCnt)); |
| | | mallMemberAmountMapper.updateFcmCntAvaById(mallMemberAmount); |
| | | |
| | | mallMemberAmount.setFrozenNft(mallMemberAmount.getFrozenNft().add(nftCntAva)); |
| | | mallMemberAmountMapper.updateFrozenNftById(mallMemberAmount); |
| | | iMallMoneyFlowService.addMoneyFlow( |