@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);
}