package com.dji.sample.manage.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.dji.sample.manage.dao.IWhiteListMapper;
import com.dji.sample.manage.model.dto.CapacityVideoDTO;
import com.dji.sample.manage.model.entity.WhiteListEntity;
import com.dji.sample.manage.model.receiver.CapacityVideoReceiver;
import com.dji.sample.manage.service.IWhiteListService;
import com.dji.sdk.cloudapi.livestream.VideoTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;

/**
 * @author huiqing.jiang
 * @version 0.1
 * @date 2024/8/30
 */
@Service
public class WhiteListServiceImpl implements IWhiteListService {

    @Autowired
    private IWhiteListMapper mapper;

    @Override
    public Boolean selIp(String ip) {
        LambdaQueryWrapper<WhiteListEntity> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(WhiteListEntity::getIp,ip);
        List<WhiteListEntity> list = mapper.selectList(wrapper);
        if(list.size() > 0) {
            return true;
        }
        return false;
    }
}