package com.easyproject.system.service.operate.impl;

import java.util.List;

import com.easyproject.common.utils.DateUtils;
import com.easyproject.service.domain.operate.OperateFeedback;
import com.easyproject.service.mapper.operate.OperateFeedbackMapper;
import com.easyproject.system.service.operate.IOperateFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 意见反馈Service业务层处理
 *
 * @author easyproject
 * @date 2025-03-21
 */
@Service
public class OperateFeedbackServiceImpl implements IOperateFeedbackService {
    @Autowired
    private OperateFeedbackMapper operateFeedbackMapper;

    /**
     * 查询意见反馈
     *
     * @param id 意见反馈主键
     * @return 意见反馈
     */
    @Override
    public OperateFeedback selectOperateFeedbackById(Long id) {
        return operateFeedbackMapper.selectOperateFeedbackById(id);
    }

    /**
     * 查询意见反馈列表
     *
     * @param operateFeedback 意见反馈
     * @return 意见反馈
     */
    @Override
    public List<OperateFeedback> selectOperateFeedbackList(OperateFeedback operateFeedback) {
        return operateFeedbackMapper.selectOperateFeedbackList(operateFeedback);
    }

    /**
     * 修改意见反馈
     *
     * @param operateFeedback 意见反馈
     * @return 结果
     */
    @Override
    public int markOperateFeedback(OperateFeedback operateFeedback) {
        operateFeedback.setUpdateTime(DateUtils.getNowDate());
        return operateFeedbackMapper.updateOperateFeedback(operateFeedback);
    }

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