package com.prolog.eis.service.container.impl;

import com.prolog.eis.dao.container.MergeContainerTaskMapper;
import com.prolog.eis.model.container.MergeContainerTask;
import com.prolog.eis.service.container.MergeContainerTaskService;
import com.prolog.framework.core.restriction.Criteria;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Slf4j
@Service
@RequiredArgsConstructor
public class MergeContainerTaskServiceImpl implements MergeContainerTaskService {

    private final MergeContainerTaskMapper mergeContainerTaskMapper;

    @Override
    public List<MergeContainerTask> findByCriteria(Criteria criteria) {
        return mergeContainerTaskMapper.findByCriteria(criteria);
    }

    @Override
    public List<MergeContainerTask> findByMap(Map map) {
        return mergeContainerTaskMapper.findByMap(map, MergeContainerTask.class);
    }

    @Override
    public void save(MergeContainerTask mergeContainerTask) {
        mergeContainerTaskMapper.save(mergeContainerTask);
    }

    @Override
    public void update(MergeContainerTask mergeContainerTask) {
        mergeContainerTaskMapper.update(mergeContainerTask);
    }

    @Override
    public void deleteById(Integer id) {
        mergeContainerTaskMapper.deleteById(id, MergeContainerTask.class);
    }
}
