package com.pcloud.book.record.mapper;

import com.pcloud.book.record.entity.RegionMap;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Mapper
@Component
public interface RegionMapMapper {
    int deleteByPrimaryKey(Long id);

    int insert(RegionMap record);

    int insertSelective(RegionMap record);

    RegionMap selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(RegionMap record);

    int updateByPrimaryKey(RegionMap record);

    List<RegionMap> getCitysByPY(@Param("keyword") String keyword);

    @MapKey("regionCode")
    Map<String, RegionMap> getCitysByCodes(List<String> cityCodes);

    String getCitysByCode(@Param("cityCode") String cityCode);
}