package com.boman.web.core.service.vaccineInfo.impl;

import java.util.List;

import com.boman.common.core.utils.DateUtils;
import com.boman.web.core.service.vaccineInfo.IVaccineInfoOperationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.boman.web.core.mapper.VaccineInfoOperationMapper;
import com.boman.domain.VaccineInfoOperation;

/**
 * 疫苗信息操作Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-05
 */
@Service
public class VaccineInfoOperationServiceImpl implements IVaccineInfoOperationService
{
    @Autowired
    private VaccineInfoOperationMapper vaccineInfoOperationMapper;

    /**
     * 查询疫苗信息操作
     * 
     * @param id 疫苗信息操作ID
     * @return 疫苗信息操作
     */
    @Override
    public VaccineInfoOperation selectVaccineInfoOperationById(Long id)
    {
        return vaccineInfoOperationMapper.selectVaccineInfoOperationById(id);
    }

    /**
     * 查询疫苗信息操作列表
     * 
     * @param vaccineInfoOperation 疫苗信息操作
     * @return 疫苗信息操作
     */
    @Override
    public List<VaccineInfoOperation> selectVaccineInfoOperationList(VaccineInfoOperation vaccineInfoOperation)
    {
        return vaccineInfoOperationMapper.selectVaccineInfoOperationList(vaccineInfoOperation);
    }

    /**
     * 新增疫苗信息操作
     * 
     * @param vaccineInfoOperation 疫苗信息操作
     * @return 结果
     */
    @Override
    public int insertVaccineInfoOperation(VaccineInfoOperation vaccineInfoOperation)
    {
        vaccineInfoOperation.setCreateTime(DateUtils.getNowDate());
        return vaccineInfoOperationMapper.insertVaccineInfoOperation(vaccineInfoOperation);
    }

    /**
     * 修改疫苗信息操作
     * 
     * @param vaccineInfoOperation 疫苗信息操作
     * @return 结果
     */
    @Override
    public int updateVaccineInfoOperation(VaccineInfoOperation vaccineInfoOperation)
    {
        vaccineInfoOperation.setUpdateTime(DateUtils.getNowDate());
        return vaccineInfoOperationMapper.updateVaccineInfoOperation(vaccineInfoOperation);
    }

    /**
     * 批量删除疫苗信息操作
     * 
     * @param ids 需要删除的疫苗信息操作ID
     * @return 结果
     */
    @Override
    public int deleteVaccineInfoOperationByIds(Long[] ids)
    {
        return vaccineInfoOperationMapper.deleteVaccineInfoOperationByIds(ids);
    }

    /**
     * 删除疫苗信息操作信息
     * 
     * @param id 疫苗信息操作ID
     * @return 结果
     */
    @Override
    public int deleteVaccineInfoOperationById(Long id)
    {
        return vaccineInfoOperationMapper.deleteVaccineInfoOperationById(id);
    }
}
