package com.zksy.info.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zksy.info.domain.EDepartmentEmployeeStats;
import com.zksy.info.mapper.EDepartmentEmployeeStatsMapper;
import com.zksy.info.service.EDepartmentEmployeeStatsService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Administrator
* @description 针对表【e_department_employee_stats(部门员工统计表)】的数据库操作Service实现
* @createDate 2025-07-15 13:51:48
*/
@Service
public class EDepartmentEmployeeStatsServiceImpl extends ServiceImpl<EDepartmentEmployeeStatsMapper, EDepartmentEmployeeStats>
    implements EDepartmentEmployeeStatsService{

    @Override
    public Page<EDepartmentEmployeeStats> findByPage(long pageNum, long pageSize, String departmentName) {
        Page<EDepartmentEmployeeStats> page = new Page<>(pageNum,pageSize);
        LambdaQueryWrapper<EDepartmentEmployeeStats> queryWrapper = new LambdaQueryWrapper();
        queryWrapper.like(departmentName != null,EDepartmentEmployeeStats::getDepartmentName,departmentName);
        Page<EDepartmentEmployeeStats> page1 = this.page(page, queryWrapper);
        return page1;
    }

    @Override
    public List<EDepartmentEmployeeStats> getEDepartmentEmployeeStatsList(String departmentName) {
        LambdaQueryWrapper<EDepartmentEmployeeStats> queryWrapper = new LambdaQueryWrapper();
        queryWrapper.like(departmentName != null,EDepartmentEmployeeStats::getDepartmentName,departmentName);
        List<EDepartmentEmployeeStats> list = this.list(queryWrapper);
        return list;
    }
}




