cjl
2024-03-29 d672457aaf5c7a2b7429b4eef82d574009b01351
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;
    }
}