//package com.yn.bftl.thirdparty.listener;
//
//import com.yn.bftl.common.modules.order.enums.PushEnum;
//import com.yn.bftl.thirdparty.common.service.PushService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//import java.util.Map;
//
///**
// * 监听小程序消息
// *
// * @author huabiao
// * @create 2021/12/6  15:35
// **/
//@Component
//@RabbitListener(queues = "small_program_message.queue")
//@Slf4j
//public class SmallProgramMessageListener {
//
//    @Resource
//    private PushService pushService;
//
//    @RabbitHandler
//    public void process(Map map) {
//        String s =null;
//        try {
//            // 获取小程序消息队列
//            String id = map.get("id").toString();
//            PushEnum pushType = PushEnum.valueOf(map.get("pushType").toString());
//            log.info("接收到单据ID：" + id);
//            log.info("接收到发送类型：" + pushType);
//            // 根据不同发送类型调用接口
//            s=  pushService.pushMessage(Long.valueOf(id),pushType);
//        }catch (Exception e){
//            log.error("处理小程序消息失败"+s);
//        }
//
//    }
//}