package com.cico.nest.lcdp.boot.core.system.api.dept;

import com.cico.nest.lcdp.boot.core.system.service.dept.PostService;
import com.cico.nest.lcdp.boot.core.system.dal.dataobject.dept.PostDO;
import com.cico.nest.lcdp.boot.api.system.dept.PostApi;
import com.cico.nest.lcdp.boot.api.system.dept.dto.PostRespDTO;
import com.cico.nest.lcdp.framework.common.util.object.BeanUtils;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

/**
 * 岗位 API 实现类
 *
 * @author zws
 */
@Service
public class PostApiImpl implements PostApi {

    @Resource
    private PostService postService;

    @Override
    public void validPostList(Collection<Long> ids) {
        postService.validatePostList(ids);
    }

    @Override
    public List<PostRespDTO> getPostList(Collection<Long> ids) {
        List<PostDO> list = postService.getPostList(ids);
        return BeanUtils.toBean(list, PostRespDTO.class);
    }

}
