diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/CityExpandControllerr.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/CityExpandControllerr.java index 333f88f2c..fc937f4a9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/CityExpandControllerr.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/CityExpandControllerr.java @@ -5,6 +5,7 @@ import com.ruoyi.framework.web.domain.Server; import com.ruoyi.system.domain_yada.CityFocusVO; import com.ruoyi.system.domain_yada.CityInformation; import com.ruoyi.system.domain_yada.OrientationVO; +import com.ruoyi.system.domain_yada.entity.UrbanProvinceSufaceEntity; import com.ruoyi.system.service_yada.ICityExpandService; import org.apache.ibatis.annotations.Param; import org.springframework.web.bind.annotation.RequestMapping; @@ -74,4 +75,10 @@ public class CityExpandControllerr { return AjaxResult.success(value); } + @RequestMapping(value = "/urbanProvince", method = {RequestMethod.GET}) + public AjaxResult urbanProvince(String province, String country,String level) { + List list = service.urbanProvicneSuface(province, country,level); + return AjaxResult.success(list); + + } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index b31f0f5f6..b58af4f19 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -115,7 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter .antMatchers("/*/api-docs").anonymous() .antMatchers("/druid/**").anonymous() // // 除上面外的所有请求全部需要鉴权认证 - //.anyRequest().authenticated() + .anyRequest().authenticated() .and() .headers().frameOptions().disable(); httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/UrbanProvinceSufaceEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/UrbanProvinceSufaceEntity.java new file mode 100644 index 000000000..43fc9e164 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/UrbanProvinceSufaceEntity.java @@ -0,0 +1,235 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 城市不透水面省份 + * + * @author Mr.C + */ +public class UrbanProvinceSufaceEntity { + private Integer id; + private String province; + private String provinceEn; + private String year; + private String area; + private String imperviousSurfaceArea; + private String imperviousSurfaceCoverage; + private String speed; + private String strength; + private String contribution; + private String country; + private String countryEn; + + public UrbanProvinceSufaceEntity() { + } + + public UrbanProvinceSufaceEntity(Integer id, String province, String provinceEn, String year, String area, String imperviousSurfaceArea, String imperviousSurfaceCoverage, String speed, String strength, String contribution, String country, String countryEn) { + this.id = id; + this.province = province; + this.provinceEn = provinceEn; + this.year = year; + this.area = area; + this.imperviousSurfaceArea = imperviousSurfaceArea; + this.imperviousSurfaceCoverage = imperviousSurfaceCoverage; + this.speed = speed; + this.strength = strength; + this.contribution = contribution; + this.country = country; + this.countryEn = countryEn; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return province + */ + public String getProvince() { + return province; + } + + /** + * 设置 + * @param province + */ + public void setProvince(String province) { + this.province = province; + } + + /** + * 获取 + * @return provinceEn + */ + public String getProvinceEn() { + return provinceEn; + } + + /** + * 设置 + * @param provinceEn + */ + public void setProvinceEn(String provinceEn) { + this.provinceEn = provinceEn; + } + + /** + * 获取 + * @return year + */ + public String getYear() { + return year; + } + + /** + * 设置 + * @param year + */ + public void setYear(String year) { + this.year = year; + } + + /** + * 获取 + * @return area + */ + public String getArea() { + return area; + } + + /** + * 设置 + * @param area + */ + public void setArea(String area) { + this.area = area; + } + + /** + * 获取 + * @return imperviousSurfaceArea + */ + public String getImperviousSurfaceArea() { + return imperviousSurfaceArea; + } + + /** + * 设置 + * @param imperviousSurfaceArea + */ + public void setImperviousSurfaceArea(String imperviousSurfaceArea) { + this.imperviousSurfaceArea = imperviousSurfaceArea; + } + + /** + * 获取 + * @return imperviousSurfaceCoverage + */ + public String getImperviousSurfaceCoverage() { + return imperviousSurfaceCoverage; + } + + /** + * 设置 + * @param imperviousSurfaceCoverage + */ + public void setImperviousSurfaceCoverage(String imperviousSurfaceCoverage) { + this.imperviousSurfaceCoverage = imperviousSurfaceCoverage; + } + + /** + * 获取 + * @return speed + */ + public String getSpeed() { + return speed; + } + + /** + * 设置 + * @param speed + */ + public void setSpeed(String speed) { + this.speed = speed; + } + + /** + * 获取 + * @return strength + */ + public String getStrength() { + return strength; + } + + /** + * 设置 + * @param strength + */ + public void setStrength(String strength) { + this.strength = strength; + } + + /** + * 获取 + * @return contribution + */ + public String getContribution() { + return contribution; + } + + /** + * 设置 + * @param contribution + */ + public void setContribution(String contribution) { + this.contribution = contribution; + } + + /** + * 获取 + * @return country + */ + public String getCountry() { + return country; + } + + /** + * 设置 + * @param country + */ + public void setCountry(String country) { + this.country = country; + } + + /** + * 获取 + * @return countryEn + */ + public String getCountryEn() { + return countryEn; + } + + /** + * 设置 + * @param countryEn + */ + public void setCountryEn(String countryEn) { + this.countryEn = countryEn; + } + + public String toString() { + return "UrbanProvinceSufaceEntity{id = " + id + ", province = " + province + ", provinceEn = " + provinceEn + ", year = " + year + ", area = " + area + ", imperviousSurfaceArea = " + imperviousSurfaceArea + ", imperviousSurfaceCoverage = " + imperviousSurfaceCoverage + ", speed = " + speed + ", strength = " + strength + ", contribution = " + contribution + ", country = " + country + ", countryEn = " + countryEn + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/CityExpandMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/CityExpandMapper.java index 377d0e322..2a7333493 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/CityExpandMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/CityExpandMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.system.mapper_yada; import com.ruoyi.system.domain_yada.CityFocusVO; import com.ruoyi.system.domain_yada.CityInformation; import com.ruoyi.system.domain_yada.OrientationVO; +import com.ruoyi.system.domain_yada.entity.UrbanProvinceSufaceEntity; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -27,4 +28,8 @@ public interface CityExpandMapper { @Param("basin") String basin); List selectMain(@Param("year") String year); + + List urbanProvicneSuface(@Param("province") String city, + @Param("country") String country, + @Param("level") String level); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ICityExpandService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ICityExpandService.java index d3b634008..80e7ddb2f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ICityExpandService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ICityExpandService.java @@ -3,6 +3,7 @@ package com.ruoyi.system.service_yada; import com.ruoyi.system.domain_yada.CityFocusVO; import com.ruoyi.system.domain_yada.CityInformation; import com.ruoyi.system.domain_yada.OrientationVO; +import com.ruoyi.system.domain_yada.entity.UrbanProvinceSufaceEntity; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -20,4 +21,6 @@ public interface ICityExpandService { List selectInfrom(String city, String country,String year,String basin); List selectMain(String year); + + List urbanProvicneSuface(String city,String country,String level); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/CityExpandServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/CityExpandServiceimpl.java index b5e47f46d..1d685a4aa 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/CityExpandServiceimpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/CityExpandServiceimpl.java @@ -3,6 +3,7 @@ package com.ruoyi.system.service_yada.impl; import com.ruoyi.system.domain_yada.CityFocusVO; import com.ruoyi.system.domain_yada.CityInformation; import com.ruoyi.system.domain_yada.OrientationVO; +import com.ruoyi.system.domain_yada.entity.UrbanProvinceSufaceEntity; import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper; import com.ruoyi.system.mapper_yada.CityExpandMapper; import com.ruoyi.system.service_yada.ICityExpandService; @@ -11,7 +12,9 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.time.Year; +import java.util.Comparator; import java.util.List; +import java.util.logging.Level; /** * @Author: JinSheng Song @@ -43,4 +46,11 @@ public class CityExpandServiceimpl implements ICityExpandService { public List selectMain(String year) { return mapper.selectMain(year); } + + @Override + public List urbanProvicneSuface(String city, String country,String level) { + List list = mapper.urbanProvicneSuface(city, country, level); + //list.sort(Comparator.comparing(UrbanProvinceSufaceEntity::getYear)); + return list; + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/CityExpandMapper.xml b/ruoyi-system/src/main/resources/mapper/system/CityExpandMapper.xml index d215aee9d..6b19cd5a6 100644 --- a/ruoyi-system/src/main/resources/mapper/system/CityExpandMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/CityExpandMapper.xml @@ -18,12 +18,15 @@ - SELECT FROM urban_center_of_gravity + SELECT + + FROM urban_center_of_gravity where 1=1 AND city = #{city} @@ -86,12 +92,15 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file