package com.inspect.metadata.statis.service.impl;

import com.inspect.metadata.eqpbook.mapper.BasedataEqpBookMapper;
import com.inspect.metadata.montdata.mapper.BasedataMontPatDevOnlineMapper;
import com.inspect.metadata.statis.domain.BasedataStatisRobotUavOnlineDay;
import com.inspect.metadata.statis.mapper.BasedataStatisRobotUavOnlineDayMapper;
import com.inspect.metadata.statis.service.IBasedataStatisRobotUavOnlineDayService;
import com.inspect.base.core.utils.DateUtils;
import com.inspect.base.redis.service.RedisService;

import java.util.List;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class BasedataStatisRobotUavOnlineDayServiceImpl implements IBasedataStatisRobotUavOnlineDayService {
    @Resource
    private BasedataStatisRobotUavOnlineDayMapper basedataStatisRobotuavOnlineDayMapper;
    @Resource
    private BasedataEqpBookMapper basedataEqpbookMapper;
    @Resource
    BasedataMontPatDevOnlineMapper basedataMontPatDevOnlineMapper;
    @Resource
    private RedisService redisService;

    public BasedataStatisRobotUavOnlineDay selectBasedataStatisRobotUavOnlineDayByRobotUavOnlineStatId(Long robotUavOnlineStatId) {
        return this.basedataStatisRobotuavOnlineDayMapper.selectBasedataStatisRobotUavOnlineDayByRobotUavOnlineStatId(robotUavOnlineStatId);
    }

    public List<BasedataStatisRobotUavOnlineDay> selectBasedataStatisRobotuavOnlineDayList(BasedataStatisRobotUavOnlineDay basedataStatisRobotuavOnlineDay) {
        return this.basedataStatisRobotuavOnlineDayMapper.selectBasedataStatisRobotUavOnlineDayList(basedataStatisRobotuavOnlineDay);
    }

    public int insertBasedataStatisRobotUavOnlineDay(BasedataStatisRobotUavOnlineDay basedataStatisRobotuavOnlineDay) {
        basedataStatisRobotuavOnlineDay.setCreateTime(DateUtils.getNowDate());
        return this.basedataStatisRobotuavOnlineDayMapper.insertBasedataStatisRobotUavOnlineDay(basedataStatisRobotuavOnlineDay);
    }

    public int updateBasedataStatisRobotUavOnlineDay(BasedataStatisRobotUavOnlineDay basedataStatisRobotuavOnlineDay) {
        basedataStatisRobotuavOnlineDay.setUpdateTime(DateUtils.getNowDate());
        return this.basedataStatisRobotuavOnlineDayMapper.updateBasedataStatisRobotUavOnlineDay(basedataStatisRobotuavOnlineDay);
    }

    public int deleteBasedataStatisRobotUavOnlineDayByRobotUavOnlineStatIds(Long[] robotUavOnlineStatIds) {
        return this.basedataStatisRobotuavOnlineDayMapper.deleteBasedataStatisRobotUavOnlineDayByRobotUavOnlineStatIds(robotUavOnlineStatIds);
    }

    public int deleteBasedataStatisRobotUavOnlineDayByRobotUavOnlineStatId(Long robotUavOnlineStatId) {
        return this.basedataStatisRobotuavOnlineDayMapper.deleteBasedataStatisRobotUavOnlineDayByRobotUavOnlineStatId(robotUavOnlineStatId);
    }
}
