package com.ruoyi.business.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.business.mapper.ReReqMapper;
import com.ruoyi.business.domain.ReReq;
import com.ruoyi.business.service.IReReqService;
import com.ruoyi.common.core.text.Convert;

/**
 * 投诉Service业务层处理
 * 
 * @author xiatao
 * @date 2022-01-18
 */
@Service
public class ReReqServiceImpl implements IReReqService 
{
    @Autowired
    private ReReqMapper reReqMapper;

    /**
     * 查询投诉
     * 
     * @param reqId 投诉主键
     * @return 投诉
     */
    @Override
    public ReReq selectReReqByReqId(Long reqId)
    {
        return reReqMapper.selectReReqByReqId(reqId);
    }

    /**
     * 查询投诉列表
     * 
     * @param reReq 投诉
     * @return 投诉
     */
    @Override
    public List<ReReq> selectReReqList(ReReq reReq)
    {
        return reReqMapper.selectReReqList(reReq);
    }

    /**
     * 新增投诉
     * 
     * @param reReq 投诉
     * @return 结果
     */
    @Override
    public int insertReReq(ReReq reReq)
    {
        reReq.setCreateTime(DateUtils.getNowDate());
        return reReqMapper.insertReReq(reReq);
    }

    /**
     * 修改投诉
     * 
     * @param reReq 投诉
     * @return 结果
     */
    @Override
    public int updateReReq(ReReq reReq)
    {
        return reReqMapper.updateReReq(reReq);
    }

    /**
     * 批量删除投诉
     * 
     * @param reqIds 需要删除的投诉主键
     * @return 结果
     */
    @Override
    public int deleteReReqByReqIds(String reqIds)
    {
        return reReqMapper.deleteReReqByReqIds(Convert.toStrArray(reqIds));
    }

    /**
     * 删除投诉信息
     * 
     * @param reqId 投诉主键
     * @return 结果
     */
    @Override
    public int deleteReReqByReqId(Long reqId)
    {
        return reReqMapper.deleteReReqByReqId(reqId);
    }
}
