package com.engine.salary.service.impl;

import com.engine.core.impl.Service;
import com.engine.salary.biz.SalarySobItemGroupBiz;
import com.engine.salary.entity.salarysob.po.SalarySobItemGroupPO;
import com.engine.salary.service.SalarySobItemGroupService;

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

/**
 * 薪资账套中的薪资项目分类
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public class SalarySobItemGroupServiceImpl extends Service implements SalarySobItemGroupService {

    private SalarySobItemGroupBiz salarySobItemGroupMapper = new SalarySobItemGroupBiz();

    @Override
    public SalarySobItemGroupPO getById(Long id) {
        return salarySobItemGroupMapper.getById(id);
    }

    @Override
    public List<SalarySobItemGroupPO> listBySalarySobId(Long salarySobId) {
        return salarySobItemGroupMapper.listSome(SalarySobItemGroupPO.builder().salarySobId(salarySobId).build());
    }

    @Override
    public List<SalarySobItemGroupPO> listBySalarySobIdWithItemHide(Long salarySobId) {
        return salarySobItemGroupMapper.listSomeWithItemHide(SalarySobItemGroupPO.builder().salarySobId(salarySobId).build());
    }

    @Override
    public void batchSave(Collection<SalarySobItemGroupPO> salarySobItemGroupPOS) {
        salarySobItemGroupMapper.batchInsert(salarySobItemGroupPOS);
    }

    @Override
    public void deleteBySalarySobIds(Collection<Long> salarySobIds) {
        salarySobItemGroupMapper.deleteBySalarySobIds(salarySobIds);
    }
}
