package com.ssm.manage.service.impl;

import com.ssm.manage.dao.RlMenuPowerDao;
import com.ssm.manage.dto.RlMenuPowerDto;
import com.ssm.manage.entity.RlMenuPower;
import com.ssm.manage.service.RlMenuPowerService;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ssm.core.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import com.ssm.manage.dao.BaseDao;
import com.ssm.core.impl.BaseDaoImpl;

import java.io.Serializable;
import java.util.List;

import tk.mybatis.mapper.entity.Example;

/**
 * 菜单权限(RlMenuPower)表服务实现类
 *
 * @author makejava
 * @since 2023-12-13 15:34:06
 */
@Service("rlMenuPowerService")
public class RlMenuPowerServiceImpl extends BaseServiceImpl<RlMenuPower> implements RlMenuPowerService {
    @Autowired
    private RlMenuPowerDao rlMenuPowerDao;

    @Override
    public BaseDao<RlMenuPower> getDao() {
        return rlMenuPowerDao;
    }

    @Override
    public PageInfo<RlMenuPower> selectPage(RlMenuPowerDto dto) {
        Example example = new Example(RlMenuPower.class);
        Example.Criteria criteria = example.createCriteria();
        PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
        List<RlMenuPower> list = this.rlMenuPowerDao.selectByExample(example);
        PageInfo<RlMenuPower> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
