jinpengyong
2023-09-08 f13e7797473d706cc6eba0958a8c7e25607cb366
screen-api/src/main/java/com/moral/api/config/properties/SpecialCitiesProperties.java
@@ -19,5 +19,35 @@
@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;
    }
    public boolean isOneSixEightCities(Integer cityCode){
        for (SysArea city : oneSixEightCities) {
            if(city.getAreaCode().equals(cityCode))
                return true;
        }
        return false;
    }
}