package com.zcloud.personnel.positioning.persistence.repository.impl;

import com.zcloud.personnel.positioning.persistence.dataobject.OrgLocalCorpDO;
import com.zcloud.personnel.positioning.persistence.dataobject.OrgLocalDepartmentDO;
import com.zcloud.personnel.positioning.persistence.mapper.OrgMatchMapper;
import com.zcloud.personnel.positioning.persistence.repository.OrgMatchRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Repository
@RequiredArgsConstructor
public class OrgMatchRepositoryImpl implements OrgMatchRepository {
    private final OrgMatchMapper orgMatchMapper;
    @Override public List<OrgLocalCorpDO> listCorpsByNames(List<String> values) { return orgMatchMapper.listCorpsByNames(values); }
    @Override public OrgLocalDepartmentDO findChildDepartment(String parentId, String childName) {
        return orgMatchMapper.findChildDepartment(parentId, childName);
    }
    @Override public void upsert(Map<String, Object> params) { orgMatchMapper.upsert(params); }
    @Override public void disableMissing(String code, LocalDateTime time) { orgMatchMapper.disableMissing(code, time); }
    @Override public long countAll() { return orgMatchMapper.countAll(); }
    @Override public long countMatched() { return orgMatchMapper.countMatched(); }
}
