//package cn.cecep.talroad.util;
//
//import com.rabbitmq.client.Channel;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener;
//import org.springframework.stereotype.Component;
//
///**
// * @Auther: cjh
// * @Date: 2023-04-17 11:02
// * @Class: MsgReceiver
// * @Deseription: 停限产状态消息消费
// * @Version V1.0
// */
//@Slf4j
//@Component
//public class StatusConsumer implements ChannelAwareMessageListener {
//
//
//    @Override
//    //@RabbitListener(queues = "status-queue")
//    public void onMessage(Message message, Channel channel) throws Exception {
////        try {
////            String deviceId = new String(message.getBody());
////            BasDevice d = deviceMapper.selectById(deviceId);
////            PcFactory p = pcFactoryMapper.selectPcFactoryById(d.getFactoryId());
////
////            QueryWrapper<BasDeviceParam> paramWrapper = new QueryWrapper<>();
////            paramWrapper.eq("industry", d.getIndustry());
////            paramWrapper.eq("device_id", d.getDeviceId());
////            paramWrapper.eq("device_type",d.getType());
////            List<BasDeviceParam> paramList = basDeviceParamMapper.selectList(paramWrapper);
////            //拼接策略服务名称
////            String strategyName = StringUtils.upperCase(d.getIndustry() + d.getType());
////            //执行策略，处理设备状态
////            strategyFactory.getByName(strategyName).doCheckProcess(p, d, paramList);
////
////        } catch (Exception e) {
////            log.error("MsgReceiver.onMessage##失败:" + e.getMessage());
////        } finally {
////            //ACK 手动签收消息，告诉对方消息签收成功,唯一标识ID
////            Long deliverTag = message.getMessageProperties().getDeliveryTag();
////            channel.basicAck(deliverTag, false);
////        }
//    }
//}
