package com.philisense.www.dao.impl;

import com.philisense.www.dao.JwtPermissionDAO;
import com.philisense.www.mapper.SecurityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;


import java.util.Map;
import java.util.Set;

@Repository
public class JwtPermissionDAOImpl implements JwtPermissionDAO {

    @Autowired
    private SecurityMapper securityMapper;

    @Override
    public Set<Map<String, Object>> getAuthoritiesByUserId(String userid) {
        return securityMapper.getAuthoritiesByUserId(userid);
    }

    @Override
    public Set<Map<String, Object>> getAuthoritiesNoGroupByUserId(String userid) {
        return securityMapper.getAuthoritiesNoGroupByUserId(userid);
    }

    @Override
    public Map<String, Object> getByUsername(String username) {
        return securityMapper.getByUsername(username);
    }

    @Override
    public Map<String, Object> getUserByMap(Map<String,Object> map) {
        return securityMapper.getUserByMap(map);
    }

    @Override
    public Set<Map<String, Object>> getAllUrlResources(Map<String, Object> map) {
        return securityMapper.getAllUrlResources(map);
    }

    @Override
    public Set<Map<String, Object>> getMenusByParentId(Map<String,Object> map) {
        return securityMapper.getMenusByParentId(map);
    }

    @Override
    public Set<Map<String, Object>> getAllMenuUrlResources(Map<String, Object> map) {
        return securityMapper.getAllMenuUrlResources(map);
    }
}
