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

import com.xunhong.erp.turbo.api.biz.dto.qry.BoxSpecShowQry;
import com.xunhong.erp.turbo.api.biz.dto.vo.BoxSpecVO;
import com.xunhong.erp.turbo.biz.app.assembler.BoxSpecAssembler;
import com.xunhong.erp.turbo.biz.domain.entity.BoxSpec;
import com.xunhong.erp.turbo.biz.domain.gateway.BoxSpecGateway;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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

    private final BoxSpecAssembler boxSpecAssembler;
    private final BoxSpecGateway boxSpecGateway;

    public BoxSpecVO execute(BoxSpecShowQry boxSpecShowQry) {
        BoxSpec boxSpec = boxSpecGateway.show(boxSpecShowQry);

        return boxSpecAssembler.toBoxSpecVO(boxSpec);
    }
}

