cjl
2023-10-27 165f11c315a0283c6cf32572dddee5c81351cad8
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;
    }
}