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

import com.xunhong.erp.turbo.api.biz.dto.qry.CompanyPaymentAccountShowQry;
import com.xunhong.erp.turbo.api.biz.dto.vo.CompanyPaymentAccountVO;
import com.xunhong.erp.turbo.biz.app.assembler.CompanyPaymentAccountAssembler;
import com.xunhong.erp.turbo.biz.domain.entity.CompanyPaymentAccount;
import com.xunhong.erp.turbo.biz.domain.gateway.CompanyPaymentAccountGateway;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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

	private final CompanyPaymentAccountAssembler companyPaymentAccountAssembler;
	private final CompanyPaymentAccountGateway companyPaymentAccountGateway;

	public CompanyPaymentAccountVO execute(CompanyPaymentAccountShowQry companyPaymentAccountShowQry) {
		CompanyPaymentAccount companyPaymentAccount = companyPaymentAccountGateway.show(companyPaymentAccountShowQry);

		return companyPaymentAccountAssembler.toCompanyPaymentAccountVO(companyPaymentAccount);
	}
}

