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

import com.xunhong.erp.turbo.api.biz.dto.qry.BoxProductShowQry;
import com.xunhong.erp.turbo.api.biz.dto.vo.BoxProductVO;
import com.xunhong.erp.turbo.biz.app.assembler.BoxProductAssembler;
import com.xunhong.erp.turbo.biz.domain.entity.BoxProduct;
import com.xunhong.erp.turbo.biz.domain.gateway.BoxProductGateway;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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

	private final BoxProductAssembler boxProductAssembler;
	private final BoxProductGateway boxProductGateway;

	public BoxProductVO execute(BoxProductShowQry boxProductShowQry) {
		BoxProduct boxProduct = boxProductGateway.show(boxProductShowQry);

		return boxProductAssembler.toBoxProductVO(boxProduct);
	}
}

