package com.xunhong.erp.turbo.rbac.app.service;

import cn.hutool.core.lang.tree.Tree;
import com.xunhong.erp.turbo.api.rbac.api.UserMenuServiceI;
import com.xunhong.erp.turbo.api.rbac.dto.qry.RoleMenuTreeQry;
import com.xunhong.erp.turbo.rbac.app.executor.query.UserMenuQryExe;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
@DubboService(interfaceClass = UserMenuServiceI.class, version = "1.0.0")
@RequiredArgsConstructor
public class UserMenuServiceImpl implements UserMenuServiceI {
	private final UserMenuQryExe userMenuQryExe;

	@Override
	public List<Tree<Long>> list(RoleMenuTreeQry roleMenuTreeQry) {
		return userMenuQryExe.execute(roleMenuTreeQry);
	}
}
