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

import java.util.List;

import com.easyproject.common.utils.DateUtils;
import com.easyproject.service.domain.operate.OperateMindReader;
import com.easyproject.service.mapper.operate.OperateMindReaderMapper;
import com.easyproject.system.service.operate.IOperateMindReaderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 猜你所想Service业务层处理
 *
 * @author easyproject
 * @date 2025-03-19
 */
@Service
public class OperateMindReaderServiceImpl implements IOperateMindReaderService {
    @Autowired
    private OperateMindReaderMapper operateMindReaderMapper;

    /**
     * 查询猜你所想
     *
     * @param id 猜你所想主键
     * @return 猜你所想
     */
    @Override
    public OperateMindReader selectOperateMindReaderById(Long id) {
        return operateMindReaderMapper.selectOperateMindReaderById(id);
    }

    /**
     * 查询猜你所想列表
     *
     * @param operateMindReader 猜你所想
     * @return 猜你所想
     */
    @Override
    public List<OperateMindReader> selectOperateMindReaderList(OperateMindReader operateMindReader) {
        return operateMindReaderMapper.selectOperateMindReaderList(operateMindReader);
    }

    /**
     * 新增猜你所想
     *
     * @param operateMindReader 猜你所想
     * @return 结果
     */
    @Override
    public int insertOperateMindReader(OperateMindReader operateMindReader) {
        operateMindReader.setCreateTime(DateUtils.getNowDate());
        return operateMindReaderMapper.insertOperateMindReader(operateMindReader);
    }

    /**
     * 修改猜你所想
     *
     * @param operateMindReader 猜你所想
     * @return 结果
     */
    @Override
    public int updateOperateMindReader(OperateMindReader operateMindReader) {
        operateMindReader.setUpdateTime(DateUtils.getNowDate());
        return operateMindReaderMapper.updateOperateMindReader(operateMindReader);
    }

    /**
     * 批量删除猜你所想
     *
     * @param ids 需要删除的猜你所想主键
     * @return 结果
     */
    @Override
    public int deleteOperateMindReaderByIds(Long[] ids) {
        return operateMindReaderMapper.deleteOperateMindReaderByIds(ids);
    }

    /**
     * 删除猜你所想信息
     *
     * @param id 猜你所想主键
     * @return 结果
     */
    @Override
    public int deleteOperateMindReaderById(Long id) {
        return operateMindReaderMapper.deleteOperateMindReaderById(id);
    }
}
