From da51b2a55d44c8e0c4dcdb602cfa8a679ee94e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E9=87=91=E7=94=9F?= <1921620649@qq.com> Date: Tue, 1 Nov 2022 18:00:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A3=AE=E6=9E=97=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/yada/ForestDetectionControer.java | 5 +++-- .../com/ruoyi/system/mapper_yada/ForestDetectionMapper.java | 4 +++- .../ruoyi/system/service_yada/IForestDetectionService.java | 3 ++- .../system/service_yada/impl/ForestDetectionServiceImpl.java | 5 +++-- .../main/resources/mapper/system/ForestDetectionMapper.xml | 3 +++ 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ForestDetectionControer.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ForestDetectionControer.java index 31a2f8cae..0359b67b8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ForestDetectionControer.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ForestDetectionControer.java @@ -7,6 +7,7 @@ import com.ruoyi.system.service_yada.impl.ForestDetectionServiceImpl; import io.swagger.annotations.Api; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @@ -25,14 +26,14 @@ public class ForestDetectionControer { private IForestDetectionService service; @RequestMapping(value = "/select", method = {RequestMethod.GET}) - public AjaxResult select() { + public AjaxResult select(@RequestParam(value = "year1",required = false) String year1) { ForestDetectionVO forest = new ForestDetectionVO(); List changes = service.selectChange(); List cloumnars = service.selectCloumnar(); - List types = service.selectType(); + List types = service.selectType(year1); List conversions = service.selectConversion(); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ForestDetectionMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ForestDetectionMapper.java index 0a3888b17..75d806baf 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ForestDetectionMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ForestDetectionMapper.java @@ -4,6 +4,8 @@ import com.ruoyi.system.domain_yada.ChangeTable; import com.ruoyi.system.domain_yada.CloumnarTable; import com.ruoyi.system.domain_yada.TypeConversion; import com.ruoyi.system.domain_yada.TypeTable; +import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.RequestParam; import java.util.List; @@ -13,7 +15,7 @@ import java.util.List; */ public interface ForestDetectionMapper { - List selectType(); + List selectType(@Param("year1") String year1); List selectCloumnar(); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IForestDetectionService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IForestDetectionService.java index 916d285f0..292bfa3ae 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IForestDetectionService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IForestDetectionService.java @@ -4,6 +4,7 @@ import com.ruoyi.system.domain_yada.ChangeTable; import com.ruoyi.system.domain_yada.CloumnarTable; import com.ruoyi.system.domain_yada.TypeConversion; import com.ruoyi.system.domain_yada.TypeTable; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -13,7 +14,7 @@ import java.util.List; */ public interface IForestDetectionService { - List selectType(); + List selectType(@Param("year1") String year1); List selectCloumnar(); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ForestDetectionServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ForestDetectionServiceImpl.java index 088b640b0..c10c931f9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ForestDetectionServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ForestDetectionServiceImpl.java @@ -6,6 +6,7 @@ import com.ruoyi.system.domain_yada.TypeConversion; import com.ruoyi.system.domain_yada.TypeTable; import com.ruoyi.system.mapper_yada.ForestDetectionMapper; import com.ruoyi.system.service_yada.IForestDetectionService; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestParam; @@ -23,8 +24,8 @@ public class ForestDetectionServiceImpl implements IForestDetectionService { private ForestDetectionMapper mapper; @Override - public List selectType() { - return mapper.selectType(); + public List selectType(@Param("year1") String year1) { + return mapper.selectType(year1); } @Override diff --git a/ruoyi-system/src/main/resources/mapper/system/ForestDetectionMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ForestDetectionMapper.xml index 084498877..bb4cf54a2 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ForestDetectionMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ForestDetectionMapper.xml @@ -13,6 +13,9 @@