修改mapper
This commit is contained in:
		| @@ -2,6 +2,7 @@ package com.ruoyi.web.controller.yada; | ||||
|  | ||||
| import com.ruoyi.common.core.domain.AjaxResult; | ||||
| import com.ruoyi.system.domain_yada.CityVo; | ||||
| import com.ruoyi.system.domain_yada.OrientationVO; | ||||
| import com.ruoyi.system.service_yada.ICityService; | ||||
| import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiOperation; | ||||
| @@ -17,12 +18,15 @@ import java.util.List; | ||||
|  * 城市 | ||||
|  */ | ||||
| @RestController | ||||
| @RequestMapping(value = "/business-service/api/City") | ||||
| @RequestMapping(value = "/business-service/api/City", produces = "application/json;charset=UTF-8") | ||||
| @Api(tags = "城市") | ||||
| public class CityController | ||||
| { | ||||
|     @Resource | ||||
|     private ICityService cityService; | ||||
|  | ||||
|  | ||||
|  | ||||
|     @RequestMapping(value = "/getImpervious",method = {RequestMethod.GET}) | ||||
|     @ApiOperation(value = "不透水面面积",httpMethod = "GET") | ||||
|     public AjaxResult getImpervious(String city,String country) | ||||
| @@ -30,4 +34,13 @@ public class CityController | ||||
|         List<CityVo> cityVos=cityService.selectCity(city,country); | ||||
|         return  AjaxResult.success(cityVos); | ||||
|     } | ||||
|  | ||||
|  | ||||
|     @RequestMapping(value = "/getOrientation",method = {RequestMethod.GET}) | ||||
|     @ApiOperation(value = "不透水面扩张方向",httpMethod = "GET") | ||||
|     public AjaxResult getOrientation(String city,String country) | ||||
|     { | ||||
|         List<OrientationVO> cityVos=cityService.selectOrientation(city,country); | ||||
|         return  AjaxResult.success(cityVos); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -32,7 +32,7 @@ public class CityVo extends SysBaseEntity | ||||
|  | ||||
|     private  Double imperviousSurfaceExpansionCntribution ; | ||||
|  | ||||
|     private  String countryIdentification; | ||||
|     private  String superior; | ||||
|  | ||||
|     public String getId() { | ||||
|         return id; | ||||
| @@ -100,11 +100,11 @@ public class CityVo extends SysBaseEntity | ||||
|         this.imperviousSurfaceExpansionCntribution = imperviousSurfaceExpansionCntribution; | ||||
|     } | ||||
|  | ||||
|     public String getCountryIdentification() { | ||||
|         return countryIdentification; | ||||
|     public String getSuperior() { | ||||
|         return superior; | ||||
|     } | ||||
|  | ||||
|     public void setCountryIdentification(String countryIdentification) { | ||||
|         this.countryIdentification = countryIdentification; | ||||
|     public void setSuperior(String superior) { | ||||
|         this.superior = superior; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -17,6 +17,8 @@ public class GlobalTypeVO extends  SysBaseEntity { | ||||
|  | ||||
|     private  Double area; | ||||
|  | ||||
|     private  Double areaChange; | ||||
|  | ||||
|     private  int  particularYear; | ||||
|  | ||||
|     public String getId() { | ||||
| @@ -66,4 +68,12 @@ public class GlobalTypeVO extends  SysBaseEntity { | ||||
|     public void setParticularYear(int particularYear) { | ||||
|         this.particularYear = particularYear; | ||||
|     } | ||||
|  | ||||
|     public Double getAreaChange() { | ||||
|         return areaChange; | ||||
|     } | ||||
|  | ||||
|     public void setAreaChange(Double areaChange) { | ||||
|         this.areaChange = areaChange; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -0,0 +1,58 @@ | ||||
| package com.ruoyi.system.domain_yada; | ||||
|  | ||||
| /** | ||||
|  * @Author: JinSheng Song | ||||
|  * @Date: 2022/6/24 15:04 | ||||
|  */ | ||||
| public class OrientationVO extends SysBaseEntity | ||||
| { | ||||
|     private  String id; | ||||
|  | ||||
|     private  String city; | ||||
|  | ||||
|     private  String position; | ||||
|  | ||||
|     private Double areaValue; | ||||
|  | ||||
|     private  String superior; | ||||
|  | ||||
|     public String getId() { | ||||
|         return id; | ||||
|     } | ||||
|  | ||||
|     public void setId(String id) { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public String getCity() { | ||||
|         return city; | ||||
|     } | ||||
|  | ||||
|     public void setCity(String city) { | ||||
|         this.city = city; | ||||
|     } | ||||
|  | ||||
|     public String getPosition() { | ||||
|         return position; | ||||
|     } | ||||
|  | ||||
|     public void setPosition(String position) { | ||||
|         this.position = position; | ||||
|     } | ||||
|  | ||||
|     public Double getAreaValue() { | ||||
|         return areaValue; | ||||
|     } | ||||
|  | ||||
|     public void setAreaValue(Double areaValue) { | ||||
|         this.areaValue = areaValue; | ||||
|     } | ||||
|  | ||||
|     public String getSuperior() { | ||||
|         return superior; | ||||
|     } | ||||
|  | ||||
|     public void setSuperior(String superior) { | ||||
|         this.superior = superior; | ||||
|     } | ||||
| } | ||||
| @@ -2,6 +2,8 @@ package com.ruoyi.system.mapper_yada; | ||||
|  | ||||
|  | ||||
| import com.ruoyi.system.domain_yada.CityVo; | ||||
| import com.ruoyi.system.domain_yada.OrientationVO; | ||||
| import org.apache.ibatis.annotations.Param; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| @@ -11,6 +13,7 @@ import java.util.List; | ||||
|  */ | ||||
| public interface CityMapper { | ||||
|  | ||||
|     List<CityVo> selectCity(String city,String gj); | ||||
|     List<CityVo> selectCity(@Param("city") String city, @Param("gj") String gj); | ||||
|  | ||||
|     List<OrientationVO> selectOrientation(@Param("city") String city, @Param("gj") String gj); | ||||
| } | ||||
|   | ||||
| @@ -1,6 +1,8 @@ | ||||
| package com.ruoyi.system.service_yada; | ||||
|  | ||||
| import com.ruoyi.system.domain_yada.CityVo; | ||||
| import com.ruoyi.system.domain_yada.OrientationVO; | ||||
| import org.apache.ibatis.annotations.Param; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| @@ -11,4 +13,7 @@ import java.util.List; | ||||
| public interface ICityService { | ||||
|  | ||||
|     List<CityVo> selectCity(String city, String gj); | ||||
|  | ||||
|  | ||||
|     List<OrientationVO> selectOrientation(String city, String gj); | ||||
| } | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| package com.ruoyi.system.service_yada.impl; | ||||
|  | ||||
| import com.ruoyi.system.domain_yada.CityVo; | ||||
| import com.ruoyi.system.domain_yada.OrientationVO; | ||||
| import com.ruoyi.system.mapper_yada.AorestCoverageMapper; | ||||
| import com.ruoyi.system.mapper_yada.CityMapper; | ||||
| import com.ruoyi.system.service_yada.ICityService; | ||||
| @@ -22,4 +23,9 @@ public class CityServiceimpl implements ICityService { | ||||
|     public List<CityVo> selectCity(String city, String gj) { | ||||
|         return cityMapper.selectCity(city,gj); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public List<OrientationVO> selectOrientation(String city, String gj) { | ||||
|         return cityMapper.selectOrientation(city,gj); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -11,20 +11,54 @@ | ||||
|         <result property="area" column="area"/> | ||||
|         <result property="imperviousSurfaceArea" column="Impervious_surface_area"/> | ||||
|         <result property="imperviousSurfaceCoverage" column="Impervious_surface_coverage"/> | ||||
|         <result property="imperviousSurfaceExpansionSpeed" column="Impervious_surface_expansion_speed"/> | ||||
|         <result property="imperviousSurfaceExpansionStrength" column="Impervious_surface_expansion_strength"/> | ||||
|         <result property="imperviousSurfaceExpansionCntribution" column="Impervious_surface_expansion_Contribution "/> | ||||
|         <result property="countryIdentification" column="country_identification"/> | ||||
|         <result property="imperviousSurfaceExpansionSpeed" column="speed"/> | ||||
|         <result property="imperviousSurfaceExpansionStrength" column="strength"/> | ||||
|         <result property="imperviousSurfaceExpansionCntribution" column="contribution"/> | ||||
|         <result property="superior" column="superior"/> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="columns"> | ||||
| 	    <![CDATA[ | ||||
|         id,year,city,area,Impervious_surface_area,Impervious_surface_coverage,Impervious_surface_expansion_speed,Impervious_surface_expansion_strength,Impervious_surface_expansion_Contribution,country_identification | ||||
|         id,year,city,area,Impervious_surface_area,Impervious_surface_coverage,speed,strength,contribution,superior | ||||
|         ]]> | ||||
| 	</sql> | ||||
|  | ||||
|     <select id="selectCity" resultMap="RM_City"> | ||||
|         SELECT  <include refid="columns"/>  FROM  urban_impervious_surface | ||||
|         where 1=1 | ||||
|         <if test="city!= null and city !=''"> | ||||
|             AND city = #{city} | ||||
|         </if> | ||||
|         <if test="gj!= null and gj !=''"> | ||||
|             AND superior = #{gj} | ||||
|         </if> | ||||
|     </select> | ||||
|  | ||||
|     <resultMap id="RM_Orientation" type="com.ruoyi.system.domain_yada.OrientationVO"> | ||||
|         <result property="id" column="id"/> | ||||
|         <result property="city" column="city"/> | ||||
|         <result property="position" column="position"/> | ||||
|         <result property="areaValue" column="area_Value"/> | ||||
|         <result property="superior" column="superior"/> | ||||
|         <result property="createTime" column="created_Time"/> | ||||
|         <result property="createBy" column="created_By"/> | ||||
|     </resultMap> | ||||
|     <sql id="columns1"> | ||||
| 	    <![CDATA[ | ||||
|         id,city,superior,area_Value,position,created_Time,created_By | ||||
|         ]]> | ||||
| 	</sql> | ||||
|  | ||||
|  | ||||
|     <select id="selectOrientation" resultMap="RM_Orientation"> | ||||
|         SELECT  <include refid="columns1"/>  FROM  extension_orientation | ||||
|         where 1=1 | ||||
|         <if test="city!= null and city !=''"> | ||||
|             AND city = #{city} | ||||
|         </if> | ||||
|         <if test="gj!= null and gj !=''"> | ||||
|             AND superior = #{gj} | ||||
|         </if> | ||||
|     </select> | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -12,13 +12,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||
|         <result property="typeNameEn" column="type_name_en"/> | ||||
|         <result property="areaProportion" column="area_proportion"/> | ||||
|         <result property="area" column="area"/> | ||||
|         <result property="areaChange" column="area_change"/> | ||||
|         <result property="createBy" column="created_by"/> | ||||
|         <result property="createTime" column="created_time"/> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="columns"> | ||||
| 	    <![CDATA[ | ||||
|         id,particular_year,type_name,type_name_en,area_proportion,area,created_by,created_time | ||||
|         id,particular_year,type_name,type_name_en,area_proportion,area,created_by,created_time,area_change | ||||
|         ]]> | ||||
| 	</sql> | ||||
|     <select id="selectGlobalType" resultMap="RM_GlobalType"> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user