package com.base.biz.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.base.biz.model.entity.SatelliteStationMatch;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.springframework.util.CollectionUtils;

import java.util.List;

@Mapper
@Repository
public interface SatelliteStationMatchMapper extends BaseMapper<SatelliteStationMatch> {

   default List<SatelliteStationMatch> getBySatelliteCodeAndStationCode(List<String> satelliteCodeList, List<String> stationCodeList){
       return this.selectList(new QueryWrapper<SatelliteStationMatch>().in("satellite_code",satelliteCodeList).in(!CollectionUtils.isEmpty(stationCodeList),"station_code",stationCodeList));
   }

}
