package com.ruoyi.project.system.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.system.domain.QuoteLog;
import com.ruoyi.project.system.mapper.QuoteLogMapper;
import com.ruoyi.project.system.service.IQuoteLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 查询日志Service业务层处理
 *
 * @author zhu
 * @date 2023-11-07
 */
@Service
public class QuoteLogServiceImpl implements IQuoteLogService {


    @Autowired
    private QuoteLogMapper quoteLogMapper;

    /**
     * 查询查询日志
     *
     * @param id 查询日志主键
     * @return 查询日志
     */
    @Override
    public QuoteLog selectQuoteLogById(Long id) {
        return quoteLogMapper.selectQuoteLogById(id);
    }

    /**
     * 查询查询日志列表
     *
     * @param quoteLog 查询日志
     * @return 查询日志
     */
    @Override
    public List<QuoteLog> selectQuoteLogList(QuoteLog quoteLog) {
        return quoteLogMapper.selectQuoteLogList(quoteLog);
    }

    /**
     * 新增查询日志
     *
     * @param quoteLog 查询日志
     * @return 结果
     */
    @Override
    public int insertQuoteLog(QuoteLog quoteLog) {
        quoteLog.setCreateTime(DateUtils.getNowDate());
        return quoteLogMapper.insertQuoteLog(quoteLog);
    }

    /**
     * 修改查询日志
     *
     * @param quoteLog 查询日志
     * @return 结果
     */
    @Override
    public int updateQuoteLog(QuoteLog quoteLog) {
        quoteLog.setUpdateTime(DateUtils.getNowDate());
        return quoteLogMapper.updateQuoteLog(quoteLog);
    }

    /**
     * 批量删除查询日志
     *
     * @param ids 需要删除的查询日志主键
     * @return 结果
     */
    @Override
    public int deleteQuoteLogByIds(Long[] ids) {
        return quoteLogMapper.deleteQuoteLogByIds(ids);
    }

    /**
     * 删除查询日志信息
     *
     * @param id 查询日志主键
     * @return 结果
     */
    @Override
    public int deleteQuoteLogById(Long id) {
        return quoteLogMapper.deleteQuoteLogById(id);
    }

    @Override
    public void select() {
        Map<String, Object> a = quoteLogMapper.select();
    }
}
