package com.ningdatech.carapi.company.service.impl;

import com.ningdatech.carapi.company.entity.CompanyEmployees;
import com.ningdatech.carapi.company.entity.dto.ResCompanyEmployeesCountDTO;
import com.ningdatech.carapi.company.mapper.CompanyEmployeesMapper;
import com.ningdatech.carapi.company.service.ICompanyEmployeesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liushuai
 * @since 2022-10-25
 */
@Service
@RequiredArgsConstructor
public class CompanyEmployeesServiceImpl extends ServiceImpl<CompanyEmployeesMapper, CompanyEmployees> implements ICompanyEmployeesService {

    private final CompanyEmployeesMapper companyEmployeesMapper;

    @Override
    public List<ResCompanyEmployeesCountDTO> countEmployeesByCompanyIds(List<Long> companyIds) {
        return companyEmployeesMapper.countEmployeesByCompanyIds(companyIds);
    }
}
