package com.mx.cneeds.server.user.service.impl;

import com.mx.cneeds.common.pager.PageUtils;
import com.mx.cneeds.common.pager.Query;
import com.mx.cneeds.server.dao.SysFuncDao;
import com.mx.cneeds.server.entity.SysFuncEntity;
import com.mx.cneeds.server.user.service.SysFuncService;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;



@Service("sysFuncService")
public class SysFuncServiceImpl extends ServiceImpl<SysFuncDao, SysFuncEntity> implements SysFuncService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SysFuncEntity> page = this.page(
                new Query<SysFuncEntity>().getPage(params),
                new QueryWrapper<SysFuncEntity>()
        );
        return new PageUtils(page);
    }

    @Override
    public List<SysFuncEntity> queryFuncByIds(Collection<Long> funcId){
        List<SysFuncEntity> sysFuncEntities = getBaseMapper().selectBatchIds(funcId);
        return sysFuncEntities;
    }

}
