diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index 83feb1c60..b02d9c583 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -4,6 +4,9 @@ import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.util.ObjectUtils; + + /** * 启动程序 @@ -20,7 +23,7 @@ public class RuoYiApplication SpringApplication.run(RuoYiApplication.class, args); System.out.println(); System.out.println(" --->>>启动成功!<<<---"); - } + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java index 22b0a5d97..da45de275 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java @@ -4,6 +4,7 @@ import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUtils; +import com.ruoyi.system.domain_yada.MapServicesVO; import com.ruoyi.system.domain_yada.ThematicMapDomain; import com.ruoyi.system.service_yada.ThematicMapService; import io.swagger.annotations.*; @@ -52,6 +53,29 @@ public class ThematicMapController { thematicMapDomain.getPictureTypeOne(),thematicMapDomain.getPictureTypeTwo()); return AjaxResult.success(res); } + + + /** + * 查询方法 + * @param response 响应头 + * @return 参数类 + */ + @ApiOperation("所有地图服务") + @ApiImplicitParams({}) + @ApiResponses({ + @ApiResponse(code =200,message = "请求成功"), + @ApiResponse(code =401,message = "没有认证"), + @ApiResponse(code =403,message = "权限不足"), + @ApiResponse(code =404,message = "未找到") + }) + @RequestMapping(value = "/get/map",method = {RequestMethod.POST}) + public AjaxResult selectMap(HttpServletResponse response, + String chartType,String chartName) + { + List res= thematicMapService.selMapServers(chartName,chartType); + return AjaxResult.success(res); + } + /** * 删除方法 * @param id id diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/MapServicesVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/MapServicesVO.java new file mode 100644 index 000000000..a3bdfcc9c --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/MapServicesVO.java @@ -0,0 +1,79 @@ +package com.ruoyi.system.domain_yada; + +/** + * 地图服务类 + * @Author: JinSheng Song + * @Date: 2022/6/30 15:48 + */ +public class MapServicesVO extends SysBaseEntity +{ + private String id; + /** + * 地图类型 + */ + private String chartType; + /** + * 地图名称 + */ + private String chartName; + /** + * 图层 + */ + private String layer; + /** + * 年份 + */ + private String particularYear; + /** + * 分辨率 + */ + private String resolvingPower; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getChartType() { + return chartType; + } + + public void setChartType(String chartType) { + this.chartType = chartType; + } + + public String getChartName() { + return chartName; + } + + public void setChartName(String chartName) { + this.chartName = chartName; + } + + public String getLayer() { + return layer; + } + + public void setLayer(String layer) { + this.layer = layer; + } + + public String getParticularYear() { + return particularYear; + } + + public void setParticularYear(String particularYear) { + this.particularYear = particularYear; + } + + public String getResolvingPower() { + return resolvingPower; + } + + public void setResolvingPower(String resolvingPower) { + this.resolvingPower = resolvingPower; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ThematicMapMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ThematicMapMapper.java index f0d89f57b..5785b404d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ThematicMapMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ThematicMapMapper.java @@ -1,8 +1,10 @@ package com.ruoyi.system.mapper_yada; +import com.ruoyi.system.domain_yada.MapServicesVO; import com.ruoyi.system.domain_yada.ThematicMapDomain; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.hibernate.validator.constraints.NotEmpty; import org.springframework.stereotype.Repository; import java.time.LocalDateTime; @@ -21,6 +23,15 @@ public interface ThematicMapMapper { @Param("pictureTypeOne") String pictureTypeOne, @Param("pictureTypeTwo") String pictureTypeTwo); + /** + * 查看地图服务 + * @param chartName 服务名称 + * @param chartType 服务类型 + * @return + */ + List selMapServers(@Param("chartName") String chartName, + @Param("chartType") String chartType); + /** * 删除专题图根据编号 * @param id 编号 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ThematicMapService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ThematicMapService.java index d25e7ceb1..7859381b9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ThematicMapService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ThematicMapService.java @@ -1,6 +1,8 @@ package com.ruoyi.system.service_yada; +import com.ruoyi.system.domain_yada.MapServicesVO; import com.ruoyi.system.domain_yada.ThematicMapDomain; +import org.apache.ibatis.annotations.Param; import java.time.LocalDateTime; import java.util.List; @@ -19,6 +21,14 @@ public interface ThematicMapService { */ List selectAll(String pictureType,String pictureTypeOne, String pictureTypeTwo); + /** + * 获取地图服务 + * @param chartName + * @param chartType + * @return + */ + List selMapServers(String chartName, String chartType); + /** * 删除专题图根据编号 * @param id 编号 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ThematicMapServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ThematicMapServiceImpl.java index 1c5c939a3..ac6c19718 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ThematicMapServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ThematicMapServiceImpl.java @@ -1,5 +1,6 @@ package com.ruoyi.system.service_yada.impl; +import com.ruoyi.system.domain_yada.MapServicesVO; import com.ruoyi.system.domain_yada.ThematicMapDomain; import com.ruoyi.system.mapper_yada.ThematicMapMapper; import com.ruoyi.system.service_yada.ThematicMapService; @@ -29,6 +30,11 @@ public class ThematicMapServiceImpl implements ThematicMapService { return thematicMapMapper.selectAllThematicMap(pictureType,pictureTypeOne,pictureTypeTwo); } + @Override + public List selMapServers(String chartName, String chartType) { + return thematicMapMapper.selMapServers(chartName,chartType); + } + /** * 删除专题图根据编号 * @param id 编号 diff --git a/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml index ede0bdbbf..cf4d66ee0 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml @@ -18,12 +18,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + + + + + + +