package org.dromara.ems.base.service.impl;

import org.dromara.common.core.utils.DateUtils;
import org.dromara.ems.base.domain.EmsAlarmActionStepImage;
import org.dromara.ems.base.mapper.EmsAlarmActionStepImageMapper;
import org.dromara.ems.base.service.IEmsAlarmActionStepImageService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 报警措施步骤图片Service业务层处理
 * 
 * @author zch
 * @date 2025-05-29
 */
@Service
@RequiredArgsConstructor
public class EmsAlarmActionStepImageServiceImpl implements IEmsAlarmActionStepImageService 
{
    
    private final EmsAlarmActionStepImageMapper emsAlarmActionStepImageMapper;

    /**
     * 查询报警措施步骤图片
     * 
     * @param objId 报警措施步骤图片主键
     * @return 报警措施步骤图片
     */
    @Override
    public EmsAlarmActionStepImage selectEmsAlarmActionStepImageByObjId(String objId)
    {
        return emsAlarmActionStepImageMapper.selectEmsAlarmActionStepImageByObjId(objId);
    }

    /**
     * 查询报警措施步骤图片列表
     * 
     * @param emsAlarmActionStepImage 报警措施步骤图片
     * @return 报警措施步骤图片
     */
    @Override
    public List<EmsAlarmActionStepImage> selectEmsAlarmActionStepImageList(EmsAlarmActionStepImage emsAlarmActionStepImage)
    {
        return emsAlarmActionStepImageMapper.selectEmsAlarmActionStepImageList(emsAlarmActionStepImage);
    }

    /**
     * 新增报警措施步骤图片
     * 
     * @param emsAlarmActionStepImage 报警措施步骤图片
     * @return 结果
     */
    @Override
    public int insertEmsAlarmActionStepImage(EmsAlarmActionStepImage emsAlarmActionStepImage)
    {
        emsAlarmActionStepImage.setCreateTime(DateUtils.getNowDate());
        return emsAlarmActionStepImageMapper.insertEmsAlarmActionStepImage(emsAlarmActionStepImage);
    }

    /**
     * 修改报警措施步骤图片
     * 
     * @param emsAlarmActionStepImage 报警措施步骤图片
     * @return 结果
     */
    @Override
    public int updateEmsAlarmActionStepImage(EmsAlarmActionStepImage emsAlarmActionStepImage)
    {
        emsAlarmActionStepImage.setUpdateTime(DateUtils.getNowDate());
        return emsAlarmActionStepImageMapper.updateEmsAlarmActionStepImage(emsAlarmActionStepImage);
    }

    /**
     * 批量删除报警措施步骤图片
     * 
     * @param objIds 需要删除的报警措施步骤图片主键
     * @return 结果
     */
    @Override
    public int deleteEmsAlarmActionStepImageByObjIds(String[] objIds)
    {
        return emsAlarmActionStepImageMapper.deleteEmsAlarmActionStepImageByObjIds(objIds);
    }

    /**
     * 删除报警措施步骤图片信息
     * 
     * @param objId 报警措施步骤图片主键
     * @return 结果
     */
    @Override
    public int deleteEmsAlarmActionStepImageByObjId(String objId)
    {
        return emsAlarmActionStepImageMapper.deleteEmsAlarmActionStepImageByObjId(objId);
    }
}
