package com.chinaitop.depot.intelligent.fumigation.service.impl;

import com.chinaitop.depot.intelligent.fumigation.mapper.TFumigationAfterMapper;
import com.chinaitop.depot.intelligent.fumigation.model.TFumigationAfter;
import com.chinaitop.depot.intelligent.fumigation.model.TFumigationAfterExample;
import com.chinaitop.depot.intelligent.fumigation.service.FumigationAfterService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author lvzhikai
 * @description: 熏蒸作业
 * @create 2019-1-15 11:00
 */
@Service
public class FumigationAfterServiceImpl implements FumigationAfterService {

    @Resource
    private TFumigationAfterMapper tFumigationAfterMapper;

    @Override
    public List<Map<String,Object>> getFumigationAfterList(Map<String, Object> map) {
        return tFumigationAfterMapper.getFumigationAfterList(map);
    }

    @Override
    public void add(TFumigationAfter tFumigationAfter) {
        tFumigationAfterMapper.insert(tFumigationAfter);
    }

    @Override
    public void update(TFumigationAfter tFumigationAfter) {
        tFumigationAfterMapper.updateByPrimaryKey(tFumigationAfter);
    }

    @Override
    public TFumigationAfter findById(String afterId) {
        return tFumigationAfterMapper.selectByPrimaryKey(afterId);
    }

    @Override
    public void updateByExample(TFumigationAfter tFumigationAfter, TFumigationAfterExample example) {
        tFumigationAfterMapper.updateByExampleSelective(tFumigationAfter, example);
    }

    /**
     * 获取作业列表
     * @param map
     * @return
     */
    @Override
    public List<Map<String,Object>> selectHomeWorkQueryList(Map<String, Object> map) {
        return tFumigationAfterMapper.selectHomeWorkQueryList(map);
    }
}
