package com.ai.da.service.impl;

import com.ai.da.mapper.primary.DesignHistoryMapper;
import com.ai.da.mapper.primary.entity.DesignHistory;
import com.ai.da.service.DesignHistoryService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;

/**
 * 服务实现类
 *
 * @author yanglei
 * @since 2022-09-30
 */
@Slf4j
@Service
public class DesignHistoryServiceImpl extends ServiceImpl<DesignHistoryMapper, DesignHistory> implements DesignHistoryService {
    @Resource
    private DesignHistoryMapper designHistoryMapper;

    @Override
    public List<DesignHistory> getByMD5List(List<String> md5List) {
        QueryWrapper<DesignHistory> queryWrapper = new QueryWrapper<>();
        queryWrapper.in("md5", md5List);
        return designHistoryMapper.selectList(queryWrapper);
    }

}
