package com.rongwei.bscommon.sys.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bsentity.domain.FsFileNavigationDo;
import com.rongwei.bscommon.sys.dao.FsFileNavigationDao;
import com.rongwei.bscommon.sys.service.FsFileNavigationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * <p>
 * 奥克宁可——文件导航 服务实现类
 * </p>
 *
 * @author trj
 * @since 2023-07-17
 */
@Slf4j
@Service
public class FsFileNavigationServiceImpl extends ServiceImpl<FsFileNavigationDao, FsFileNavigationDo> implements FsFileNavigationService {

    @Override
    public Map<String,String> getAllByNodeName(ArrayList<String> nodeName) {
        List<FsFileNavigationDo> fsFileNavigationDos =  baseMapper.getAllByNodeName(nodeName);
        Map<String, String> IdByNameMap = fsFileNavigationDos.stream().collect(Collectors.toMap(FsFileNavigationDo::getNodename, FsFileNavigationDo::getId));
        return IdByNameMap;
    }
}
