微信支付 - 构建商户端支付成功的回调接口

    科技2024-10-18  22

    @PostMapping("notifyMerchantOrderPaid") public Integer notifyMerchantOrderPaid(String merchantOrderId) { orderService.updateOrderStatus(merchantOrderId, OrderStatusEnum.WAIT_DELIVER.type); return HttpStatus.OK.value(); } /** * 修改订单状态 * @param orderId * @param orderStatus */ public void updateOrderStatus(String orderId, Integer orderStatus); @Transactional(propagation = Propagation.REQUIRED) @Override public void updateOrderStatus(String orderId, Integer orderStatus) { OrderStatus paidStatus = new OrderStatus(); paidStatus.setOrderId(orderId); paidStatus.setOrderStatus(orderStatus); paidStatus.setPayTime(new Date()); orderStatusMapper.updateByPrimaryKeySelective(paidStatus); }

     

    Processed: 0.023, SQL: 8