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

import com.xunhong.erp.turbo.api.rbac.dto.qry.PermissionShowQry;
import com.xunhong.erp.turbo.api.rbac.dto.vo.PermissionVO;
import com.xunhong.erp.turbo.rbac.app.assembler.PermissionAssembler;
import com.xunhong.erp.turbo.rbac.domain.gateway.PermissionGateway;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class PermissionShowQryExe {
	private final PermissionGateway permissionGateway;
	private final PermissionAssembler permissionAssembler;

	public PermissionVO execute(PermissionShowQry permissionShowQry) {
		return permissionAssembler.toPermissionVO(permissionGateway.show(permissionShowQry));
	}
}
