package com.ssm.manage.service.impl;

import com.ssm.manage.dao.RlRolePowerDao;
import com.ssm.manage.dto.RlRolePowerDto;
import com.ssm.manage.entity.RlRolePower;
import com.ssm.manage.service.RlRolePowerService;
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;

/**
 * 新登录（门店角色关联菜单）(RlRolePower)表服务实现类
 *
 * @author makejava
 * @since 2023-12-13 15:34:04
 */
@Service("rlRolePowerService")
public class RlRolePowerServiceImpl extends BaseServiceImpl<RlRolePower> implements RlRolePowerService {
    @Autowired
    private RlRolePowerDao rlRolePowerDao;

    @Override
    public BaseDao<RlRolePower> getDao() {
        return rlRolePowerDao;
    }

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