package com.neusoft.smart.pos.gateway.task;

import com.neusoft.smart.pos.dto.trade.response.GetOrderInfoByOrderNumberResponse;
import com.neusoft.smart.pos.framework.task.RedisTask;
import com.neusoft.smart.pos.framework.utils.SpringUtils;
import com.neusoft.smart.pos.gateway.service.PrinterService;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class PrinterTask extends RedisTask {
	
	@Setter
	private GetOrderInfoByOrderNumberResponse orderInfo;
	
	@Setter
	private String operationType;
	
	private PrinterService printerService = SpringUtils.getBean(PrinterService.class);
	
	@Override
	public void executeTask() {
		printerService.pushPrinterTaskByOrderNumber(orderInfo,operationType);
	}
	
}
