| | |
| | | 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()); |