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

import cn.com.ctop.toutiao.modules.material.entity.BytedanceImageInfo;
import cn.com.ctop.toutiao.modules.material.mapper.BytedanceImageInfoMapper;
import cn.com.ctop.toutiao.modules.material.service.IBytedanceImageInfoService;
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   2020-08-01
 * @version V1.0
 */
@Service
public class BytedanceImageInfoServiceImpl extends ServiceImpl<BytedanceImageInfoMapper, BytedanceImageInfo> implements IBytedanceImageInfoService {
    @Autowired
    private BytedanceImageInfoMapper imageInfoMapper;
    @Override
    public void replaceBatch(List<BytedanceImageInfo> videoInfoList) {
        imageInfoMapper.replaceBatch(videoInfoList);
    }

    @Override
    public void updateType() {
        imageInfoMapper.updateImageVerticalType();
        imageInfoMapper.updateImageHorizonType();
    }
}
