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

import com.xunhong.erp.turbo.api.infra.dto.qry.PlatformShowQry;
import com.xunhong.erp.turbo.api.infra.dto.vo.PlatformVO;
import com.xunhong.erp.turbo.infra.app.assembler.PlatformAssembler;
import com.xunhong.erp.turbo.infra.domain.entity.Platform;
import com.xunhong.erp.turbo.infra.domain.gateway.PlatformGateway;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * @author shenyifei
 */
@Component
@RequiredArgsConstructor
public class PlatformShowQryExe {
	private final PlatformAssembler platformAssembler;

	private final PlatformGateway platformGateway;

	public PlatformVO execute(PlatformShowQry platformShowQry) {
		Platform platform = platformGateway.show(platformShowQry);

		return platformAssembler.toPlatformVO(platform);
	}
}
