| | |
| | | } |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public FebsResponse updateOrderDetail(Long id) { |
| | | MallInvoice mallInvoice = this.baseMapper.selectById(id); |
| | | String fapiaoApplyId = mallInvoice.getFapiaoApplyId(); |
| | | MallOrderInfo mallOrderInfo = mallOrderInfoMapper.selectBypayOrderNo(fapiaoApplyId); |
| | | if(OrderStatusEnum.FINISH.getValue() != mallOrderInfo.getStatus()){ |
| | | return new FebsResponse().fail().message("当前订单还未完成。"); |
| | | } |
| | | /** |
| | | * fapiao_apply_id |
| | | * 发票申请单号,唯一标识一次开票行为。微信支付场景下,为微信支付订单号;非微信支付场景下,为调用【获取抬头填写链接】接口时指定的发票申请单号 |
| | | * 对应订单信息的pay_order_no支付订单号 |
| | | */ |
| | | mallInvoice.setStatus(mallOrderInfo.getStatus()); |
| | | this.baseMapper.updateById(mallInvoice); |
| | | /** |
| | | * 更新订单为已开票 |
| | | */ |
| | | mallOrderInfo.setIsInvoice(1); |
| | | mallOrderInfoMapper.updateById(mallOrderInfo); |
| | | return new FebsResponse().success(); |
| | | } |
| | | } |