package com.ruoyi.system.service.impl;

import java.time.LocalDate;
import java.util.List;

import com.ruoyi.system.domain.dto.MRTimeDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DailyScenicMapper;
import com.ruoyi.system.domain.DailyScenic;
import com.ruoyi.system.service.IDailyScenicService;

/**
 * 各景区的每天统计数据Service业务层处理
 * 
 * @author haotian
 * @date 2024-12-09
 */
@Service
public class DailyScenicServiceImpl implements IDailyScenicService 
{
    @Autowired
    private DailyScenicMapper dailyScenicMapper;

    /**
     * 查询各景区的每天统计数据
     * 
     * @param dailyScenicId 各景区的每天统计数据主键
     * @return 各景区的每天统计数据
     */
    @Override
    public DailyScenic selectDailyScenicByDailyScenicId(Long dailyScenicId)
    {
        return dailyScenicMapper.selectDailyScenicByDailyScenicId(dailyScenicId);
    }

    /**
     * 查询各景区的每天统计数据列表
     * 
     * @param dailyScenic 各景区的每天统计数据
     * @return 各景区的每天统计数据
     */
    @Override
    public List<DailyScenic> selectDailyScenicList(DailyScenic dailyScenic)
    {
        return dailyScenicMapper.selectDailyScenicList(dailyScenic);
    }

    /**
     * 新增各景区的每天统计数据
     * 
     * @param dailyScenic 各景区的每天统计数据
     * @return 结果
     */
    @Override
    public int insertDailyScenic(DailyScenic dailyScenic)
    {
        return dailyScenicMapper.insertDailyScenic(dailyScenic);
    }

    /**
     * 修改各景区的每天统计数据
     * 
     * @param dailyScenic 各景区的每天统计数据
     * @return 结果
     */
    @Override
    public int updateDailyScenic(DailyScenic dailyScenic)
    {
        return dailyScenicMapper.updateDailyScenic(dailyScenic);
    }

    /**
     * 批量删除各景区的每天统计数据
     * 
     * @param dailyScenicIds 需要删除的各景区的每天统计数据主键
     * @return 结果
     */
    @Override
    public int deleteDailyScenicByDailyScenicIds(Long[] dailyScenicIds)
    {
        return dailyScenicMapper.deleteDailyScenicByDailyScenicIds(dailyScenicIds);
    }

    /**
     * 删除各景区的每天统计数据信息
     * 
     * @param dailyScenicId 各景区的每天统计数据主键
     * @return 结果
     */
    @Override
    public int deleteDailyScenicByDailyScenicId(Long dailyScenicId)
    {
        return dailyScenicMapper.deleteDailyScenicByDailyScenicId(dailyScenicId);
    }

    @Override
    public List<MRTimeDto> getMRTime(Long scenicId, LocalDate startDate, LocalDate endDate){
        return dailyScenicMapper.getMRTime(scenicId, startDate, endDate);
    }
}
