package com.ssm.manage.service.impl;

import com.ssm.manage.dao.RlRoleStaffDao;
import com.ssm.manage.dto.RlRoleStaffDto;
import com.ssm.manage.entity.RlRoleStaff;
import com.ssm.manage.service.RlRoleStaffService;
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;

/**
 * 角色(RlRoleStaff)表服务实现类
 *
 * @author makejava
 * @since 2023-12-13 15:34:07
 */
@Service("rlRoleStaffService")
public class RlRoleStaffServiceImpl extends BaseServiceImpl<RlRoleStaff> implements RlRoleStaffService {
    @Autowired
    private RlRoleStaffDao rlRoleStaffDao;

    @Override
    public BaseDao<RlRoleStaff> getDao() {
        return rlRoleStaffDao;
    }

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