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

import com.xunhong.erp.turbo.api.user.dto.qry.UserAuthShowQry;
import com.xunhong.erp.turbo.api.user.dto.vo.UserAuthVO;
import com.xunhong.erp.turbo.user.app.assembler.UserAuthAssembler;
import com.xunhong.erp.turbo.user.domain.entity.UserAuth;
import com.xunhong.erp.turbo.user.domain.gateway.UserAuthGateway;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * @author shenyifei
 */
@Component
@RequiredArgsConstructor
public class UserAuthShowQryExe {

	private final UserAuthGateway userAuthGateway;
	private final UserAuthAssembler userAuthAssembler;

	public UserAuthVO execute(UserAuthShowQry userAuthShowQry) {
		UserAuth userAuth = userAuthGateway.show(userAuthShowQry);
		return userAuthAssembler.toUserAuthVO(userAuth);
	}
}
