kaiyu
2022-03-14 5236663d1e40ca9ed0cbc0885cbc67a67c47943f
screen-api/src/main/java/com/moral/api/config/properties/SpecialCitiesProperties.java
@@ -19,5 +19,27 @@
@ConfigurationProperties(prefix = "special-city")
@Component
public class SpecialCitiesProperties {
    private List<SysArea> twentyEightCities;
    private List<SysArea> heBeiEightCities;
    private List<SysArea> oneSixEightCities;
    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;
    }
}