package com.buy507.mall.service.impl;

import com.buy507.mall.dao.TmsRolelistDao;
import com.buy507.mall.model.TmsPermission;
import com.buy507.mall.model.TmsRolelist;
import com.buy507.mall.service.TmsRolelistService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TmsRolelistServiceImpl implements TmsRolelistService {

    @Autowired
    private TmsRolelistDao dao;

    @Autowired
    private TmsRolelistDao selectPermission;

    @Override
    public List<TmsRolelist> list(Integer pageSize, Integer pageNum){
        PageHelper.startPage(pageNum, pageSize);
        List<TmsRolelist>   userList = (List<TmsRolelist>)dao.selectAll();
        return userList;
    }

    @Override
    public List<TmsPermission> PermissionList(Long Id) {
        return  selectPermission.selectPermissionId(Id);
        }
}
