package com.playlet.system.service.impl;

import java.util.List;
import com.playlet.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.playlet.system.mapper.PlayletAdviceFeedbackMapper;
import com.playlet.system.domain.PlayletAdviceFeedback;
import com.playlet.system.service.IPlayletAdviceFeedbackService;
import com.playlet.common.core.text.Convert;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 短剧意见反馈Service业务层处理
 *
 * @author ruoyi
 * @date 2024-03-22
 */
@Service
public class PlayletAdviceFeedbackServiceImpl extends ServiceImpl<PlayletAdviceFeedbackMapper, PlayletAdviceFeedback> implements IPlayletAdviceFeedbackService
{
    @Autowired
    private PlayletAdviceFeedbackMapper playletAdviceFeedbackMapper;

    /**
     * 查询短剧意见反馈
     *
     * @param id 短剧意见反馈主键
     * @return 短剧意见反馈
     */
    @Override
    public PlayletAdviceFeedback selectPlayletAdviceFeedbackById(Long id)
    {
        return playletAdviceFeedbackMapper.selectPlayletAdviceFeedbackById(id);
    }

    /**
     * 查询短剧意见反馈列表
     *
     * @param playletAdviceFeedback 短剧意见反馈
     * @return 短剧意见反馈
     */
    @Override
    public List<PlayletAdviceFeedback> selectPlayletAdviceFeedbackList(PlayletAdviceFeedback playletAdviceFeedback)
    {
        return playletAdviceFeedbackMapper.selectPlayletAdviceFeedbackList(playletAdviceFeedback);
    }

    /**
     * 新增短剧意见反馈
     *
     * @param playletAdviceFeedback 短剧意见反馈
     * @return 结果
     */
    @Override
    public int insertPlayletAdviceFeedback(PlayletAdviceFeedback playletAdviceFeedback)
    {
        playletAdviceFeedback.setCreateTime(DateUtils.getNowDate());
        return playletAdviceFeedbackMapper.insertPlayletAdviceFeedback(playletAdviceFeedback);
    }

    /**
     * 修改短剧意见反馈
     *
     * @param playletAdviceFeedback 短剧意见反馈
     * @return 结果
     */
    @Override
    public int updatePlayletAdviceFeedback(PlayletAdviceFeedback playletAdviceFeedback)
    {
        playletAdviceFeedback.setUpdateTime(DateUtils.getNowDate());
        return playletAdviceFeedbackMapper.updatePlayletAdviceFeedback(playletAdviceFeedback);
    }

    /**
     * 批量删除短剧意见反馈
     *
     * @param ids 需要删除的短剧意见反馈主键
     * @return 结果
     */
    @Override
    public int deletePlayletAdviceFeedbackByIds(String ids)
    {
        return playletAdviceFeedbackMapper.deletePlayletAdviceFeedbackByIds(Convert.toStrArray(ids));
    }

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