package com.yunfeiyun.agmp.fms.service.impl;

import com.yunfeiyun.agmp.fms.domain.FmsCalarm;
import com.yunfeiyun.agmp.fms.mapper.FmsCalarmMapper;
import com.yunfeiyun.agmp.fms.service.IFmsCalarmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 病虫虫害Service业务层处理
 * 
 * @author 杨晓辉
 * @date 2023-06-14
 */
@Service
public class FmsCalarmServiceImpl implements IFmsCalarmService
{
    @Autowired
    private FmsCalarmMapper fmsCalarmMapper;

    /**
     * 查询病虫虫害
     * 
     * @param calarmId 病虫虫害主键
     * @return 病虫虫害
     */
    @Override
    public FmsCalarm selectFmsCalarmByCalarmId(String calarmId)
    {
        return fmsCalarmMapper.selectFmsCalarmByCalarmId(calarmId);
    }

    /**
     * 查询病虫虫害列表
     * 
     * @param fmsCalarm 病虫虫害
     * @return 病虫虫害
     */
    @Override
    public List<FmsCalarm> selectFmsCalarmList(FmsCalarm fmsCalarm)
    {
        return fmsCalarmMapper.selectFmsCalarmList(fmsCalarm);
    }

    /**
     * 新增病虫虫害
     * 
     * @param fmsCalarm 病虫虫害
     * @return 结果
     */
    @Override
    public int insertFmsCalarm(FmsCalarm fmsCalarm)
    {
        return fmsCalarmMapper.insertFmsCalarm(fmsCalarm);
    }

    /**
     * 修改病虫虫害
     * 
     * @param fmsCalarm 病虫虫害
     * @return 结果
     */
    @Override
    public int updateFmsCalarm(FmsCalarm fmsCalarm)
    {
        return fmsCalarmMapper.updateFmsCalarm(fmsCalarm);
    }

    /**
     * 批量删除病虫虫害
     * 
     * @param calarmIds 需要删除的病虫虫害主键
     * @return 结果
     */
    @Override
    public int deleteFmsCalarmByCalarmIds(String[] calarmIds)
    {
        return fmsCalarmMapper.deleteFmsCalarmByCalarmIds(calarmIds);
    }

    /**
     * 删除病虫虫害信息
     * 
     * @param calarmId 病虫虫害主键
     * @return 结果
     */
    @Override
    public int deleteFmsCalarmByCalarmId(String calarmId)
    {
        return fmsCalarmMapper.deleteFmsCalarmByCalarmId(calarmId);
    }
}
