package com.huatek.busi.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.dubbo.config.annotation.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.huatek.busi.dto.VideoProduceMonitorDto;
import com.huatek.busi.mapper.VideoProduceMonitorMapper;
import com.huatek.busi.service.VideoProduceMonitorService;
import com.huatek.busi.vo.VideoProduceMonitorVo;

/**
 * 视频生产检测
 * 
 * @author buck_guo
 * @date 2019/07/23
 */
@Component
@Service(interfaceClass = VideoProduceMonitorService.class)
@Transactional(rollbackFor = Exception.class)
public class VideoProduceMonitorServiceImpl implements VideoProduceMonitorService {

    @Autowired
    private VideoProduceMonitorMapper videoProduceMonitorMapper;

    @Override
    public PageInfo<VideoProduceMonitorVo> findVideoProduceMonitorPage(VideoProduceMonitorDto videoProduceMonitorDto) {
        return PageHelper.startPage(videoProduceMonitorDto.getPage(), videoProduceMonitorDto.getLimit())
            .doSelectPageInfo(() -> videoProduceMonitorMapper.findVideoProduceMonitorPage(videoProduceMonitorDto));
    }
}
