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

import cn.newfeifan.mall.module.pay.dal.dataobject.order.PayOrderDO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Slf4j
@Component
public class TopUpConsumptionPointsProducer {

    @Resource
    private ApplicationContext applicationContext;

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