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

import com.xunhong.erp.turbo.api.biz.dto.qry.GiftBoxShowQry;
import com.xunhong.erp.turbo.api.biz.dto.vo.GiftBoxVO;
import com.xunhong.erp.turbo.biz.app.assembler.GiftBoxAssembler;
import com.xunhong.erp.turbo.biz.domain.entity.GiftBox;
import com.xunhong.erp.turbo.biz.domain.gateway.GiftBoxGateway;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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

	private final GiftBoxAssembler giftBoxAssembler;
	private final GiftBoxGateway giftBoxGateway;

	public GiftBoxVO execute(GiftBoxShowQry giftBoxShowQry) {
		GiftBox giftBox = giftBoxGateway.show(giftBoxShowQry);

		return giftBoxAssembler.toGiftBoxVO(giftBox);
	}
}

