package cn.newfeifan.mall.module.pay.order;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Slf4j
@Component
public class TradeOrderProducer {
    @Resource
    private ApplicationContext applicationContext;


    /**
     * 发送订单消息
     *
     * @param payOrderId 支付订单id
     */
    public void sendTradeOrderMessage(Long payOrderId) {
        applicationContext.publishEvent(payOrderId);
    }

}
