package com.ruoyi.abuwx.service.impl;

import com.ruoyi.abuwx.domain.UserFeedbackReply;
import com.ruoyi.abuwx.mapper.UserFeedbackReplyMapper;
import com.ruoyi.abuwx.service.IUserFeedbackReplyService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 领导回复Service业务层处理
 * 
 * @author lujie
 * @date 2025-01-20
 */
@Service
public class UserFeedbackReplyServiceImpl implements IUserFeedbackReplyService 
{
    @Autowired
    private UserFeedbackReplyMapper userFeedbackReplyMapper;

    /**
     * 查询领导回复
     * 
     * @param id 领导回复主键
     * @return 领导回复
     */
    @Override
    public UserFeedbackReply selectUserFeedbackReplyById(Long id)
    {
        return userFeedbackReplyMapper.selectUserFeedbackReplyById(id);
    }

    /**
     * 查询领导回复列表
     * 
     * @param userFeedbackReply 领导回复
     * @return 领导回复
     */
    @Override
    public List<UserFeedbackReply> selectUserFeedbackReplyList(UserFeedbackReply userFeedbackReply)
    {
        return userFeedbackReplyMapper.selectUserFeedbackReplyList(userFeedbackReply);
    }

    /**
     * 新增领导回复
     * 
     * @param userFeedbackReply 领导回复
     * @return 结果
     */
    @Override
    public int insertUserFeedbackReply(UserFeedbackReply userFeedbackReply)
    {
        userFeedbackReply.setCreateTime(DateUtils.getNowDate());
        return userFeedbackReplyMapper.insertUserFeedbackReply(userFeedbackReply);
    }

    /**
     * 修改领导回复
     * 
     * @param userFeedbackReply 领导回复
     * @return 结果
     */
    @Override
    public int updateUserFeedbackReply(UserFeedbackReply userFeedbackReply)
    {
        userFeedbackReply.setUpdateTime(DateUtils.getNowDate());
        return userFeedbackReplyMapper.updateUserFeedbackReply(userFeedbackReply);
    }

    /**
     * 批量删除领导回复
     * 
     * @param ids 需要删除的领导回复主键
     * @return 结果
     */
    @Override
    public int deleteUserFeedbackReplyByIds(Long[] ids)
    {
        return userFeedbackReplyMapper.deleteUserFeedbackReplyByIds(ids);
    }

    /**
     * 删除领导回复信息
     * 
     * @param id 领导回复主键
     * @return 结果
     */
    @Override
    public int deleteUserFeedbackReplyById(Long id)
    {
        return userFeedbackReplyMapper.deleteUserFeedbackReplyById(id);
    }
}
