package com.srs.routine.service.impl;

import java.util.List;
import com.srs.common.utils.DateUtils;
import com.srs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.srs.routine.mapper.RtFuResourceMapper;
import com.srs.routine.domain.RtFuResource;
import com.srs.routine.service.IRtFuResourceService;

/**
 * 功能房图片Service业务层处理
 *
 * @author srs
 * @date 2024-07-21
 */
@Service
public class RtFuResourceServiceImpl extends ServiceImpl<RtFuResourceMapper,RtFuResource> implements IRtFuResourceService {
    @Autowired
    private RtFuResourceMapper rtFuResourceMapper;

    /**
     * 查询功能房图片
     *
     * @param resId 功能房图片主键
     * @return 功能房图片
     */
    @Override
    public RtFuResource selectRtFuResourceByResId(Long resId) {
        return rtFuResourceMapper.selectRtFuResourceByResId(resId);
    }

    /**
     * 查询功能房图片列表
     *
     * @param rtFuResource 功能房图片
     * @return 功能房图片
     */
    @Override
    public List<RtFuResource> selectRtFuResourceList(RtFuResource rtFuResource) {
        return rtFuResourceMapper.selectRtFuResourceList(rtFuResource);
    }

    /**
     * 新增功能房图片
     *
     * @param rtFuResource 功能房图片
     * @return 结果
     */
    @Override
    public int insertRtFuResource(RtFuResource rtFuResource) {
                rtFuResource.setCreateTime(DateUtils.getNowDate());
            return rtFuResourceMapper.insertRtFuResource(rtFuResource);
    }

    /**
     * 修改功能房图片
     *
     * @param rtFuResource 功能房图片
     * @return 结果
     */
    @Override
    public int updateRtFuResource(RtFuResource rtFuResource) {
                rtFuResource.setUpdateTime(DateUtils.getNowDate());
        return rtFuResourceMapper.updateRtFuResource(rtFuResource);
    }

    /**
     * 批量删除功能房图片
     *
     * @param resIds 需要删除的功能房图片主键
     * @return 结果
     */
    @Override
    public int deleteRtFuResourceByResIds(Long[] resIds) {
        return rtFuResourceMapper.deleteRtFuResourceByResIds(resIds);
    }

    /**
     * 删除功能房图片信息
     *
     * @param resId 功能房图片主键
     * @return 结果
     */
    @Override
    public int deleteRtFuResourceByResId(Long resId) {
        return rtFuResourceMapper.deleteRtFuResourceByResId(resId);
    }
}
