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

import com.xunhong.erp.turbo.api.biz.dto.qry.ShipOrderShowQry;
import com.xunhong.erp.turbo.api.biz.dto.vo.ShipOrderVO;
import com.xunhong.erp.turbo.biz.app.assembler.ShipOrderAssembler;
import com.xunhong.erp.turbo.biz.domain.entity.ShipOrder;
import com.xunhong.erp.turbo.biz.domain.gateway.ShipOrderGateway;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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

	private final ShipOrderAssembler shipOrderAssembler;
	private final ShipOrderGateway shipOrderGateway;

	public ShipOrderVO execute(ShipOrderShowQry shipOrderShowQry) {
		ShipOrder shipOrder = shipOrderGateway.show(shipOrderShowQry);

		return shipOrderAssembler.toShipOrderVO(shipOrder);
	}
}

