//package cn.superdesk.uniorder.queue.redis.model002;
//
//import cn.superdesk.uniorder.dao.entity.accounting.unified.supplier.AccountingUnifiedSupplier;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Service;
//
//import java.util.List;
//import java.util.Map;
//import java.util.function.Consumer;
//
//@Slf4j
//@Service
//public class OrderSendRedisConsumer extends Thread {
//
//
//	private RedisTaskContainer container;
//
//	private Consumer<Map<String, List<AccountingUnifiedSupplier>>> consumer;
//
//	public OrderSendRedisConsumer(RedisTaskContainer container, Consumer<Map<String, List<AccountingUnifiedSupplier>>> consumer) {
//		this.container = container;
//		this.consumer = consumer;
//	}
//
//	@Override
//	public void run() {
//		try {
//			while (true) {
//				Map<String, List<AccountingUnifiedSupplier>> value = container.getRedisQueue().takeFromTail();//cast exception? you should check.
//				// 逐个执行
//				if (value != null) {
//					try {
//						consumer.accept(value);
//					} catch (Exception e) {
//						log.error("调用失败", e);
//					}
//				}
//			}
//		} catch (Exception e) {
//			log.error("轮循线程异常退出", e);
//		}
//	}
//}
