package com.ruoyi.tuya.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.tuya.mapper.TuyaTalkNoMapper;
import com.ruoyi.tuya.domain.TuyaTalkNo;
import com.ruoyi.tuya.service.ITuyaTalkNoService;

/**
 * 用户投诉Service业务层处理
 * 
 * @author zf
 * @date 2022-08-23
 */
@Service
public class TuyaTalkNoServiceImpl implements ITuyaTalkNoService 
{
    @Autowired
    private TuyaTalkNoMapper tuyaTalkNoMapper;

    /**
     * 查询用户投诉
     * 
     * @param noId 用户投诉主键
     * @return 用户投诉
     */
    @Override
    public TuyaTalkNo selectTuyaTalkNoByNoId(Long noId)
    {
        return tuyaTalkNoMapper.selectTuyaTalkNoByNoId(noId);
    }

    /**
     * 查询用户投诉列表
     * 
     * @param tuyaTalkNo 用户投诉
     * @return 用户投诉
     */
    @Override
    public List<TuyaTalkNo> selectTuyaTalkNoList(TuyaTalkNo tuyaTalkNo)
    {
        return tuyaTalkNoMapper.selectTuyaTalkNoList(tuyaTalkNo);
    }

    /**
     * 新增用户投诉
     * 
     * @param tuyaTalkNo 用户投诉
     * @return 结果
     */
    @Override
    public int insertTuyaTalkNo(TuyaTalkNo tuyaTalkNo)
    {
        tuyaTalkNo.setCreateTime(DateUtils.getNowDate());
        return tuyaTalkNoMapper.insertTuyaTalkNo(tuyaTalkNo);
    }

    /**
     * 修改用户投诉
     * 
     * @param tuyaTalkNo 用户投诉
     * @return 结果
     */
    @Override
    public int updateTuyaTalkNo(TuyaTalkNo tuyaTalkNo)
    {
        tuyaTalkNo.setUpdateTime(DateUtils.getNowDate());
        return tuyaTalkNoMapper.updateTuyaTalkNo(tuyaTalkNo);
    }

    /**
     * 批量删除用户投诉
     * 
     * @param noIds 需要删除的用户投诉主键
     * @return 结果
     */
    @Override
    public int deleteTuyaTalkNoByNoIds(Long[] noIds)
    {
        return tuyaTalkNoMapper.deleteTuyaTalkNoByNoIds(noIds);
    }

    /**
     * 删除用户投诉信息
     * 
     * @param noId 用户投诉主键
     * @return 结果
     */
    @Override
    public int deleteTuyaTalkNoByNoId(Long noId)
    {
        return tuyaTalkNoMapper.deleteTuyaTalkNoByNoId(noId);
    }
}
