package cn.com.ctop.toutiao.modules.material.service.impl;

import cn.com.ctop.toutiao.modules.link.entity.ETLReportBytedanceVideo;
import cn.com.ctop.toutiao.modules.material.entity.EtlBytedanceVideoInfo;
import cn.com.ctop.toutiao.modules.material.mapper.EtlBytedanceVideoInfoMapper;
import cn.com.ctop.toutiao.modules.material.service.IEtlBytedanceVideoInfoService;
import cn.com.ctop.toutiao.modules.report.mapper.EtlBytedanceReportVideoDailyMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 头条视频报表信息
 * @author jeecg-boot
 * @date   2021-02-20
 * @version V1.0
 */
@Service
public class EtlBytedanceVideoInfoServiceImpl extends ServiceImpl<EtlBytedanceVideoInfoMapper, EtlBytedanceVideoInfo> implements IEtlBytedanceVideoInfoService {

    @Autowired
    EtlBytedanceReportVideoDailyMapper etlBytedanceReportVideoDailyMapper;

    @Override
    public List<ETLReportBytedanceVideo> selectAllETLReportBytedanceVideo(){
        List<ETLReportBytedanceVideo> etlReportBytedanceVideoList = etlBytedanceReportVideoDailyMapper.getCtopMaterialAscriptionInfo();
        return etlReportBytedanceVideoList;
    }
    @Override
    public void updateETLReportNameIsNull(ETLReportBytedanceVideo etlReportBytedanceVideo){
        etlBytedanceReportVideoDailyMapper.updateOneBytedanceVideoInfo(etlReportBytedanceVideo);
    }
}
