package com.lz.modules.app.service.impl;

import com.lz.modules.app.dto.StaffWorkTransferDto;
import org.springframework.stereotype.Service;

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;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.Query;

import com.lz.modules.app.dao.StaffWorkTransferRecordDao;
import com.lz.modules.app.entity.StaffWorkTransferRecordEntity;
import com.lz.modules.app.service.StaffWorkTransferRecordService;

import javax.annotation.Resource;


@Service("staffWorkTransferRecordService")
public class StaffWorkTransferRecordServiceImpl extends ServiceImpl<StaffWorkTransferRecordDao, StaffWorkTransferRecordEntity> implements StaffWorkTransferRecordService {

    @Resource
    StaffWorkTransferRecordDao staffWorkTransferRecordDao;

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

    @Override
    public List<StaffWorkTransferDto> getWorkInfoByStaffId(Long staffId) {
        return staffWorkTransferRecordDao.getWorkInfoByStaffId(staffId);
    }

}
