package com.ruoyi.system.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.suggestionFj.SuggestionFj;
import com.ruoyi.system.mapper.SuggestionFjMapper;
import com.ruoyi.system.service.ISuggestionFjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 投诉建议_附件Service业务层处理
 * 
 * @author boman
 * @date 2025-02-24
 */
@Service
public class SuggestionFjServiceImpl implements ISuggestionFjService 
{
    @Autowired
    private SuggestionFjMapper suggestionFjMapper;

    /**
     * 查询投诉建议_附件
     * 
     * @param suggestionFjId 投诉建议_附件主键
     * @return 投诉建议_附件
     */
    @Override
    public SuggestionFj selectSuggestionFjBySuggestionFjId(Long suggestionFjId)
    {
        return suggestionFjMapper.selectSuggestionFjBySuggestionFjId(suggestionFjId);
    }

    /**
     * 查询投诉建议_附件列表
     * 
     * @param suggestionFj 投诉建议_附件
     * @return 投诉建议_附件
     */
    @Override
    public List<SuggestionFj> selectSuggestionFjList(SuggestionFj suggestionFj)
    {
        return suggestionFjMapper.selectSuggestionFjList(suggestionFj);
    }

    /**
     * 新增投诉建议_附件
     * 
     * @param suggestionFj 投诉建议_附件
     * @return 结果
     */
    @Override
    public int insertSuggestionFj(SuggestionFj suggestionFj)
    {
        suggestionFj.setCreateTime(DateUtils.getNowDate());
        return suggestionFjMapper.insertSuggestionFj(suggestionFj);
    }

    /**
     * 修改投诉建议_附件
     * 
     * @param suggestionFj 投诉建议_附件
     * @return 结果
     */
    @Override
    public int updateSuggestionFj(SuggestionFj suggestionFj)
    {
        suggestionFj.setUpdateTime(DateUtils.getNowDate());
        return suggestionFjMapper.updateSuggestionFj(suggestionFj);
    }

    /**
     * 批量删除投诉建议_附件
     * 
     * @param suggestionFjIds 需要删除的投诉建议_附件主键
     * @return 结果
     */
    @Override
    public int deleteSuggestionFjBySuggestionFjIds(Long[] suggestionFjIds)
    {
        return suggestionFjMapper.deleteSuggestionFjBySuggestionFjIds(suggestionFjIds);
    }

    /**
     * 删除投诉建议_附件信息
     * 
     * @param suggestionFjId 投诉建议_附件主键
     * @return 结果
     */
    @Override
    public int deleteSuggestionFjBySuggestionFjId(Long suggestionFjId)
    {
        return suggestionFjMapper.deleteSuggestionFjBySuggestionFjId(suggestionFjId);
    }
}
