package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WyFeedbackMapper;
import com.ruoyi.system.domain.WyFeedback;
import com.ruoyi.system.service.IWyFeedbackService;

/**
 * 意见反馈Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-19
 */
@Service
public class WyFeedbackServiceImpl implements IWyFeedbackService 
{
    @Autowired
    private WyFeedbackMapper wyFeedbackMapper;

    /**
     * 查询意见反馈
     * 
     * @param id 意见反馈主键
     * @return 意见反馈
     */
    @Override
    public WyFeedback selectWyFeedbackById(Long id)
    {
        return wyFeedbackMapper.selectWyFeedbackById(id);
    }

    /**
     * 查询意见反馈列表
     * 
     * @param wyFeedback 意见反馈
     * @return 意见反馈
     */
    @Override
    public List<WyFeedback> selectWyFeedbackList(WyFeedback wyFeedback)
    {
        return wyFeedbackMapper.selectWyFeedbackList(wyFeedback);
    }

    /**
     * 新增意见反馈
     * 
     * @param wyFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int insertWyFeedback(WyFeedback wyFeedback)
    {
        wyFeedback.setCreateTime(DateUtils.getNowDate());
        return wyFeedbackMapper.insertWyFeedback(wyFeedback);
    }

    /**
     * 修改意见反馈
     * 
     * @param wyFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int updateWyFeedback(WyFeedback wyFeedback)
    {
        wyFeedback.setUpdateTime(DateUtils.getNowDate());
        return wyFeedbackMapper.updateWyFeedback(wyFeedback);
    }

    /**
     * 批量删除意见反馈
     * 
     * @param ids 需要删除的意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteWyFeedbackByIds(Long[] ids)
    {
        return wyFeedbackMapper.deleteWyFeedbackByIds(ids);
    }

    /**
     * 删除意见反馈信息
     * 
     * @param id 意见反馈主键
     * @return 结果
     */
    @Override
    public int deleteWyFeedbackById(Long id)
    {
        return wyFeedbackMapper.deleteWyFeedbackById(id);
    }
}
