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

import com.xunhong.erp.turbo.api.biz.dto.qry.OrderShipShowQry;
import com.xunhong.erp.turbo.api.biz.dto.vo.OrderShipVO;
import com.xunhong.erp.turbo.biz.app.assembler.OrderShipAssembler;
import com.xunhong.erp.turbo.biz.domain.entity.OrderShip;
import com.xunhong.erp.turbo.biz.domain.gateway.OrderShipGateway;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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

	private final OrderShipAssembler orderShipAssembler;
	private final OrderShipGateway orderShipGateway;

	public OrderShipVO execute(OrderShipShowQry orderShipShowQry) {
		OrderShip orderShip = orderShipGateway.show(orderShipShowQry);

		return orderShipAssembler.toOrderShipVO(orderShip);
	}
}

