package com.xunhong.erp.turbo.biz.app.executor.query;

import com.xunhong.erp.turbo.api.biz.dto.qry.DealerRebateCustomerShowQry;
import com.xunhong.erp.turbo.api.biz.dto.vo.DealerRebateCustomerVO;
import com.xunhong.erp.turbo.biz.app.assembler.DealerRebateCustomerAssembler;
import com.xunhong.erp.turbo.biz.domain.entity.DealerRebateCustomer;
import com.xunhong.erp.turbo.biz.domain.gateway.DealerRebateCustomerGateway;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author shenyifei
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class DealerRebateCustomerShowQryExe {

	private final DealerRebateCustomerAssembler dealerRebateCustomerAssembler;
	private final DealerRebateCustomerGateway dealerRebateCustomerGateway;

	public DealerRebateCustomerVO execute(DealerRebateCustomerShowQry dealerRebateCustomerShowQry) {
		DealerRebateCustomer dealerRebateCustomer = dealerRebateCustomerGateway.show(dealerRebateCustomerShowQry);

		return dealerRebateCustomerAssembler.toDealerRebateCustomerVO(dealerRebateCustomer);
	}
}

