package com.xunhong.erp.turbo.biz.app.service;

import com.xunhong.erp.turbo.api.biz.api.CompanyPaymentAccountServiceI;
import com.xunhong.erp.turbo.api.biz.dto.cmd.CompanyPaymentAccountCreateCmd;
import com.xunhong.erp.turbo.api.biz.dto.cmd.CompanyPaymentAccountDestroyCmd;
import com.xunhong.erp.turbo.api.biz.dto.cmd.CompanyPaymentAccountUpdateCmd;
import com.xunhong.erp.turbo.api.biz.dto.qry.CompanyPaymentAccountListQry;
import com.xunhong.erp.turbo.api.biz.dto.qry.CompanyPaymentAccountPageQry;
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.base.dto.PageDTO;
import com.xunhong.erp.turbo.biz.app.executor.cmd.CompanyPaymentAccountCreateCmdExe;
import com.xunhong.erp.turbo.biz.app.executor.cmd.CompanyPaymentAccountDestroyCmdExe;
import com.xunhong.erp.turbo.biz.app.executor.cmd.CompanyPaymentAccountUpdateCmdExe;
import com.xunhong.erp.turbo.biz.app.executor.query.CompanyPaymentAccountListQryExe;
import com.xunhong.erp.turbo.biz.app.executor.query.CompanyPaymentAccountPageQryExe;
import com.xunhong.erp.turbo.biz.app.executor.query.CompanyPaymentAccountShowQryExe;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author shenyifei
 */
@Slf4j
@Service
@DubboService(interfaceClass = CompanyPaymentAccountServiceI.class, version = "1.0.0")
@RequiredArgsConstructor
public class CompanyPaymentAccountServiceImpl implements CompanyPaymentAccountServiceI {

	private final CompanyPaymentAccountCreateCmdExe companyPaymentAccountCreateCmdExe;
	private final CompanyPaymentAccountUpdateCmdExe companyPaymentAccountUpdateCmdExe;
	private final CompanyPaymentAccountPageQryExe companyPaymentAccountPageQryExe;
	private final CompanyPaymentAccountListQryExe companyPaymentAccountListQryExe;
	private final CompanyPaymentAccountShowQryExe companyPaymentAccountShowQryExe;
	private final CompanyPaymentAccountDestroyCmdExe companyPaymentAccountDestroyCmdExe;

	@Override
	public CompanyPaymentAccountVO create(CompanyPaymentAccountCreateCmd companyPaymentAccountCreateCmd) {
		return companyPaymentAccountCreateCmdExe.execute(companyPaymentAccountCreateCmd);
	}

	@Override
	public PageDTO<CompanyPaymentAccountVO> page(CompanyPaymentAccountPageQry companyPaymentAccountPageQry) {
		return PageDTO.of(companyPaymentAccountPageQryExe.execute(companyPaymentAccountPageQry));
	}

	@Override
	public List<CompanyPaymentAccountVO> list(CompanyPaymentAccountListQry companyPaymentAccountListQry) {
		return companyPaymentAccountListQryExe.execute(companyPaymentAccountListQry);
	}

	@Override
	public CompanyPaymentAccountVO update(CompanyPaymentAccountUpdateCmd companyPaymentAccountUpdateCmd) {
		return companyPaymentAccountUpdateCmdExe.execute(companyPaymentAccountUpdateCmd);
	}

	@Override
	public CompanyPaymentAccountVO show(CompanyPaymentAccountShowQry companyPaymentAccountShowQry) {
		return companyPaymentAccountShowQryExe.execute(companyPaymentAccountShowQry);
	}

	@Override
	public void destroy(CompanyPaymentAccountDestroyCmd companyPaymentAccountDestroyCmd) {
		companyPaymentAccountDestroyCmdExe.execute(companyPaymentAccountDestroyCmd);
	}
}

