package com.ssm.manage.service.impl;

import com.ssm.manage.dao.StaffLoginRecordingDao;
import com.ssm.manage.dto.StaffLoginRecordingDto;
import com.ssm.manage.entity.StaffLoginRecording;
import com.ssm.manage.service.StaffLoginRecordingService;
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;

/**
 * (StaffLoginRecording)表服务实现类
 *
 * @author makejava
 * @since 2023-12-14 15:35:23
 */
@Service("staffLoginRecordingService")
public class StaffLoginRecordingServiceImpl extends BaseServiceImpl<StaffLoginRecording> implements StaffLoginRecordingService {
    @Autowired
    private StaffLoginRecordingDao staffLoginRecordingDao;

    @Override
    public BaseDao<StaffLoginRecording> getDao() {
        return staffLoginRecordingDao;
    }

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