package org.stm.wb.manage.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.stm.wb.manage.entity.WbPullDataLog;
import org.stm.wb.manage.mapper.WbPullDataLogMapper;
import org.stm.wb.manage.service.IWbPullDataLogService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 抓取数据日志
 * @Author: jeecg-boot
 * @Date:   2024-06-01
 * @Version: V1.0
 */
@Service
public class WbPullDataLogServiceImpl extends ServiceImpl<WbPullDataLogMapper, WbPullDataLog> implements IWbPullDataLogService {
    public List<WbPullDataLog> findLog(Integer cid, List<Integer> apiIds) {
        try {
            QueryWrapper<WbPullDataLog> queryWrapper = new QueryWrapper<>();
            queryWrapper.in("api_id", apiIds);
            queryWrapper.eq("cid", cid);
            List<WbPullDataLog> list = this.list(queryWrapper);
            return list;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;

    }

}
