| | |
| | | private final MallProductBuyRecordMapper mallProductBuyRecordMapper; |
| | | private final IMallMoneyFlowService mallMoneyFlowService; |
| | | private final AgentProducer agentProducer; |
| | | private final MallMemberSpeakMapper mallMemberSpeakMapper; |
| | | |
| | | @Override |
| | | public IPage<AdminMallNewsInfoVo> getNewInfoList(MallNewsInfo mallNewsInfo, QueryRequest request) { |
| | |
| | | mallProductBuyRecord.setMemberId(mallProductSell.getMemberId()); |
| | | mallProductBuyRecord.setSellRecordId(mallProductSellRecord.getId()); |
| | | mallProductBuyRecord.setPickNftCnt(pickNftCnt); |
| | | mallProductBuyRecord.setBuyOrderNo(mallProductBuy.getOrderNo()); |
| | | mallProductBuyRecord.setState(ProductEnum.PRODUCT_MATE_STATE_WAIT_PAY.getValue()); |
| | | mallProductBuyRecord.setOrderTime(orderTime); |
| | | mallProductBuyRecordMapper.insert(mallProductBuyRecord); |
| | |
| | | if(ObjectUtil.isEmpty(mallProductBuyRecord)){ |
| | | throw new FebsException("记录不存在"); |
| | | } |
| | | Integer state = mallProductBuyRecord.getState(); |
| | | if(ProductEnum.PRODUCT_MATE_STATE_WAIT_PAY.getValue() != state){ |
| | | throw new FebsException("记录不是待支付状态"); |
| | | } |
| | | // Integer state = mallProductBuyRecord.getState(); |
| | | // if(ProductEnum.PRODUCT_MATE_STATE_WAIT_PAY.getValue() != state){ |
| | | // throw new FebsException("记录不是待支付状态"); |
| | | // } |
| | | |
| | | MallProductSellRecord mallProductSellRecord = mallProductSellRecordMapper.selectById(mallProductBuyRecord.getSellRecordId()); |
| | | if(ObjectUtil.isEmpty(mallProductSellRecord)){ |
| | | throw new FebsException("记录不存在"); |
| | | } |
| | | Integer stateSell = mallProductSellRecord.getState(); |
| | | if(ProductEnum.PRODUCT_MATE_STATE_WAIT_PAY.getValue() != stateSell){ |
| | | throw new FebsException("记录不是待支付状态"); |
| | | } |
| | | // Integer stateSell = mallProductSellRecord.getState(); |
| | | // if(ProductEnum.PRODUCT_MATE_STATE_WAIT_PAY.getValue() != stateSell){ |
| | | // throw new FebsException("记录不是待支付状态"); |
| | | // } |
| | | |
| | | DateTime payTime = DateUtil.date(); |
| | | mallProductBuyRecord.setState(ProductEnum.PRODUCT_MATE_STATE_PAY.getValue()); |
| | |
| | | if(ObjectUtil.isEmpty(mallProductBuyRecord)){ |
| | | throw new FebsException("记录不存在"); |
| | | } |
| | | Integer state = mallProductBuyRecord.getState(); |
| | | if(ProductEnum.PRODUCT_MATE_STATE_PAY.getValue() != state){ |
| | | throw new FebsException("记录不是已支付状态"); |
| | | } |
| | | // Integer state = mallProductBuyRecord.getState(); |
| | | // if(ProductEnum.PRODUCT_MATE_STATE_PAY.getValue() != state){ |
| | | // throw new FebsException("记录不是已支付状态"); |
| | | // } |
| | | Long sellRecordId = mallProductBuyRecord.getSellRecordId(); |
| | | MallProductSellRecord mallProductSellRecord = mallProductSellRecordMapper.selectById(mallProductBuyRecord.getSellRecordId()); |
| | | if(ObjectUtil.isEmpty(mallProductSellRecord)){ |
| | | throw new FebsException("记录不存在"); |
| | | } |
| | | Integer stateSell = mallProductSellRecord.getState(); |
| | | if(ProductEnum.PRODUCT_MATE_STATE_PAY.getValue() != stateSell){ |
| | | throw new FebsException("记录不是已支付状态"); |
| | | } |
| | | // Integer stateSell = mallProductSellRecord.getState(); |
| | | // if(ProductEnum.PRODUCT_MATE_STATE_PAY.getValue() != stateSell){ |
| | | // throw new FebsException("记录不是已支付状态"); |
| | | // } |
| | | |
| | | mallProductBuyRecord.setState(ProductEnum.PRODUCT_MATE_STATE_CONFIRM.getValue()); |
| | | mallProductBuyRecordMapper.updateById(mallProductBuyRecord); |
| | |
| | | if(ObjectUtil.isEmpty(mallProductBuyRecord)){ |
| | | throw new FebsException("记录不存在"); |
| | | } |
| | | Integer state = mallProductBuyRecord.getState(); |
| | | if(ProductEnum.PRODUCT_MATE_STATE_WAIT_PAY.getValue() != state){ |
| | | throw new FebsException("记录不是待支付状态"); |
| | | } |
| | | // Integer state = mallProductBuyRecord.getState(); |
| | | // if(ProductEnum.PRODUCT_MATE_STATE_WAIT_PAY.getValue() != state){ |
| | | // throw new FebsException("记录不是待支付状态"); |
| | | // } |
| | | Long sellRecordId = mallProductBuyRecord.getSellRecordId(); |
| | | //更新买单子表的数据 |
| | | mallProductBuyRecord.setState(ProductEnum.PRODUCT_MATE_STATE_FAIL.getValue()); |
| | |
| | | mallProductSellMapper.updateById(mallProductSell); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<MallMemberSpeak> getSpeakList(MallMemberSpeak mallMemberSpeak, QueryRequest request) { |
| | | Page<MallMemberSpeak> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<MallMemberSpeak> adminMallNewsInfoVoIPage = mallProductSellMapper.getSpeakListInPage(page, mallMemberSpeak); |
| | | return adminMallNewsInfoVoIPage; |
| | | } |
| | | } |