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.dataobject.OrgMatchSnapshotDO;
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 OrgMatchSnapshotDO findMatched(String code, String corpName, String departmentName) {
        return orgMatchMapper.findMatched(code, corpName, departmentName);
    }
    @Override public List<OrgLocalCorpDO> listCorpCandidates(Map<String, Object> params) {
        return orgMatchMapper.listCorpCandidates(params);
    }
    @Override public List<OrgLocalDepartmentDO> listDepartmentCandidates(String departmentName) {
        return orgMatchMapper.listDepartmentCandidates(departmentName);
    }
    @Override public void upsert(Map<String, Object> params) { orgMatchMapper.upsert(params); }
    @Override public void touch(String code, String corpName, String departmentName, LocalDateTime time) {
        orgMatchMapper.touch(code, corpName, departmentName, time);
    }
    @Override public long countAll() { return orgMatchMapper.countAll(); }
    @Override public long countMatched() { return orgMatchMapper.countMatched(); }
}
