kaiyu
2022-03-09 997353a844c1d10ab930cbcd95922640063535f0
screen-api/src/main/java/com/moral/api/config/properties/SpecialCitiesProperties.java
@@ -19,5 +19,25 @@
@ConfigurationProperties(prefix = "special-city")
@Component
public class SpecialCitiesProperties {
    private List<SysArea> twentyEightCities;
    private List<SysArea> heBeiEightCities;
    public boolean isTwentyEightCities(Integer cityCode){
        for (SysArea city : twentyEightCities) {
            if(city.getAreaCode().equals(cityCode))
                return true;
        }
        return false;
    }
    public boolean isHeBeiEightCities(Integer cityCode){
        for (SysArea city : heBeiEightCities) {
            if(city.getAreaCode().equals(cityCode))
                return true;
        }
        return false;
    }
}